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
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
public Vector2 parentToLocalCoordinates(Vector2 parentCoords) { return internalGroup.parentToLocalCoordinates(parentCoords); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Vector2 localToParentCoordinates(Vector2 localCoords) {\n return internalGroup.localToParentCoordinates(localCoords);\n }", "public static Spatial convertToLocal(Spatial parent, Spatial child) {\n\t\tfloat x = child.getX();\n\t\tfloat y = child.getY();\n\n\t\tfloat angle = child.getAngle();\n\n\t\tchild.setPosition(x - parent.getX(), y - parent.getY());\n\t\tchild.setAngle(angle - parent.getAngle());\n\n\t\treturn child;\n\t}", "private void setOrigin() {\n Hep3Vector origin = VecOp.mult(CoordinateTransformations.getMatrix(), _sensor.getGeometry().getPosition());\n // transform to p-side\n Polygon3D psidePlane = this.getPsidePlane();\n Translation3D transformToPside = new Translation3D(VecOp.mult(-1 * psidePlane.getDistance(),\n psidePlane.getNormal()));\n this._org = transformToPside.translated(origin);\n }", "public CoordinateSystem() {\r\n\t\torigin = new GuiPoint(0, 0);\r\n\t\tzoomFactor = 1f;\r\n\t}", "public RMPoint getXYP() { return convertPointToShape(new RMPoint(), _parent); }", "public void setToCoordinates(int toX, int toY);", "public void update() {\n\t\tactSX=parent.actSX*scaleX;\n\t\tactSY=parent.actSY*scaleY;\n\t\tw=posW*actSX;\n\t\th=posH*actSY;\n\t\tswitch (align) {\n\t\tcase DEFAULT:\n\t\t\tx=parent.x+posX*actSX;\n\t\t\ty=parent.y+posY*actSY;\n\t\t\tbreak;\n\t\tcase TOPRIGHT:\n\t\t\tx=parent.x+parent.w-(posX+posW)*actSX;\n\t\t\ty=parent.y+posY*actSY;\n\t\t\tbreak;\n\t\tcase BOTTOMLEFT:\n\t\t\tx=parent.x+posX*actSX;\n\t\t\ty=parent.y+parent.h-(posY+posH)*actSY;\n\t\t\tbreak;\n\t\tcase BOTTOMRIGHT:\n\t\t\tx=parent.x+parent.w-(posX+posW)*actSX;\n\t\t\ty=parent.y+parent.h-(posY+posH)*actSY;\n\t\t\tbreak;\n\t\tcase CENTEREDX:\n\t\t\tx=parent.x+parent.w/2-w/2+posX*actSX;\n\t\t\ty=parent.y+posY*actSY;\n\t\t\tbreak;\n\t\tcase CENTEREDY:\n\t\t\tx=parent.x+posX*actSX;\n\t\t\ty=parent.y+parent.h/2-h/2+posY*actSY;\n\t\t\tbreak;\n\t\tcase CENTEREDXY:\n\t\t\tx=parent.x+parent.w/2-w/2+posX*actSX;\n\t\t\ty=parent.y+parent.h/2-h/2+posY*actSY;\n\t\t\tbreak;\n\t\t}\n\t}", "public static Spatial convertToAbsolute(Spatial parent, Spatial child) {\n\t\tfloat x = child.getX();\n\t\tfloat y = child.getY();\n\n\t\tfloat angle = child.getAngle();\n\n\t\tchild.setPosition(x + parent.getX(), y + parent.getY());\n\t\tchild.setAngle(angle + parent.getAngle());\n\n\t\treturn child;\n\t}", "public void transform() {\n final var bounds = getParentBounds();\n transform( bounds.width, bounds.height );\n }", "private Point[] transformCoordinateSystem(Point[] objectPosition, Point newCenter) {\n\t\tPoint[] transformedObjectPosition = objectPosition;\n\t\tfor(int i = 0; i < objectPosition.length; i++) {\n\t\t\t// Move location to coordinate system with center in origo \n\t\t\ttransformedObjectPosition[i].set(new double[] {\n\t\t\t\tobjectPosition[i].x - newCenter.x,\n\t\t\t\tobjectPosition[i].y - newCenter.y\n\t\t\t});\n\t\t}\n\t\t\n\t\treturn transformedObjectPosition;\n\t}", "public final void getPhysicalRelativeCoordinates(double[] coordinates) {\n\t\tfor (int i = 0; i < coordinates.length; i++) \n\t\t\tcoordinates[i] = position[i] * calibration[i];\n\t}", "public void center() {\n\t\tif(parent != null) {\n\t\t\tfloat parMidWidth = parent.getWidth() / 2f;\n\t\t\tfloat parMidHeight = parent.getHeight() / 2f;\n\t\t\tfloat midWidth = width / 2f;\n\t\t\tfloat midHeight = height / 2f;\n\t\t\t\n\t\t\tfloat newX = parent.getX() + (parMidWidth - midWidth);\n\t\t\tfloat newY = parent.getY() + (parMidHeight - midHeight);\n\t\t\t\n\t\t\tposition = new Vec2f(newX, newY);\n\t\t\tfindPosRatios();\n\t\t}\n\t}", "public Coordinates setCoordinates(Coordinates coordinates) {\n Coordinates previous = this.coordinates;\n if (coordinates == null)\n coordinates = new Coordinates(-1, -1);\n this.coordinates = coordinates;\n return previous;\n }", "public void updateCoords() {\n line.setLine(parent.getFullBounds().getCenter2D(), child.getFullBounds().getCenter2D());\n Rectangle2D r = line.getBounds2D();\n // adding 1 to the width and height prevents the bounds from\n // being marked as empty and is much faster than createStrokedShape()\n setBounds(r.getX(), r.getY(), r.getWidth() + 1, r.getHeight() + 1);\n invalidatePaint();\n }", "public Vector2 stageToLocalCoordinates(Vector2 stageCoords) {\n return internalGroup.stageToLocalCoordinates(stageCoords);\n }", "public Point getLocationInParentWindow() {\n return this.mLocationInParentWindow;\n }", "public RTWLocation parent();", "final void setParent(ShapeParent newParent)\n {\n this.parent = newParent;\n }", "public void setFromCoordinates(int fromX, int fromY);", "public double[] getCoordinates() {\n\t\treturn coordinateTools.localToCoordinates(this);\n\t}", "public Coordinates getCoordinates() {\n if (this.coordinates == null)\n return new Coordinates(-1, -1);\n return this.coordinates;\n }", "public Vector2 getAbsolutePosition() {\n Vector2 screenPos = new Vector2(this.position.x, this.position.y);\n for(UIElement element = this.parent; element != null; element = element.parent) {\n screenPos.add(element.position);\n }\n return screenPos;\n }", "public synchronized void setAgentCoordinate() {\n agentCoordinate = getCoordinate(agentState);\n }", "public void setCoordinates(String coordinates) {\n this.coordinates = coordinates;\n }", "public void setParent(CarrierShape parent)\n\t{\n\t\tthis.parent = parent;\n\t}", "public void setParent (com.redsaga.hibnatesample.step2.Board _parent) {\n\t\tthis._parent = _parent;\n\t}", "public CSplitLocation( CLocation parent ){\n\t\tthis.parent = parent;\n\t}", "public PVector getTransformedPosition(){\n\t\treturn gui.getTransform().transform(position);\n\t}", "public Coordinate coordinate() {\n\t\treturn coordinate;\n\t}", "public void toUserSpace(int[] viewportCoordinate,\n float[] userSpaceCoordinate) {\n\n if (( userSpaceCoordinate == null ) || ( viewportCoordinate == null )) {\n throw new IllegalArgumentException();\n }\n if (( userSpaceCoordinate.length != 2 ) || ( viewportCoordinate.length != 2 )) {\n throw new IllegalArgumentException();\n }\n\n // Get the current screenCTM\n Transform txf = svg.getTransformState();\n\n try {\n txf = (Transform) txf.inverse();\n } catch (SVGException se) {\n throw new IllegalStateException(ERROR_NON_INVERTIBLE_SVG_TRANSFORM);\n }\n\n float[] pt = new float[2];\n pt[0] = viewportCoordinate[0];\n pt[1] = viewportCoordinate[1];\n txf.transformPoint(pt, userSpaceCoordinate);\n }", "public void SetPosition(Vector2 position)\n\t{\n\t\tTransform transform = parent.transform;\n\t\ttransform.position = position;\n\t\t// Dont loose your dP!\n\t\tpreviousPosition = Vector2.Add(position,velocity.negate());\n\t}", "public void setParent(AsNode parent) {\n\t\tthis.state.setG(parent.getState().getG() + parent.childCost.get(this));\n\t\tthis.parent = parent;\n\t}", "public position convertToPosition(){\n\t\tdouble x = r * Math.cos(theta);\n\t\tdouble y = r * Math.sin(theta);\n\t\treturn new position(x, y);\n\t}", "public Coordinates() {\n\t\t\n\t\txPosition = 0;\t\t\t// Sets the x integer to zero\n\t\tyPosition = 0;\t\t\t// Sets the y integer to zero\n\t}", "protected void notifyParentOfPositionChange()\n {\n rotatedCorners = null;\n ShapeView view = getParentView();\n \n if (view != null)\n {\n view.onPositionChanged(this);\n }\n }", "public Vector2 localToAscendantCoordinates(Actor ascendant, Vector2 localCoords) {\n if(ascendant instanceof Group){\n Group group=(Group)ascendant;\n return internalGroup.localToAscendantCoordinates(group.internalGroup, localCoords);\n\n }\n return internalGroup.localToAscendantCoordinates(ascendant.internalActor, localCoords);\n }", "public void resolveParent() {\n\t\tif (parentGroup.isEmpty() && parentName.isEmpty()) {\n\t\t\tparentDimensionId = dimensionId;\n\t\t} else {\n\t\t\tfinal CelestialObject celestialObjectParent = CelestialObjectManager.get(parentGroup, parentName);\n\t\t\tif (celestialObjectParent != null) {\n\t\t\t\tparentDimensionId = celestialObjectParent.dimensionId;\n\t\t\t}\n\t\t}\n\t}", "public Coords getCoord() {\r\n\t\treturn coord;\r\n\t}", "public String getCoordinates() {\n return this.coordinates;\n }", "public Integer getParentLocationId() {\n return parentLocationId;\n }", "public void setParent(RMParentShape aShape) { _parent = aShape; }", "protected abstract void calcOrigin();", "public static Tour crossover(Tour parent1, Tour parent2) {\n // Create new child tour\n Tour child = new Tour();\n\n // Get start and end sub tour positions for parent1's tour\n int startPos = (int) (Math.random() * parent1.tourSize());\n int endPos = (int) (Math.random() * parent1.tourSize());\n\n // Loop and add the sub tour from parent1 to our child\n for (int i = 0; i < child.tourSize(); i++) {\n // If our start position is less than the end position\n if (startPos < endPos && i > startPos && i < endPos) {\n child.setCity(i, parent1.getCity(i));\n } // If our start position is larger\n else if (startPos > endPos) {\n if (!(i < startPos && i > endPos)) {\n child.setCity(i, parent1.getCity(i));\n }\n }\n }\n\n // Loop through parent2's city tour\n for (int i = 0; i < parent2.tourSize(); i++) {\n // If child doesn't have the city add it\n if (!child.containsCity(parent2.getCity(i))) {\n // Loop to find a spare position in the child's tour\n for (int ii = 0; ii < child.tourSize(); ii++) {\n // Spare position found, add city\n if (child.getCity(ii) == null) {\n child.setCity(ii, parent2.getCity(i));\n break;\n }\n }\n }\n }\n return child;\n }", "public Coordinates(final Coordinates coor) {\n\t\tthis(coor.getX(), coor.getY());\n\t}", "public Coordinate getLocation();", "public Coordinate getCoordinate() {\n return coordinate;\n }", "Coordinate(int Xposition, int Yposition) {\n\t\tthis.X = Xposition;\n\t\tthis.Y = Yposition;\n\n\t}", "private void normalizeLocation(Point location) {\r\n location.x = location.x / Environment.standardCellLength * Environment.standardCellLength;\r\n location.y = location.y / Environment.standardCellLength * Environment.standardCellLength;\r\n }", "private Vec2 calculatePos() {\n\t\tNetTransformComponent transform = actor.getEntity().getNetTransform();\n\t\tif (transform != null) {\n\t\t\tVec2 screenPos = scene.getCamera()\n\t\t\t\t\t.getScreenCoordinates(Vec3.add(transform.getPosition(), new Vec3(-2.0f, 3.25f, 0.0f)));\n\t\t\tVec2 result = new Vec2(screenPos.getX(), screenPos.getY());\n\t\t\treturn result;\n\t\t}\n\n\t\treturn new Vec2(0.0f, 0.0f);\n\t}", "public Object getLocation() {\n return leftSide.getLocation();\n }", "public void setSpawnPoint() {\n if (this.dirVec.y == 0) {\n super.centerRectAt(new Point(-1*OUTER_OFFSET, super.getCenter().y));\n }\n else {\n super.centerRectAt(new Point(super.getCenter().x, OUTER_OFFSET));\n }\n }", "public void setMoveTo(Coordinate coordinate);", "@Override\n\tpublic Tour crossover(Tour parent1, Tour parent2) {\n\t\tTour child = new Tour(parent1.getSize());\n\t\t\n\t\t// Select a parent randomly\n\t\tdouble randomNum = Math.random();\n\t\tTour parent = randomNum > 0.5 ? parent1 : parent2;\n\t\t\n\t\t// Add cities from parent to the child\n\t\tfor (int i=0; i<child.getSize(); i++) {\n\t\t\tchild.setCity(i, parent.getCity(i));\t\t\n\t\t}\n\t\t\n\t\treturn child;\n\t\t\n\t}", "public final int getAbsoluteX() {\n assert (parent != null);\n if (parent == this) {\n return x;\n }\n if ((parent instanceof TWindow)\n && !(parent instanceof TMenu)\n && !(parent instanceof TDesktop)\n ) {\n // Widgets on a TWindow have (0,0) as their top-left, but this is\n // actually the TWindow's (1,1).\n return parent.getAbsoluteX() + x + 1;\n }\n return parent.getAbsoluteX() + x;\n }", "protected Vector3D getRefCompCenterRelParent(AbstractShape shape) {\n Vector3D centerPoint;\n if (shape.hasBounds()) {\n centerPoint = shape.getBounds().getCenterPointLocal();\n centerPoint.transform(shape.getLocalMatrix()); //macht den punkt in self space\n } else {\n Vector3D localObjCenter = shape.getCenterPointGlobal();\n localObjCenter.transform(shape.getGlobalInverseMatrix()); //to localobj space\n localObjCenter.transform(shape.getLocalMatrix()); //to parent relative space\n centerPoint = localObjCenter;\n }\n return centerPoint;\n }", "@Override\n public Location getOrigin() {\n return getOwner().getLocation();\n }", "public CoordinateSystem( final String name ) {\n super( name );\n }", "public void setPos(double[] coords) {\r\n\t\tthis.pos.setCoord(coords);\r\n\t\tthis.setD(norm.dot(this.pos.toVec()));\r\n\t}", "public void startExecuting() {\n\t\t\tRandom random = this.parentEntity.getRNG();\n\t\t\tdouble d0 = this.parentEntity.posX + (double)((random.nextFloat() * 2.0F - 1.0F) * 16.0F);\n\t\t\tdouble d1 = this.parentEntity.posY + (double)((random.nextFloat() * 2.0F - 1.0F) * 16.0F);\n\t\t\tdouble d2 = this.parentEntity.posZ + (double)((random.nextFloat() * 2.0F - 1.0F) * 16.0F);\n\t\t\tthis.parentEntity.getMoveHelper().setMoveTo(d0, d1, d2, 0.3D);\n\t\t}", "public Position toPosition() {\n\t\tPosition position = new Position();\n\t\tboolean legalPosition = position.fromMoveSequence(moveSequence);\n\t\tif (!legalPosition) {\n\t\t\tlog.severe(\"illegal position, move sequence: \" + moveSequence);\n\t\t}\n\t\treturn position;\n\t}", "private void adjustEViewPosition() {\n double aVec[] = theRocket.getCoordSys().getPositionVec();\n CoordSys eViewSys = new CoordSys();\n eViewSys.setZAxis(VMath.normalize(aVec));\n\n aVec = VMath.vecMultByScalar(aVec, 2.5);\n eViewSys.setPositionAsVec(aVec);\n\n double[] zAxis = VMath.normalize(eViewSys.zAxis().getVectorForm());\n double[] yAxis = VMath.normalize(theRocket.getCoordSys().yAxis().getVectorForm());\n double[] xAxis = VMath.normalize(VMath.crossprd(yAxis, zAxis));\n yAxis = VMath.crossprd(zAxis, xAxis);\n eViewSys.setXAxis(xAxis);\n eViewSys.setYAxis(yAxis);\n eViewSys.setZAxis(zAxis);\n\n eViewSys.xRotate(180);\n eViewSys.zRotate(-90);\n eView.setViewingCoordSys(eViewSys);\n }", "public void setPosition(Coordinate coord) {\n this.coordinate = coord;\n }", "public Vector2 localToStageCoordinates(Vector2 localCoords) {\n return internalGroup.localToStageCoordinates(localCoords);\n }", "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "public Coordinates getCoordinatesRelative(Coordinates relativeCoordinates) {\n return this.coordinates.add(relativeCoordinates);\n }", "public Coordinate toLocal(Coordinate deviceGlobalPose){\n\t\tdouble x_delta_mm=x-deviceGlobalPose.x;\n\t\tdouble y_delta_mm=y-deviceGlobalPose.y;\n\t\tdouble a_lc=a-deviceGlobalPose.a;\n\t\t\n\t\tdouble cos=Math.cos(-deviceGlobalPose.a);\n\t\tdouble sin=Math.sin(-deviceGlobalPose.a);\n\t\t\n\t\tdouble x_mm=x_delta_mm*cos-y_delta_mm*sin;\n\t\tdouble y_mm=x_delta_mm*sin+y_delta_mm*cos;\n\t\t\n\t\tdouble x_lc=x_mm*Device.ppmX;\n\t\tdouble y_lc=y_mm*Device.ppmY;\n\t\t\n\t\treturn new Coordinate(x_lc,y_lc,a_lc);\n\t}", "public void setParentAgentcy(String parentAgentcy) {\r\n this.parentAgentcy = parentAgentcy == null ? null : parentAgentcy.trim();\r\n }", "@Override\r\n public Object clone() {\r\n\r\n Coordinate c = new Coordinate( this );\r\n return c;\r\n }", "public CoordPoint convertTouchCoordinates(CoordPoint coors) {\n float xtmp = coors.px * ((float) mCanvas.getWidth() / mIndoorMap.getRight());\n float ytmp = coors.py * ((float) mCanvas.getHeight() / mIndoorMap.getBottom());\n return new CoordPoint(xtmp, ytmp);\n }", "org.hl7.fhir.Integer getCoordinateSystem();", "public void setParentLocationId(Integer parentLocationId) {\n this.parentLocationId = parentLocationId;\n }", "private void setOriginNode() {\n double sumX = 0;\n double sumY = 0;\n Iterator<Point> it = _elements.iterator();\n while (it.hasNext()) {\n Point p = it.next();\n sumX += x(p);\n sumY += y(p);\n }\n _nodeOrigin[0] = sumX / _elements.size();\n _nodeOrigin[1] = sumY / _elements.size();\n }", "protected RobotCoordinates getRobotCoordinates() { return currentPos; }", "private Building convertCardToBuildingByCoordinates(int cardNodeX, int cardNodeY, int buildingNodeX,\n int buildingNodeY) {\n return world.convertCardToBuildingByCoordinates(cardNodeX, cardNodeY, buildingNodeX, buildingNodeY);\n }", "public void transform() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < 1; i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inheritTransformation(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t}\n\t\t}\n\t}", "public GUIElement(int x, int y, int width, int height, GUIElement parent, boolean canParent, int location) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tthis.canParent = canParent;\n\t\tthis.canChild = true;\n\t\tif(canParent) childrens = new ArrayList<GUIElement>();\n\t\tif(parent == null){\n\t\t\tGUIManager.add(this, location);\n\t\t\tthis.location = location;\n\t\t}\n\t\telse{\n\t\t\tthis.location = parent.getLocation();\n\t\t\tthis.parent = parent;\n\t\t\tparent.addChild(this);\n\t\t}\n\t}", "public Coordinates getCoordinates()\r\n {\r\n return new Coordinates(r.getX(), r.getY());\r\n }", "public Coordinate() {\n this.xCoordinate = -1;\n this.yCoordinate = -1;\n }", "public void setCoord(Coords coord) {\r\n\t\tthis.coord = coord;\r\n\t}", "protected int coordinateToVertex(Coordinates coordinates) {\n return mapSize * (mapSize - 1) - coordinates.getY() * mapSize + coordinates.getX();\n\t}", "public GridCoord getCoord() {\n return coord;\n }", "public void setLocation(Coordinate coordinate);", "public String getCoordsForLP() {\n String x = coords[0] < 0 ? \"neg\" + Math.abs(coords[0]) :\n Integer.toString(Math.abs(coords[0]));\n String y = coords[1] < 0 ? \"neg\" + Math.abs(coords[1]) :\n Integer.toString(Math.abs(coords[1]));\n return x + \"_\" + y;\n }", "PositionedObject(){\n float x = DrawingHelper.getGameViewWidth()/2;\n float y = DrawingHelper.getGameViewHeight()/2;\n _position.set(x,y);\n }", "void addCoordinateSystem(CoordinateSystem cs);", "public static int getCoords()\n\t{\n\t\treturn moveCoords;\n\t}", "@Test\n public void testSetLocation_Coordinates() {\n System.out.println(\"setLocation\");\n Coordinates newLocation = new Coordinates(100,100);\n Enemy instance = new SuperEnemy(new Coordinates(220,220));\n instance.setLocation(newLocation);\n Coordinates expResult = new Coordinates(100, 100);\n Coordinates result = instance.getLocation();\n assertEqualsC(expResult,result);\n }", "public ArrayList<Coordinate> getCoordinates() {\n return coordinates;\n }", "public Position getPos() {\n\t\treturn coords;\n\t}", "@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}", "public static int[] convertToCartesian(GeoCoords coords) {\n int[] res = new int[2];\n\n res[1] = latToX(coords.getLat());\n res[0] = lonToY(coords.getLon());\n\n return res;\n }", "public double[] getCoordinates() {\n \tdouble []coords = this.position.getCoordinates();\n \tthis.currentX = coords[0];\n \tthis.currentY = coords[1];\n \treturn coords;\n }", "private void setPositions(float dx, float dy) {\n\n // prevent the point to be drag outside of the parent layout on the X axis\n if (getX() + dx + 2 * POINT_RADIUS >= ((View) getParent()).getWidth())\n setX(((View) getParent()).getWidth() - 2 * POINT_RADIUS);\n else if (getX() + dx < 0)\n setX(0);\n else\n setX(getX() + dx);\n\n\n // prevent the point to be drag outside of the parent layout on the Y axis\n if (getY() + dy + 2 * POINT_RADIUS > ((View) getParent()).getHeight())\n setY(((View) getParent()).getHeight() - 2 * POINT_RADIUS);\n else if (getY() + dy < 0)\n setY(0);\n else\n setY(getY() + dy);\n\n }", "@Override\r\n public Point getRelatedSceneLocation() {\r\n return getLocationPoint(locationRatio);\r\n }", "public CoordinateSystem getCoordinateSystem() {\n System.out.println(\"BaseCatalog: getCoordinateSystem() \");\n CoordinateSystem cs = null;\n if (_layout.getMapElementCount() >0 ) {\n MapElement mapEle = (MapElement)_layout.getMapElements().next();\n cs = mapEle.getMap().getCoordinateSystem();\n }\n System.out.println(\"BaseCatalog: getCoordinateSystem() \" + cs);\n return cs;\n }", "static Posn translate ( Posn p, double dx, double dy ) {\n\t// return .... ;\n\t// Take stock\n\t// return ... p ... dx ... dy ; // <- We know this from Posn p\n\t// return new Posn ( ... p.x ... p.y ... dx ... dy ); // <- We know this from Posn translate\n\t// return new Posn ( ... p.x ... p.y ... dx ... dy, ... p.x ... p.y ... dx ... dy );\t\n\treturn new Posn ( p.x + dx, p.y + dy );\t\n }", "public void moveToOrigin() {\n for(Waypoint waypoint : path)\n waypoint.setCoordinates(waypoint.getX() - path.get(0).getX(),\n waypoint.getY() - path.get(0).getY());\n }", "private Point[] inverseTransformCoordinateSystem(Point[] objectPosition, Point centerOffset) {\n\t\tPoint[] transformedObjectPosition = objectPosition;\n\t\tfor(int i = 0; i < objectPosition.length; i++) {\n\t\t\tobjectPosition[i].set(new double[] {\n\t\t\t\tobjectPosition[i].x += centerOffset.x,\n\t\t\t\tobjectPosition[i].y += centerOffset.y\t\t\t\t\t\n\t\t\t});\n\t\t}\n\t\t\n\t\treturn transformedObjectPosition;\n\t}", "@Override\n\t\t\tpublic Vector getPosition() {\n\t\t\t\treturn new Vector(-2709.487, -4281.02, 3861.564); //-4409.0, 2102.0, -4651.0);\n\t\t\t}", "private boolean placeNear(Organism parent) {\n\t\tint nPos = Utils.random.nextInt(8);\n\t\t// Try to put it in any possible position, starting from a randomly chosen one.\n\t\tfor (int nSide = 0; nSide < 8; nSide++) {\n\t\t\t// Calculate candidate position\n\t\t\t_dCenterX = parent._dCenterX + (parent.width / 2 + width / 2+ 1) * Utils.side[nPos][0]; \n\t\t\t_dCenterY = parent._dCenterY + (parent.height / 2 + height / 2 + 1) * Utils.side[nPos][1];\n\t\t\t_centerX = (int) _dCenterX;\n\t\t\t_centerY = (int) _dCenterY;\n\t\t\tcalculateBounds(true);\n\t\t\t// Check this position is inside the world.\n\t\t\tif (isInsideWorld()) {\n\t\t\t\t// Check that it doesn't overlap with other organisms.\n\t\t\t\tif (_world.fastCheckHit(this) == null) {\n\t\t\t\t\tif (parent._geneticCode.getDisperseChildren()) {\n\t\t\t\t\t\tdx = Utils.side[nPos][0];\n\t\t\t\t\t\tdy = Utils.side[nPos][1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdx = parent.dx;\n\t\t\t\t\t\tdy = parent.dy;\n\t\t\t\t\t}\n\t\t\t\t\t// Generate an identification\n\t\t\t\t\t_ID = _world.getNewId();\n\t\t\t\t\t// Substract the energy from the parent\n\t\t\t\t\tparent._energy -= _energy;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnPos = (nPos + 1) % 8;\n\t\t}\n\t\t// It can't be placed.\n\t\treturn false;\n\t}" ]
[ "0.55993205", "0.55398196", "0.54619783", "0.53170615", "0.52905345", "0.52264655", "0.51915383", "0.51585203", "0.5158076", "0.5152906", "0.5028245", "0.5020329", "0.5015014", "0.4957261", "0.4922994", "0.4922387", "0.48934907", "0.48777425", "0.48669147", "0.48567516", "0.4823868", "0.4804967", "0.48019096", "0.48002568", "0.4791792", "0.47720075", "0.47665432", "0.47237426", "0.4706521", "0.46953267", "0.4693894", "0.46763396", "0.4668955", "0.46679455", "0.46644792", "0.46608", "0.4652147", "0.4642586", "0.46340337", "0.4623778", "0.46194935", "0.4616093", "0.4610325", "0.46032998", "0.45976377", "0.45928705", "0.45916575", "0.45907786", "0.45832258", "0.45809227", "0.45795664", "0.45785877", "0.4569179", "0.4566592", "0.45514947", "0.45426732", "0.45388412", "0.45254162", "0.45181382", "0.45123848", "0.45093957", "0.4505695", "0.44994387", "0.44963172", "0.447789", "0.44765553", "0.44742367", "0.44714028", "0.44691277", "0.4466427", "0.4463453", "0.44630006", "0.446143", "0.4453835", "0.44522455", "0.44521165", "0.444812", "0.44479054", "0.44473585", "0.4441703", "0.44403607", "0.44373876", "0.44348028", "0.44324476", "0.44283137", "0.44207785", "0.44202936", "0.4413959", "0.44102055", "0.4403038", "0.44014746", "0.4399315", "0.43934584", "0.43872273", "0.43866447", "0.43866056", "0.43860877", "0.4385993", "0.43788528", "0.43763763" ]
0.6742682
0
Adds the specified size to the current size.
public void sizeBy(float size) { internalGroup.sizeBy(size); dataTrait.width = internalGroup.getWidth(); dataTrait.height = internalGroup.getHeight(); resetSprite(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addSize(double edgeSize)\r\n\t{\r\n\t\tsize= size + edgeSize;\r\n\t}", "public Size plus(Size other) {\n if (isZero()) {\n return other;\n } else if (other.isZero()) {\n return this;\n } else {\n return new Size(mJavaSize + other.mJavaSize,\n mRegisteredNativeSize + other.mRegisteredNativeSize);\n }\n }", "public abstract void adjustSize(long size);", "public void sizeIncrease1() {\n\t\t _size++;\n\t}", "public void addSizeModfier(int newSize) {\n\t\tif (size != null) {\n\t\t\tthrow new IllegalStateException(\"Multiple font sizes specified\");\n\t\t}\n\t\tthis.size = newSize;\n\t}", "public void increaseSize(int size) {\n int arraySize = container.length;\n if (size > arraySize) {\n int newSize = arraySize * 2;\n container = Arrays.copyOf(container, newSize);\n }\n }", "public Size plusRegisteredNativeSize(long size) {\n return new Size(mJavaSize, mRegisteredNativeSize + size);\n }", "protected void addPC(final int size) {\r\n this.pc += size;\r\n }", "public void add(Object o) {\n\t\tadd(size, o);\n\t}", "private void growSize() {\n size++;\n\n if (size > maxSize) {\n if (keys.length == Integer.MAX_VALUE) {\n throw new IllegalStateException(\"Max capacity reached at size=\" + size);\n }\n\n // Double the capacity.\n rehash(keys.length << 1);\n }\n }", "public void resize(final int size)\n\t{\n\t\t// get the difference\n\t\tint intDifference = size - bytes.length;\n\t\t\n\t\t// check to see if the difference is positive\n\t\tif (intDifference > 0)\n\t\t{\n\t\t\t// add to the size of this byte array\n\t\t\tappend(new byte[intDifference]);\n\t\t}\n\t\t// check to see if the difference is negative\n\t\telse if (intDifference < 0)\n\t\t{\n\t\t\tbytes = subArray(0, size).getBytes();\n\t\t}\n\t}", "@Override\n // worst-case complexity: O(n), since it might need to resize itself\n // amortised average-case complexity: O(1), since resizing happens too\n // too infrequent to affect the actual complexity\n public void add(T item) {\n if (size >= arr.length)\n arr = resize(arr, EXPAND_FACTOR);\n // we add the item to the end and then increment the size\n arr[size++] = item;\n }", "public void add(E e) {\n resize();\n list[size] = e;\n size++;\n }", "private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}", "public void setSize(int _size)\r\n {\r\n size = _size;\r\n }", "public void AddData(byte [] data, int size)\n\t{\t\n\t\tif (mBufferIndex + size > mBufferSize)\n\t\t{\n\t\t\tUpgradeBufferSize();\n\t\t}\n\t\t\n\t\tSystem.arraycopy(data, 0, mBuffer, mBufferIndex, size);\n\t\tmBufferIndex += size;\n\t}", "public void setSize(long size) {\r\n\t\tthis.size = size;\r\n\t}", "public void setSize(int size) {\r\n this.size = size;\r\n }", "@Override\n public void add(Object e) {\n if (currentSize == this.container.length - 1) {\n Object[] newArray = new Object[capacity * 2];\n capacity *= 2;\n System.arraycopy(this.container, 0, newArray, 0, currentSize);\n this.container = newArray;\n }\n container[currentSize++] = e;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\t _size = size;\n\t}", "public void add(T e){\n ensureCapacity(size + 1);\n data[size++] = e;\n }", "public void setSize(int size) {\r\n _size = size;\r\n }", "public void setSize(RMSize aSize) { setSize(aSize.width, aSize.height); }", "public void setSize(int size){\n this.size = size;\n }", "public void addLength(int num) {\r\n this.length += num;\r\n }", "public void add(E s) {\n expandCapacity();\n this.elements[this.size] = s;\n this.size += 1;\n }", "public void setSize(int size);", "public void setSize(Integer size) {\n this.size = size;\n }", "private void addSizeArray() {\n int doubleSize = this.container.length * 2;\n Object[] newArray = new Object[doubleSize];\n System.arraycopy(this.container, 0, newArray, 0, this.container.length);\n this.container = new Object[doubleSize];\n System.arraycopy(newArray, 0, this.container, 0, doubleSize);\n }", "long sizeInc() {\n\t\treturn Storage.adrToOffset(adr) + size;\n\t}", "public void setSize(double size) \n {\n this.size = size;\n }", "@Override\n\tpublic void add(Object value) {\n\t\tinsert(value, size);\n\t}", "public void setSize(int newSize);", "public void setSize(int newSize);", "public void increaseSize(int delta){\n\t\tif(scale < scaleMax)\n\t\t\tscale += enlarge * delta;\n\t}", "private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }", "void add(int value) {\n size++;\n\n int[] newItems = new int[size];\n\n System.arraycopy(items, 0, newItems, 0, items.length);\n\n newItems[newItems.length - 1] = value;\n\n items = newItems;\n }", "public void add(int value) {\n\t \tensureCapacity(size+ 1);\n\t \telementData[size] = value;\n\t \tsize++;\n\t }", "@Override\n\tpublic boolean add(Object e)\n\t{\n\t\tif (size == myArray.length)\n\t\t\tresizeUp();\n\t\tmyArray[size] = e;\n\t\tsize++;\n\t\treturn false;\n\t}", "public void add(T value) {\n extend();\n this.list[size]=value;\n this.size++;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T value) {\n\t\t// Append an element to the end of the storage.\n\t\t// Double the capacity if no space available.\n\t\t// Amortized O(1)\n\n\t\tif (size == capacity()) {\n\t\t\tT newData[] = (T[]) new Object[2 * capacity()];\n\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tnewData[i] = data[i];\n\t\t\t}\n\t\t\tdata = newData;\n\t\t}\n\n\t\tdata[size] = value;\n\t\tsize++;\n\t}", "public void setSize(TSizeInBytes size) {\n\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\tthis.sizeNumber = sizeNumber;\r\n}", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final Builder size(long size) {\n this.size = size;\n return this;\n }", "public void setSize(PlayerSize size) {\n if (size == this.size) {\n return; // Return, already sized like that\n }\n\n PlayerSize oldSize = this.size;\n this.size = size;\n\n updateSizeSafely(getView());\n\n if (mListener != null) {\n mListener.onPlayerSizeChanged(size, oldSize);\n }\n }", "public double adjustSize(double sizePoint){\n return sizePoint*facteurSize;\n }", "public void setSize(String size) {\n this.size = size;\n }", "public void increaseSize() {\n Estimate[] newQueue = new Estimate[queue.length * 2];\n\n for (int i = 0; i < queue.length; i++) {\n newQueue[i] = queue[i];\n }\n\n queue = newQueue;\n }", "@Override\n public void add(E value) {\n if (value == null) {\n throw new NullPointerException();\n }\n if (size == capacity) {\n resize();\n }\n array[size] = value;\n siftUp(size);\n size++;\n\n\n }", "public void setLocalSize(int size);", "public boolean add( Object newVal )\n {\n\t//first expand if necessary\n\tif ( _size >= _data.length )\n\t expand();\n\n\t_data[_size] = newVal;\n\t_size++;\n\n\treturn true;\n }", "public void setSize(int size){\n\t\tthis.shipSize = size;\n\t}", "public Point2D adjustSize(Point2D size){\n return size.multiply(facteurSize);\n }", "protected final void multiplySize(float size)\n {\n super.setSize(this.bokoblinWidth * size, this.bokoblinHeight * size);\n }", "public FileObject size(Integer size) {\n this.size = size;\n return this;\n }", "public void set_size(int s);", "@Override\n\tpublic void add(int n) {\n\t\tvalues[size] = n; //add value to the list\n\t\tsize++; //increment size\n\t\tif (size == values.length){ //if the list is full expand it\n\t\t\tresize();\n\t\t}\n\t}", "public void setSizeModifier(Dimension size) {\n\t\tthis.size = size;\n\t}", "private void increaseSize() {\r\n\t\tE[] biggerE = (E[]) new Object[this.capacity * 2];\r\n\t\tdouble[] biggerC = new double[this.capacity * 2];\r\n\t\tfor (int i = 0; i < this.size; i++) {\r\n\t\t\tbiggerE[i] = this.objectHeap[i];\r\n\t\t\tbiggerC[i] = this.costHeap[i];\r\n\t\t}\r\n\t\tthis.costHeap = biggerC;\r\n\t\tthis.objectHeap = biggerE;\r\n\t\tthis.capacity = this.capacity * 2;\r\n\t}", "public void add(final Object value) {\n\t\tif (value == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tif (this.size == this.capacity) {\n\t\t\treallocate();\n\t\t}\n\t\telements[size] = value;\n\t\tsize++;\n\t}", "public void setSize(long value) {\n this.size = value;\n }", "public void setSize(int value) {\n\t\tthis.size = value;\n\t}", "public void setSize(int size) {\n\t members = size;\n\t}", "public void setSize(String size) {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}", "@Override\n\tpublic void insert(SizeDTO sizeDTO) {\n\t\tSize size = new Size();\n\t\tsize.setName(sizeDTO.getName());\n\t\tsizeDao.insert(size);\n\t\tsizeDTO.setId(size.getId());\n\t}", "void add(Point point) {\n\t\tpoints[posit]=point;\n\t\tposit++;\n\t\t//if method add is applied, size should also change\n\t\tsize++;\n\t}", "public void add(E a)\n {\n if (size == data.length) { // if the list is at capacity...\n // create a new, larger array\n E[] newData = (E[])(new Object[2*data.length]);\n \n // copy over all of the old elements\n for (int i = 0; i < size; i++)\n newData[i] = data[i];\n \n // redirect the old data reference\n data = newData;\n }\n\n // insert the new element\n data[size] = a;\n size++;\n }", "private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }", "public Builder setTotalSize(int value) {\n bitField0_ |= 0x00000008;\n totalSize_ = value;\n onChanged();\n return this;\n }", "public void setSize(Dimension size) {\r\n this.size = size;\r\n }", "public void addAudiofileSize(java.lang.Integer value) {\r\n\t\tBase.add(this.model, this.getResource(), AUDIOFILESIZE, value);\r\n\t}", "public void setSize(String size) {\r\n //System.out.print(\"Setting Size...\");\r\n this.Size = size;\r\n }", "@Override\n public void add(T element) {\n add(size(), element);\n }", "public void add(T newEntry) {\r\n add(size(), newEntry);\r\n }", "public static void setHotelSize(int size) {\r\n\t\tfor(int count = 0;count< size; count++) {\r\n\t\t\thotel_size.add(count + 1);\r\n\t\t}\r\n\t}", "private void resizeInternal(int size) {\n // save effort if the size did not change\n if (size == this.inventory.size()) {\n return;\n }\n ItemStackList newInventory = ItemStackList.withSize(size);\n\n for (int i = 0; i < size && i < this.inventory.size(); i++) {\n newInventory.set(i, this.inventory.get(i));\n }\n this.inventory = newInventory;\n }", "@Override\n public void add(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size + 1);\n if (size == data.length) // not enough capacity\n throw new IllegalStateException(\"Array is full\");\n for (int k = size - 1; k >= i; k--) // start by shifting rightmost\n data[k + 1] = data[k];\n data[i] = e; // ready to place the new element\n size++;\n }", "public void sizeHasBeenSet() {\n isSizeSet = true;\n }", "public boolean add(E anEntry){\n if (size == capacity){\n reallocate();\n }\n theData[size] = anEntry;\n size++;\n\n return true;\n }", "@Element \n public void setSize(String size) {\n this.size = size;\n }", "public void setSizeInBits(final int size) {\n\t\tthis.sizeinbits = size;\n\t}", "private void setSize(int s){\n\t\tsize = s;\n\t}", "public void setSize(@Nullable String size) {\n this.size = size;\n }", "public void add( Comparable newVal ) {\n \t//if _data is full, expand the array\n \tif (_size == _data.length){\n\t \texpand();\n \t}\n \t\n\tset(_lastPos + 1, newVal);\n \t//increases _lastPos and _size\n \t_lastPos++;\n \t_size++;\n }", "public void add(E element){\n if(size==capacity){\n capacity *=2;\n E[] array2 = (E[]) new Object[capacity];\n if (size >= 0) System.arraycopy(array, 0, array2, 0, size);\n array2[size]=element;\n array=array2;\n }else{\n array[size]=element;\n }\n size++;\n }", "public void add(Card card) throws DeckSizeException\n {\n deck.add(card);\n if (deck.size()>108)\n {\n throw new DeckSizeException(deck.size());\n }\n }", "public void enlargeSquare()\n {\n squareSize++;\n }", "public ListArrayBasedPlus(int size)\n {\n items = new Object[size];\n numItems = 0;\n }", "public void add( Object value )\n\t{\n\t\tint n = size();\n\t\tif (addIndex >= n)\n\t\t{\n\t\t\tif (n == 0)\n\t\t\t\tn = 8;\n\t\t\telse\n\t\t\t\tn *= 2;\n\t\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), n );\n\t\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\t\tarray = narray;\n\t\t}\n\t\tArray.set( array, addIndex++, value );\n\t}", "public void setSize(Vector2ic size){\n glfwSetWindowSize(handle, size.x(), size.y());\n this.size.set(size);\n sizeMultiplexer.handle(new WindowSizeEvent(handle, size.x(), size.y()));\n }", "@Override\n public int size() {\n return currentSize;\n }", "@Override\n public boolean add(T t) {\n if (size >= 10) {\n data = new Object[(data.length * 3) / 2 + 1];\n data = Arrays.copyOfRange(data, 0, data.length);\n }\n data[size++] = t;\n return true;\n }", "public TarArchiveEntry setEntrySize(long size) {\n if (size < 0) {\n throw new IllegalArgumentException(\"size is out of range: \" + size);\n }\n this.size = size;\n return this;\n }" ]
[ "0.73356074", "0.71455395", "0.6860071", "0.68526745", "0.67649907", "0.6716097", "0.6705688", "0.6413508", "0.6413066", "0.64110273", "0.64054537", "0.6386654", "0.6372688", "0.6312346", "0.6279689", "0.623965", "0.6206313", "0.6182473", "0.6176915", "0.6173217", "0.6173217", "0.61648434", "0.6161656", "0.6161656", "0.6161656", "0.6161656", "0.6161201", "0.61588144", "0.61469954", "0.6146772", "0.61454314", "0.6128566", "0.61125", "0.60901445", "0.6085384", "0.6082621", "0.6081903", "0.60787594", "0.6064792", "0.60643566", "0.60643566", "0.6035597", "0.5993283", "0.59868234", "0.5973946", "0.59597874", "0.59518147", "0.5948586", "0.59196883", "0.5907397", "0.5903613", "0.5902371", "0.58795595", "0.5870694", "0.58607924", "0.58129376", "0.5809339", "0.5752627", "0.57452005", "0.5738022", "0.5715649", "0.5714337", "0.5708695", "0.57050216", "0.5689229", "0.5664649", "0.56642646", "0.5661777", "0.5660894", "0.5654009", "0.5623916", "0.56138325", "0.56001616", "0.5598345", "0.55921835", "0.5584184", "0.55780596", "0.5573422", "0.55621225", "0.554875", "0.55381155", "0.5532755", "0.5530869", "0.552881", "0.55287504", "0.55285674", "0.55271786", "0.55220485", "0.55206716", "0.54861844", "0.5478718", "0.54672575", "0.5452963", "0.5448863", "0.5446973", "0.54447454", "0.54429734", "0.5441625", "0.54337156", "0.5420235" ]
0.5646437
70
Adds the specified size to the current size.
public void sizeBy(float width, float height) { internalGroup.sizeBy(width, height); dataTrait.width = internalGroup.getWidth(); dataTrait.height = internalGroup.getHeight(); resetSprite(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addSize(double edgeSize)\r\n\t{\r\n\t\tsize= size + edgeSize;\r\n\t}", "public Size plus(Size other) {\n if (isZero()) {\n return other;\n } else if (other.isZero()) {\n return this;\n } else {\n return new Size(mJavaSize + other.mJavaSize,\n mRegisteredNativeSize + other.mRegisteredNativeSize);\n }\n }", "public abstract void adjustSize(long size);", "public void sizeIncrease1() {\n\t\t _size++;\n\t}", "public void addSizeModfier(int newSize) {\n\t\tif (size != null) {\n\t\t\tthrow new IllegalStateException(\"Multiple font sizes specified\");\n\t\t}\n\t\tthis.size = newSize;\n\t}", "public void increaseSize(int size) {\n int arraySize = container.length;\n if (size > arraySize) {\n int newSize = arraySize * 2;\n container = Arrays.copyOf(container, newSize);\n }\n }", "public Size plusRegisteredNativeSize(long size) {\n return new Size(mJavaSize, mRegisteredNativeSize + size);\n }", "protected void addPC(final int size) {\r\n this.pc += size;\r\n }", "public void add(Object o) {\n\t\tadd(size, o);\n\t}", "private void growSize() {\n size++;\n\n if (size > maxSize) {\n if (keys.length == Integer.MAX_VALUE) {\n throw new IllegalStateException(\"Max capacity reached at size=\" + size);\n }\n\n // Double the capacity.\n rehash(keys.length << 1);\n }\n }", "public void resize(final int size)\n\t{\n\t\t// get the difference\n\t\tint intDifference = size - bytes.length;\n\t\t\n\t\t// check to see if the difference is positive\n\t\tif (intDifference > 0)\n\t\t{\n\t\t\t// add to the size of this byte array\n\t\t\tappend(new byte[intDifference]);\n\t\t}\n\t\t// check to see if the difference is negative\n\t\telse if (intDifference < 0)\n\t\t{\n\t\t\tbytes = subArray(0, size).getBytes();\n\t\t}\n\t}", "@Override\n // worst-case complexity: O(n), since it might need to resize itself\n // amortised average-case complexity: O(1), since resizing happens too\n // too infrequent to affect the actual complexity\n public void add(T item) {\n if (size >= arr.length)\n arr = resize(arr, EXPAND_FACTOR);\n // we add the item to the end and then increment the size\n arr[size++] = item;\n }", "public void add(E e) {\n resize();\n list[size] = e;\n size++;\n }", "private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}", "public void setSize(int _size)\r\n {\r\n size = _size;\r\n }", "public void AddData(byte [] data, int size)\n\t{\t\n\t\tif (mBufferIndex + size > mBufferSize)\n\t\t{\n\t\t\tUpgradeBufferSize();\n\t\t}\n\t\t\n\t\tSystem.arraycopy(data, 0, mBuffer, mBufferIndex, size);\n\t\tmBufferIndex += size;\n\t}", "public void setSize(long size) {\r\n\t\tthis.size = size;\r\n\t}", "public void setSize(int size) {\r\n this.size = size;\r\n }", "@Override\n public void add(Object e) {\n if (currentSize == this.container.length - 1) {\n Object[] newArray = new Object[capacity * 2];\n capacity *= 2;\n System.arraycopy(this.container, 0, newArray, 0, currentSize);\n this.container = newArray;\n }\n container[currentSize++] = e;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\t _size = size;\n\t}", "public void add(T e){\n ensureCapacity(size + 1);\n data[size++] = e;\n }", "public void setSize(int size) {\r\n _size = size;\r\n }", "public void setSize(RMSize aSize) { setSize(aSize.width, aSize.height); }", "public void setSize(int size){\n this.size = size;\n }", "public void addLength(int num) {\r\n this.length += num;\r\n }", "public void add(E s) {\n expandCapacity();\n this.elements[this.size] = s;\n this.size += 1;\n }", "public void setSize(int size);", "public void setSize(Integer size) {\n this.size = size;\n }", "private void addSizeArray() {\n int doubleSize = this.container.length * 2;\n Object[] newArray = new Object[doubleSize];\n System.arraycopy(this.container, 0, newArray, 0, this.container.length);\n this.container = new Object[doubleSize];\n System.arraycopy(newArray, 0, this.container, 0, doubleSize);\n }", "long sizeInc() {\n\t\treturn Storage.adrToOffset(adr) + size;\n\t}", "public void setSize(double size) \n {\n this.size = size;\n }", "@Override\n\tpublic void add(Object value) {\n\t\tinsert(value, size);\n\t}", "public void setSize(int newSize);", "public void setSize(int newSize);", "public void increaseSize(int delta){\n\t\tif(scale < scaleMax)\n\t\t\tscale += enlarge * delta;\n\t}", "private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }", "void add(int value) {\n size++;\n\n int[] newItems = new int[size];\n\n System.arraycopy(items, 0, newItems, 0, items.length);\n\n newItems[newItems.length - 1] = value;\n\n items = newItems;\n }", "public void add(int value) {\n\t \tensureCapacity(size+ 1);\n\t \telementData[size] = value;\n\t \tsize++;\n\t }", "@Override\n\tpublic boolean add(Object e)\n\t{\n\t\tif (size == myArray.length)\n\t\t\tresizeUp();\n\t\tmyArray[size] = e;\n\t\tsize++;\n\t\treturn false;\n\t}", "public void add(T value) {\n extend();\n this.list[size]=value;\n this.size++;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T value) {\n\t\t// Append an element to the end of the storage.\n\t\t// Double the capacity if no space available.\n\t\t// Amortized O(1)\n\n\t\tif (size == capacity()) {\n\t\t\tT newData[] = (T[]) new Object[2 * capacity()];\n\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tnewData[i] = data[i];\n\t\t\t}\n\t\t\tdata = newData;\n\t\t}\n\n\t\tdata[size] = value;\n\t\tsize++;\n\t}", "public void setSize(TSizeInBytes size) {\n\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\tthis.sizeNumber = sizeNumber;\r\n}", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final Builder size(long size) {\n this.size = size;\n return this;\n }", "public void setSize(PlayerSize size) {\n if (size == this.size) {\n return; // Return, already sized like that\n }\n\n PlayerSize oldSize = this.size;\n this.size = size;\n\n updateSizeSafely(getView());\n\n if (mListener != null) {\n mListener.onPlayerSizeChanged(size, oldSize);\n }\n }", "public double adjustSize(double sizePoint){\n return sizePoint*facteurSize;\n }", "public void setSize(String size) {\n this.size = size;\n }", "public void increaseSize() {\n Estimate[] newQueue = new Estimate[queue.length * 2];\n\n for (int i = 0; i < queue.length; i++) {\n newQueue[i] = queue[i];\n }\n\n queue = newQueue;\n }", "@Override\n public void add(E value) {\n if (value == null) {\n throw new NullPointerException();\n }\n if (size == capacity) {\n resize();\n }\n array[size] = value;\n siftUp(size);\n size++;\n\n\n }", "public void setLocalSize(int size);", "public boolean add( Object newVal )\n {\n\t//first expand if necessary\n\tif ( _size >= _data.length )\n\t expand();\n\n\t_data[_size] = newVal;\n\t_size++;\n\n\treturn true;\n }", "public void setSize(int size){\n\t\tthis.shipSize = size;\n\t}", "public Point2D adjustSize(Point2D size){\n return size.multiply(facteurSize);\n }", "protected final void multiplySize(float size)\n {\n super.setSize(this.bokoblinWidth * size, this.bokoblinHeight * size);\n }", "public FileObject size(Integer size) {\n this.size = size;\n return this;\n }", "public void set_size(int s);", "@Override\n\tpublic void add(int n) {\n\t\tvalues[size] = n; //add value to the list\n\t\tsize++; //increment size\n\t\tif (size == values.length){ //if the list is full expand it\n\t\t\tresize();\n\t\t}\n\t}", "public void setSizeModifier(Dimension size) {\n\t\tthis.size = size;\n\t}", "private void increaseSize() {\r\n\t\tE[] biggerE = (E[]) new Object[this.capacity * 2];\r\n\t\tdouble[] biggerC = new double[this.capacity * 2];\r\n\t\tfor (int i = 0; i < this.size; i++) {\r\n\t\t\tbiggerE[i] = this.objectHeap[i];\r\n\t\t\tbiggerC[i] = this.costHeap[i];\r\n\t\t}\r\n\t\tthis.costHeap = biggerC;\r\n\t\tthis.objectHeap = biggerE;\r\n\t\tthis.capacity = this.capacity * 2;\r\n\t}", "public void add(final Object value) {\n\t\tif (value == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tif (this.size == this.capacity) {\n\t\t\treallocate();\n\t\t}\n\t\telements[size] = value;\n\t\tsize++;\n\t}", "public void setSize(long value) {\n this.size = value;\n }", "public void setSize(int value) {\n\t\tthis.size = value;\n\t}", "public void setSize(int size) {\n\t members = size;\n\t}", "public void sizeBy(float size) {\n internalGroup.sizeBy(size);\n dataTrait.width = internalGroup.getWidth();\n dataTrait.height = internalGroup.getHeight();\n resetSprite();\n }", "public void setSize(String size) {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}", "@Override\n\tpublic void insert(SizeDTO sizeDTO) {\n\t\tSize size = new Size();\n\t\tsize.setName(sizeDTO.getName());\n\t\tsizeDao.insert(size);\n\t\tsizeDTO.setId(size.getId());\n\t}", "void add(Point point) {\n\t\tpoints[posit]=point;\n\t\tposit++;\n\t\t//if method add is applied, size should also change\n\t\tsize++;\n\t}", "public void add(E a)\n {\n if (size == data.length) { // if the list is at capacity...\n // create a new, larger array\n E[] newData = (E[])(new Object[2*data.length]);\n \n // copy over all of the old elements\n for (int i = 0; i < size; i++)\n newData[i] = data[i];\n \n // redirect the old data reference\n data = newData;\n }\n\n // insert the new element\n data[size] = a;\n size++;\n }", "private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }", "public Builder setTotalSize(int value) {\n bitField0_ |= 0x00000008;\n totalSize_ = value;\n onChanged();\n return this;\n }", "public void setSize(Dimension size) {\r\n this.size = size;\r\n }", "public void addAudiofileSize(java.lang.Integer value) {\r\n\t\tBase.add(this.model, this.getResource(), AUDIOFILESIZE, value);\r\n\t}", "public void setSize(String size) {\r\n //System.out.print(\"Setting Size...\");\r\n this.Size = size;\r\n }", "@Override\n public void add(T element) {\n add(size(), element);\n }", "public void add(T newEntry) {\r\n add(size(), newEntry);\r\n }", "public static void setHotelSize(int size) {\r\n\t\tfor(int count = 0;count< size; count++) {\r\n\t\t\thotel_size.add(count + 1);\r\n\t\t}\r\n\t}", "private void resizeInternal(int size) {\n // save effort if the size did not change\n if (size == this.inventory.size()) {\n return;\n }\n ItemStackList newInventory = ItemStackList.withSize(size);\n\n for (int i = 0; i < size && i < this.inventory.size(); i++) {\n newInventory.set(i, this.inventory.get(i));\n }\n this.inventory = newInventory;\n }", "@Override\n public void add(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size + 1);\n if (size == data.length) // not enough capacity\n throw new IllegalStateException(\"Array is full\");\n for (int k = size - 1; k >= i; k--) // start by shifting rightmost\n data[k + 1] = data[k];\n data[i] = e; // ready to place the new element\n size++;\n }", "public void sizeHasBeenSet() {\n isSizeSet = true;\n }", "public boolean add(E anEntry){\n if (size == capacity){\n reallocate();\n }\n theData[size] = anEntry;\n size++;\n\n return true;\n }", "@Element \n public void setSize(String size) {\n this.size = size;\n }", "public void setSizeInBits(final int size) {\n\t\tthis.sizeinbits = size;\n\t}", "private void setSize(int s){\n\t\tsize = s;\n\t}", "public void setSize(@Nullable String size) {\n this.size = size;\n }", "public void add( Comparable newVal ) {\n \t//if _data is full, expand the array\n \tif (_size == _data.length){\n\t \texpand();\n \t}\n \t\n\tset(_lastPos + 1, newVal);\n \t//increases _lastPos and _size\n \t_lastPos++;\n \t_size++;\n }", "public void add(E element){\n if(size==capacity){\n capacity *=2;\n E[] array2 = (E[]) new Object[capacity];\n if (size >= 0) System.arraycopy(array, 0, array2, 0, size);\n array2[size]=element;\n array=array2;\n }else{\n array[size]=element;\n }\n size++;\n }", "public void add(Card card) throws DeckSizeException\n {\n deck.add(card);\n if (deck.size()>108)\n {\n throw new DeckSizeException(deck.size());\n }\n }", "public void enlargeSquare()\n {\n squareSize++;\n }", "public ListArrayBasedPlus(int size)\n {\n items = new Object[size];\n numItems = 0;\n }", "public void add( Object value )\n\t{\n\t\tint n = size();\n\t\tif (addIndex >= n)\n\t\t{\n\t\t\tif (n == 0)\n\t\t\t\tn = 8;\n\t\t\telse\n\t\t\t\tn *= 2;\n\t\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), n );\n\t\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\t\tarray = narray;\n\t\t}\n\t\tArray.set( array, addIndex++, value );\n\t}", "public void setSize(Vector2ic size){\n glfwSetWindowSize(handle, size.x(), size.y());\n this.size.set(size);\n sizeMultiplexer.handle(new WindowSizeEvent(handle, size.x(), size.y()));\n }", "@Override\n public int size() {\n return currentSize;\n }", "@Override\n public boolean add(T t) {\n if (size >= 10) {\n data = new Object[(data.length * 3) / 2 + 1];\n data = Arrays.copyOfRange(data, 0, data.length);\n }\n data[size++] = t;\n return true;\n }", "public TarArchiveEntry setEntrySize(long size) {\n if (size < 0) {\n throw new IllegalArgumentException(\"size is out of range: \" + size);\n }\n this.size = size;\n return this;\n }" ]
[ "0.73356074", "0.71455395", "0.6860071", "0.68526745", "0.67649907", "0.6716097", "0.6705688", "0.6413508", "0.6413066", "0.64110273", "0.64054537", "0.6386654", "0.6372688", "0.6312346", "0.6279689", "0.623965", "0.6206313", "0.6182473", "0.6176915", "0.6173217", "0.6173217", "0.61648434", "0.6161656", "0.6161656", "0.6161656", "0.6161656", "0.6161201", "0.61588144", "0.61469954", "0.6146772", "0.61454314", "0.6128566", "0.61125", "0.60901445", "0.6085384", "0.6082621", "0.6081903", "0.60787594", "0.6064792", "0.60643566", "0.60643566", "0.6035597", "0.5993283", "0.59868234", "0.5973946", "0.59597874", "0.59518147", "0.5948586", "0.59196883", "0.5907397", "0.5903613", "0.5902371", "0.58795595", "0.5870694", "0.58607924", "0.58129376", "0.5809339", "0.5752627", "0.57452005", "0.5738022", "0.5715649", "0.5714337", "0.5708695", "0.57050216", "0.5689229", "0.5664649", "0.56642646", "0.5661777", "0.5660894", "0.5654009", "0.5646437", "0.5623916", "0.56138325", "0.56001616", "0.5598345", "0.55921835", "0.5584184", "0.55780596", "0.5573422", "0.55621225", "0.554875", "0.55381155", "0.5532755", "0.5530869", "0.552881", "0.55287504", "0.55285674", "0.55271786", "0.55220485", "0.55206716", "0.54861844", "0.5478718", "0.54672575", "0.5452963", "0.5448863", "0.5446973", "0.54447454", "0.54429734", "0.5441625", "0.54337156", "0.5420235" ]
0.0
-1
Changes the zorder for this actor so it is in back of all siblings.
public void toBack() { internalGroup.toBack(); dataTrait.zIndex = internalGroup.getZIndex(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "void setZOrder(int order, Object source);", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n dialog.setPadding(new Insets(0,0,0,7));\n }", "public void setZIndex(int newZIndex)\n {\n zIndex = newZIndex;\n \n if (parent != null)\n {\n parent.onZIndexChanged(this);\n }\n }", "public void toFront() {\n internalGroup.toFront();\n dataTrait.zIndex = internalGroup.getZIndex();\n }", "private void backObject() {\n\t\tif(this.curr_obj != null) {\n this.curr_obj.uMoveToBack();\n }\n\t}", "public void postOrderTraversal() {\n beginAnimation();\n treePostOrderTraversal(root);\n stopAnimation();\n\n }", "public void back() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null)\n\t return;\n\n\tif (!crossLocation.isEmpty()) {\n\t\t\n\t crossLocation.pop();\n\n\t //back\n\t ArrayList<Location> lastNode = crossLocation.peek();\n\t next = lastNode.get(0);\n\t}\n\n\tLocation loc = getLocation();\n\t\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\t\n\tint counter = dirCounter.get(getDirection());\n\tdirCounter.put(getDirection(), --counter);\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n }", "void reverseTurnOrder() {\n turnOrder *= -1;\n }", "static void changeDirectionBackwards() {\n\n if(--direction == -1)\n direction = 3;\n }", "public void flip() {\n flipRecur(root);\n }", "public void changeViewOrder(SingleView singleView, boolean z) {\n this.mLayoutAdapter.changeViewOrder(singleView, z);\n }", "protected void restoreSelf() {\n if (removed && parentNode != null && componentNode != null) {\n // Add self back BEFORE sibling (keeps original order)\n parentNode.insertBefore(componentNode, siblingNode);\n // Reset removed flag\n removed = false;\n }\n }", "public void decrementOrder() {\n mOrder--;\n }", "public void toFront() {\n WindowPeer peer = (WindowPeer) this.peer;\n if (peer != null) {\n peer.toFront();\n }\n }", "public void setFixedZdepth(int expectedZIndex);", "private void moveBack(){\r\n\t\tturnAround();\r\n\t\tmove();\r\n\t}", "private void putToTop()\r\n {\r\n OrderManager manager = myOrderManagerRegistry.getOrderManager(ourKey);\r\n manager.activateParticipant(ourKey);\r\n manager.moveToTop(ourKey);\r\n }", "@Override\r\n\tpublic void setZIndex(int index) {\n\t\t\r\n\t}", "public void bringToFront()\n {\n this.toFront();\n }", "void FlipBook()\r\n\t\t{\r\n\t\t\t Collections.reverse(this);\r\n\t\t}", "public void postorder() {\n\t\tpostorder(root);\n\t}", "@Override\r\n\tpublic void undo() \r\n\t\t{\n\t\tif (parent.addChild(child)) \r\n\t\t\t{\r\n\t\t\taddArcs(sourceArcs);\r\n\t\t\taddArcs(targetArcs);\r\n\t\t\t}\r\n\t\t}", "public void updateDrawingOrder(){\n\n //get all actors in the objectStage\n Array<Actor> actorsList = objectStage.getActors();\n actorsList.sort(new ActorComparator());\n }", "public void preOrderTraversal() {\n beginAnimation();\n treePreOrderTraversal(root);\n stopAnimation();\n\n }", "void decrementOldDepth() {\n mOldDepth--;\n }", "private void turnOverItself() {\n byte tmp = leftEdge;\n leftEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n\n tmp = rightEdge;\n rightEdge = reversedLeftEdge;\n reversedLeftEdge = tmp;\n\n tmp = topEdge;\n topEdge = reversedTopEdge;\n reversedTopEdge = tmp;\n\n tmp = botEdge;\n botEdge = reversedBotEdge;\n reversedBotEdge = tmp;\n\n tmp = ltCorner;\n ltCorner = rtCorner;\n rtCorner = tmp;\n\n tmp = lbCorner;\n lbCorner = rbCorner;\n rbCorner = tmp;\n }", "public void postorder()\n {\n postorder(root);\n }", "public void postorder()\n {\n postorder(root);\n }", "private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}", "public void toBack() {\n WindowPeer peer = (WindowPeer) this.peer;\n if (peer != null) {\n peer.toBack();\n }\n }", "public void assignStackOrdering() {\n this.mTaskStackContainers.assignStackOrdering(getPendingTransaction());\n }", "public void setZ(int value)\n\t{\n\t\tgetWorldPosition().setZ(value);\n\t}", "private void frontObject() {\n\t\tif(this.curr_obj != null) {\n this.curr_obj.uMoveToFront();\n\t\t}\n\t}", "public void frontDown(){\n frontSolenoid.set(DoubleSolenoid.Value.kReverse);\n }", "public void flip() {\r\n\t\tObject[] bak = path.toArray(new Direction[path.size()]);\r\n\t\tpath.clear();\r\n\t\tfor (int i = bak.length-1; i >= 0; i--) {\r\n\t\t\tpath.push((Direction) bak[i]);\r\n\t\t}\r\n\t}", "void frontInv() {\n startAnimation(frontSubCubes(), Axis.Z, Direction.ANTICLOCKWISE);\n frontCubeSwap();\n frontCubeSwap();\n frontCubeSwap();\n }", "public void bringSimpleMapToBack()\n\t{\n\t\tthis.openLayersMap.setStyleName(\"blipnip-gwt-Menu-Map-Back\");\n\t\t//this.openLayersMap.getElement().getStyle().setZIndex(-1); \n\t\t//this.openLayersMap.getElement().getFirstChildElement().getStyle().setZIndex(-1); // \n\t}", "void updateAllParentsBelow();", "public void postOrder() {\n postOrder(root);\n }", "public void postorder()\r\n {\r\n postorder(root);\r\n }", "int getZOrder();", "public void inOrderTraversal() {\n beginAnimation();\n treeInOrderTraversal(root);\n stopAnimation();\n\n }", "public void setPrevious()\n {\n\tint currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex -1);\n\t\n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = lastObject;\n }", "public void act(){\n // Removing object, if out of the simulated zone\n if (atWorldEdge()){\n getWorld().removeObject(this);\n return;\n }\n\n //Move Thanos up\n setLocation (getX(), getY() - speed);\n }", "void decrementNewDepth() {\n mNewDepth--;\n }", "void changeOrder(GeometricalObject object, int offset);", "void changeOrder(GeometricalObject object, int offset);", "public void reset() {\n setPrimaryDirection(-1);\n setSecondaryDirection(-1);\n flags.reset();\n setResetMovementQueue(false);\n setNeedsPlacement(false);\n }", "public void PostOrder() {\n\t\tPostOrder(root);\n\t}", "public void reverse() {\n\t\tif (!this.isEmpty()) {\n\t\t\tT x = this.peek();\n\t\t\tthis.pop();\n\t\t\treverse();\n\t\t\tinsert_at_bottom(x);\n\t\t} else\n\t\t\treturn;\n\t}", "@Override // com.android.server.wm.WindowContainer\n public void assignChildLayers(SurfaceControl.Transaction t) {\n assignStackOrdering(t);\n for (int i = 0; i < this.mChildren.size(); i++) {\n ((TaskStack) this.mChildren.get(i)).assignChildLayers(t);\n }\n }", "void bottomInv() {\n startAnimation(bottomSubCubes(), Axis.Y, Direction.CLOCKWISE);\n bottomCubeSwap();\n bottomCubeSwap();\n bottomCubeSwap();\n }", "public void backDown(){\n backSolenoid.set(DoubleSolenoid.Value.kReverse);\n }", "private void turnAround() {\r\n this.setCurrentDirection(-getCurrentDirection());\r\n }", "void topInv() {\n startAnimation(topSubCubes(), Axis.Y, Direction.ANTICLOCKWISE);\n topCubeSwap();\n topCubeSwap();\n topCubeSwap();\n }", "public void setTop() {\n reset(State.TOP);\n }", "public void changeOrder(GeometricalObject object, int offset);", "public void decreaseDepth() {\n currentDepth--;\n }", "@Override\r\n\tpublic void reset() {\n\t\tposition.set(0, 0);\r\n\t\talive = false;\r\n\t}", "public void resetReversePoison() {\n\n Set<AS> prevAdvedTo = this.adjOutRib.get(this.asn * -1);\n\n if (prevAdvedTo != null) {\n for (AS pAS : prevAdvedTo) {\n pAS.withdrawPath(this, this.asn * -1);\n }\n }\n\n this.adjOutRib.remove(this.asn * -1);\n\n this.botSet = new HashSet<>();\n }", "public void reverseLastTranslation() {\r\n this.translate(-lastDx,-lastDy);\r\n }", "@Override\n public void undo() {\n node.toggleBoundaryMarker();\n }", "public void resetParents() {\r\n }", "public void shiftDown() {\n\t\tif (prev == null) {\n\t\t\tthrow new IllegalStateException(\"Cannot shift \" + this + \" down because it is already at the bottom\");\n\t\t}\n\t\tDependencyElement p = prev;\n\t\tDependencyElement pp = prev.prev;\n\t\tif (pp != null) {\n\t\t\tpp.next = this;\n\t\t\tprev = pp;\n\t\t}\n\t\telse {\n\t\t\tprev = null;\n\t\t}\n\t\tp.prev = this;\n\t\tp.next = next;\n\t\tnext = p;\n\t}", "public void childrenReordered(EObject parent) {\n\t\t\t\tviewReferencesReordered();\r\n\t\t\t}", "void front() {\n startAnimation(frontSubCubes(), Axis.Z, Direction.CLOCKWISE);\n frontCubeSwap();\n }", "public void prev()\n {\n if (mHistoryIdx == 0) {\n return;\n }\n\n mCommandList.get(--mHistoryIdx).undo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }", "@Override\r\n\tpublic void setOrder(int order){\r\n\t\tthis.head.setOrder(order);\r\n\t}", "public void assignStackOrdering(SurfaceControl.Transaction t) {\n int layer;\n int layer2;\n SurfaceControl surfaceControl;\n SurfaceControl surfaceControl2;\n int HOME_STACK_STATE = 0;\n int layer3 = 0;\n int layerForAnimationLayer = 0;\n int layerForBoostedAnimationLayer = 0;\n int layerForHomeAnimationLayer = 0;\n boolean isInHwFreeFormAnimation = false;\n int layerForHwFreeFormAnimationLayer = 0;\n int layerForHwFreeFormAnimationImeLayer = 0;\n int layerForBoostedHwFreeFormAnimationLayer = 0;\n int state = 0;\n while (state <= 2) {\n int i = 0;\n while (i < this.mChildren.size()) {\n TaskStack s = (TaskStack) this.mChildren.get(i);\n boolean notFreeform = s.isAlwaysOnTop() && HwFreeFormUtils.isFreeFormEnable() && !s.inFreeformWindowingMode() && !s.inHwFreeFormWindowingMode();\n if ((state != 0 || s.isActivityTypeHome()) && ((state != 1 || (!s.isActivityTypeHome() && !notFreeform && !s.inHwFreeFormMoveBackState())) && (state != 2 || s.isAlwaysOnTop() || s.inHwFreeFormMoveBackState()))) {\n int layer4 = layer3 + 1;\n s.assignLayer(t, layer3);\n if ((s.inSplitScreenWindowingMode() || s.inHwSplitScreenWindowingMode() || s.inHwMagicWindowingMode()) && s.isVisible() && (surfaceControl2 = this.mSplitScreenDividerAnchor) != null) {\n t.setLayer(surfaceControl2, layer4);\n layer4++;\n }\n if (s.isTaskAnimating() || s.isAppAnimating()) {\n if (state != 2) {\n int layer5 = layer4 + 1;\n layerForAnimationLayer = layer4;\n layerForHwFreeFormAnimationLayer = layerForAnimationLayer;\n if (!s.inHwMagicWindowingMode() || !s.isVisible() || (surfaceControl = this.mSplitScreenDividerAnchor) == null) {\n layer4 = layer5;\n } else {\n t.setLayer(surfaceControl, layer5);\n layer4 = layer5 + 1;\n }\n } else if (s.inHwFreeFormWindowingMode() && s.isAlwaysOnTop()) {\n int layer6 = layer4 + 1;\n layerForHwFreeFormAnimationLayer = layer4;\n layer4 = layer6 + 1;\n layerForHwFreeFormAnimationImeLayer = layer6;\n isInHwFreeFormAnimation = true;\n }\n }\n if (s.inHwFreeFormWindowingMode() && s.getTopChild() != null && ((Task) s.getTopChild()).isHwFreeFormScaleAnimating()) {\n layerForAnimationLayer = layer4;\n layerForHwFreeFormAnimationLayer = layerForAnimationLayer;\n layer4++;\n }\n layer2 = 2;\n if (state != 2) {\n layer = layer4 + 1;\n layerForBoostedAnimationLayer = layer4;\n layerForBoostedHwFreeFormAnimationLayer = layerForBoostedAnimationLayer;\n } else if (!s.inHwFreeFormWindowingMode() || !s.isAlwaysOnTop()) {\n layer = layer4;\n } else {\n layer = layer4 + 1;\n layerForBoostedHwFreeFormAnimationLayer = layer4;\n }\n } else {\n layer = layer3;\n layer2 = 2;\n }\n i++;\n layer3 = layer;\n HOME_STACK_STATE = HOME_STACK_STATE;\n }\n if (state == 0) {\n layerForHomeAnimationLayer = layer3;\n layer3++;\n }\n state++;\n HOME_STACK_STATE = HOME_STACK_STATE;\n }\n SurfaceControl surfaceControl3 = this.mAppAnimationLayer;\n if (surfaceControl3 != null) {\n t.setLayer(surfaceControl3, layerForAnimationLayer);\n }\n SurfaceControl surfaceControl4 = this.mBoostedAppAnimationLayer;\n if (surfaceControl4 != null) {\n t.setLayer(surfaceControl4, layerForBoostedAnimationLayer);\n }\n SurfaceControl surfaceControl5 = this.mAppHwFreeFormAnimationLayer;\n if (surfaceControl5 != null) {\n t.setLayer(surfaceControl5, layerForHwFreeFormAnimationLayer);\n updateImeLayer(isInHwFreeFormAnimation, t, layerForHwFreeFormAnimationImeLayer);\n }\n SurfaceControl surfaceControl6 = this.mBoostedHwFreeFormAnimationLayer;\n if (surfaceControl6 != null) {\n t.setLayer(surfaceControl6, layerForBoostedHwFreeFormAnimationLayer);\n }\n SurfaceControl surfaceControl7 = this.mHomeAppAnimationLayer;\n if (surfaceControl7 != null) {\n t.setLayer(surfaceControl7, layerForHomeAnimationLayer);\n }\n }", "private void swapTransforms() {\n Transform tmp = workTransform;\n workTransform = userTransform;\n userTransform = tmp;\n }", "@Override\n protected void finalRender() {\n finishTraversalAnimation();\n placeTreeNodes();\n placeNodesAtDestination();\n render();\n\n }", "public void traverseLevelOrder() {\n\t\tlevelOrder(this);\n\t}", "public void go_to_reverse_position() {\n stop_hold_arm();\n Pneumatics.get_instance().set_solenoids(false);\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_reverse, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }", "public void unlockFront()\n {\n m_bFrontLock = false;\n }", "public void pushAllDown() {\n pushAllDown(root);\n }", "private void backToParent(){\n\t\tList<Node> tmp = new ArrayList<Node>();\n\t\t\n\t\tfor(int i = 0; i < r.size(); i++){\n\t\t\tif(r.get(i).getNodeType() == Node.ATTRIBUTE_NODE){\n\t\t\t\tNode localNode = ((Attr)r.get(i)).getOwnerElement();\n\t\t\t\tif(localNode != null)\n\t\t\t\t\ttmp.add(localNode);\n\t\t\t} else {\n\t\t\t\tNode localNode = r.get(i).getParentNode();\n\t\t\t\tif(localNode != null && localNode.getNodeType() != Node.DOCUMENT_NODE && !listContainsElement(tmp, localNode)){\n\t\t\t\t\ttmp.add(localNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tr = tmp;\n\t}", "public void preorder() {\n root.preorder();\n System.out.println(\"\");\n }", "private void freezeChildNavControl()\n\t{\n\t\t//freeze nav controls\n\t\tnavPanel.freezeNavControls();\n\t\tfor (TablePanel childPanel : SubTablePanels.values()) {\n\t\t\tchildPanel.freezeChildNavControl();\n\t\t}\n\t}", "public void shiftUp() {\n\t\tif (next == null) {\n\t\t\tthrow new IllegalStateException(\"Cannot shift \" + this + \" up because it is already at the top\");\n\t\t}\n\t\tDependencyElement n = next;\n\t\tDependencyElement nn = next.next;\n\t\tif (nn != null) {\n\t\t\tnn.prev = this;\n\t\t\tnext = nn;\n\t\t}\n\t\telse {\n\t\t\tnext = null;\n\t\t}\n\t\tn.next = this;\n\t\tn.prev = prev;\n\t\tprev = n;\n\t}", "public void flip() {\n float tx = x1;\n float ty = y1;\n x1 = x2;\n y1 = y2;\n x2 = tx;\n y2 = ty;\n nx = -nx;\n ny = -ny;\n }", "public void reverse() {\n\t\tif(isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\tNodo <T> pri_n= fin;\n\t\t\n\t\tint cont= tamanio-1;\n\t\tNodo<T> nodo_act= pri_n;\n\t\twhile(cont >0) {\n\t\t\tNodo <T> aux= getNode(cont-1);\n\t\t\tnodo_act.setSiguiente(aux);\n\t\t\tnodo_act= aux;\n\t\t\tcont--;\n\t\t}\n\t\tinicio = pri_n;\n\t\tfin= nodo_act;\n\t\tfin.setSiguiente(null);\n\t}", "private void shiftUp() {\n int index = this.size;\n\n while (hasParent(index) && (parent(index).compareTo(heap[index]) > 0)) {\n swap(index, parentIndex(index));\n index = parentIndex(index);\n }\n }", "@Override\n \t\t\t\tpublic void doRotateZ() {\n \n \t\t\t\t}", "public void act() \n {\n move(-2);\n if(isAtEdge())\n {\n turn(180);\n getImage().mirrorVertically();\n }\n }", "public void setZIndex(final int zIndex) {\n CSS.setZIndex(this, zIndex);\r\n }", "public void back()\r\n\t{\r\n\t\tparentPanel.setState(GameState.Menu);\r\n parentPanel.initScene(GameState.Menu);\r\n\t\t\t\r\n\t}", "public void decreaseCurrentDepth(){\n currentDepth--;\n if (this.children == null) generateChildren();\n else {\n for (Node child : this.children) child.decreaseCurrentDepth();\n }\n }", "public void resetParents() {\n businessentityController.setSelected(null);\n }", "private void demote(WAVLNode z) {\n\t z.rank--;\r\n }", "void undo() {\n Move rec = _history.get(_history.size() - 1);\n int to = rec.fromIndex();\n _directions.get(to).remove(_directions.get(to).size() - 1);\n if (rec.isJump()) {\n Move middle = Move.move(rec.col1(), rec.row1(),\n rec.col0(), rec.row0(), null);\n rec = rec.jumpTail();\n while (rec != null) {\n middle = Move.move(rec.col1(), rec.row1(),\n rec.col0(), rec.row0(), middle);\n rec = rec.jumpTail();\n }\n while (middle != null) {\n set(middle.fromIndex(), EMPTY);\n set(middle.toIndex(), _whoseMove.opposite());\n set(middle.jumpedCol(), middle.jumpedRow(), _whoseMove);\n middle = middle.jumpTail();\n }\n\n } else {\n int from = rec.toIndex();\n set(to, _whoseMove.opposite());\n set(from, EMPTY);\n\n _directions.get(from).remove(_directions.get(from).size() - 1);\n }\n\n _whoseMove = _whoseMove.opposite();\n _history.remove(_history.size() - 1);\n setChanged();\n notifyObservers();\n }", "public void flyUpward() {\n /* Implement \"fly upward\" behavior if you want it! */\n }", "public void postLayout(ZGroup node) {\n }", "public void setBack(Node back){\n this.back = back;\n }", "void restoreBefore() {\r\n\t\t\tsurface.basemap.clear();\r\n\t\t\tsurface.basemap.putAll(basemapBefore);\r\n\t\t\tsurface.buildingmap.clear();\r\n\t\t\tsurface.buildingmap.putAll(buildingmapBefore);\r\n\t\t\tsurface.features.clear();\r\n\t\t\tsurface.features.addAll(surfaceBefore);\r\n\t\t\tsurface.buildings.clear();\r\n\t\t\tsurface.buildings.addAll(buildingsBefore);\r\n\t\t}", "void bottom() {\n startAnimation(bottomSubCubes(), Axis.Y, Direction.ANTICLOCKWISE);\n bottomCubeSwap();\n }", "public void sendToFront(Component component) {\n\t\tcomponents.remove(component);\n\t\tcomponents.add(0, component);\n\t}", "public void transitionStates () {\n myCurrentState = myNextState;\n myNextState = null;\n }" ]
[ "0.6757939", "0.6757939", "0.6757939", "0.6308667", "0.6057591", "0.5940374", "0.5824588", "0.579627", "0.5717944", "0.5702851", "0.5692599", "0.5565863", "0.55393916", "0.5533245", "0.5520452", "0.5414782", "0.54147685", "0.5413783", "0.5399313", "0.53906095", "0.53651947", "0.53433555", "0.53404564", "0.5314628", "0.53107744", "0.53032607", "0.52953374", "0.5285223", "0.5279928", "0.5278763", "0.5278763", "0.5269651", "0.52562827", "0.52473795", "0.524046", "0.5238868", "0.52342635", "0.523332", "0.5231095", "0.52230287", "0.5205782", "0.52034664", "0.5191667", "0.5187566", "0.5180951", "0.5166427", "0.5159073", "0.51567334", "0.5156652", "0.5156652", "0.51543957", "0.5152248", "0.5151372", "0.5145923", "0.5141066", "0.5135462", "0.51266927", "0.511116", "0.5084686", "0.5083691", "0.50720197", "0.50676155", "0.5066351", "0.50530875", "0.50383306", "0.5025624", "0.50080967", "0.5007479", "0.4999712", "0.4989151", "0.49818695", "0.49766898", "0.4975293", "0.49683017", "0.49625415", "0.49613416", "0.49563357", "0.49522954", "0.4947432", "0.4945459", "0.49428222", "0.49417862", "0.49387515", "0.4937461", "0.49339637", "0.49218792", "0.49138016", "0.49119064", "0.49049643", "0.4895192", "0.48940125", "0.4892572", "0.48882985", "0.48882937", "0.488426", "0.48816475", "0.48794353", "0.48727977", "0.4872213", "0.48715937" ]
0.6340521
3
Changes the zorder for this actor so it is in front of all siblings.
public void toFront() { internalGroup.toFront(); dataTrait.zIndex = internalGroup.getZIndex(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setZOrder(int order, Object source);", "public void setZIndex(int newZIndex)\n {\n zIndex = newZIndex;\n \n if (parent != null)\n {\n parent.onZIndexChanged(this);\n }\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "public void toFront() {\n WindowPeer peer = (WindowPeer) this.peer;\n if (peer != null) {\n peer.toFront();\n }\n }", "public void bringToFront()\n {\n this.toFront();\n }", "private void putToTop()\r\n {\r\n OrderManager manager = myOrderManagerRegistry.getOrderManager(ourKey);\r\n manager.activateParticipant(ourKey);\r\n manager.moveToTop(ourKey);\r\n }", "public void setFixedZdepth(int expectedZIndex);", "@Override\r\n\tpublic void setZIndex(int index) {\n\t\t\r\n\t}", "public void updateDrawingOrder(){\n\n //get all actors in the objectStage\n Array<Actor> actorsList = objectStage.getActors();\n actorsList.sort(new ActorComparator());\n }", "private void frontObject() {\n\t\tif(this.curr_obj != null) {\n this.curr_obj.uMoveToFront();\n\t\t}\n\t}", "public void assignStackOrdering() {\n this.mTaskStackContainers.assignStackOrdering(getPendingTransaction());\n }", "public void changeViewOrder(SingleView singleView, boolean z) {\n this.mLayoutAdapter.changeViewOrder(singleView, z);\n }", "public void preOrderTraversal() {\n beginAnimation();\n treePreOrderTraversal(root);\n stopAnimation();\n\n }", "public void setZIndex(final int zIndex) {\n CSS.setZIndex(this, zIndex);\r\n }", "@Override\r\n\tpublic void setOrder(int order){\r\n\t\tthis.head.setOrder(order);\r\n\t}", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n dialog.setPadding(new Insets(0,0,0,7));\n }", "@Override // com.android.server.wm.WindowContainer\n public void assignChildLayers(SurfaceControl.Transaction t) {\n assignStackOrdering(t);\n for (int i = 0; i < this.mChildren.size(); i++) {\n ((TaskStack) this.mChildren.get(i)).assignChildLayers(t);\n }\n }", "public void setZIndex(int index) {\n internalGroup.setZIndex(index);\n dataTrait.zIndex = index;\n }", "int getZOrder();", "public void preOrder() {\n preOrder(root);\n }", "void frontInv() {\n startAnimation(frontSubCubes(), Axis.Z, Direction.ANTICLOCKWISE);\n frontCubeSwap();\n frontCubeSwap();\n frontCubeSwap();\n }", "public final void activate(final int tabOrder) {\n if (activeChild == null) {\n return;\n }\n TWidget child = null;\n for (TWidget widget: children) {\n if ((widget.enabled)\n && !(widget instanceof THScroller)\n && !(widget instanceof TVScroller)\n && (widget.tabOrder >= tabOrder)\n ) {\n child = widget;\n break;\n }\n }\n if ((child != null) && (child != activeChild)) {\n activeChild.active = false;\n assert (child.enabled);\n child.active = true;\n activeChild = child;\n }\n }", "@Override\n public void setOnTop(boolean arg0)\n {\n \n }", "public void rotateToFront() {\n SXRTransform transform = mSceneRootObject.getTransform();\n transform.setRotation(1, 0, 0, 0);\n transform.rotateByAxisWithPivot(-frontFacingRotation + 180, 0, 1, 0, 0, 0, 0);\n }", "public void preorder() {\n root.preorder();\n System.out.println(\"\");\n }", "public void inOrderTraversal() {\n beginAnimation();\n treeInOrderTraversal(root);\n stopAnimation();\n\n }", "public void PreOrder() {\n\t\tPreOrder(root);\n\t}", "public int getZIndex()\n {\n return zIndex;\n }", "public void traversePreOrder() {\n\t\tpreOrder(this);\n\t}", "void front() {\n startAnimation(frontSubCubes(), Axis.Z, Direction.CLOCKWISE);\n frontCubeSwap();\n }", "public void preorder() {\n\t\tpreorder(root);\n\t}", "public void toBack() {\n internalGroup.toBack();\n dataTrait.zIndex = internalGroup.getZIndex();\n }", "void changeOrder(GeometricalObject object, int offset);", "void changeOrder(GeometricalObject object, int offset);", "public void setOrder(int order) {\n this.order = order;\n paint();\n }", "void updateAllParentsBelow();", "public void setSiblingOrder(SiblingOrder siblingOrder) {\n this.siblingOrder = siblingOrder;\n }", "@Override\r\n\tpublic boolean setWindowToFront() {\n\t\treturn true;\r\n\t}", "public void setTop() {\n reset(State.TOP);\n }", "public void postOrderTraversal() {\n beginAnimation();\n treePostOrderTraversal(root);\n stopAnimation();\n\n }", "private void incrementZIndexForNext(Container current) {\n\n Container next = current.getNext();\n\n if (next != null) {\n\n final WidgetEntity widgetOfGreater = next.getWidget();\n if (widgetOfGreater.getZIndex().equals(current.getWidget().getZIndex())) {\n widgetOfGreater.incZ();\n }\n incrementZIndexForNext(next);\n }\n }", "public void sortChildsZ(){\n\t\tif(childList != null && childList.size() > 0){\n\t\t\tCollections.sort(childList);\n\t\t\tfor(Ent e: childList){\n\t\t\t\te.sortChildsZ();\n\t\t\t}\n\t\t}\n\t}", "public void sendToFront(Component component) {\n\t\tcomponents.remove(component);\n\t\tcomponents.add(0, component);\n\t}", "public void bringToFront()\n {\n if(getExtendedState() == JFrame.ICONIFIED)\n setExtendedState(JFrame.NORMAL);\n\n this.toFront();\n }", "private void updateOrder() {\n Arrays.sort(positions);\n }", "public void preLayout(ZGroup node) {\n }", "protected void setFixZIndexEnabled(final boolean enabled)\n\t{\n\t\tthis.getStyle().set(\"z-index\", enabled ? \"1\" : null);\n\t}", "public void preorder()\n {\n preorder(root);\n }", "public void preorder()\n {\n preorder(root);\n }", "public void treeOrder ()\n {\n treeOrder (root, 0);\n }", "public void translateBy(float x, float y, float z) {\n\t\tposition.add(x, y, z);\n\t\tmodified = true;\n\t}", "public void changeOrder(GeometricalObject object, int offset);", "public void traverseLevelOrder() {\n\t\tlevelOrder(this);\n\t}", "public void setZ(int value)\n\t{\n\t\tgetWorldPosition().setZ(value);\n\t}", "@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}", "void topInv() {\n startAnimation(topSubCubes(), Axis.Y, Direction.ANTICLOCKWISE);\n topCubeSwap();\n topCubeSwap();\n topCubeSwap();\n }", "public void insertReorderBarrier() {\n\t\t\n\t}", "public void moveVertex() {\r\n\t\tPriorityQueue<Vertex2D> pq = new PriorityQueue<Vertex2D>(3,(a,b) -> a.id - b.id);\r\n\t\tpq.add(this); pq.add(this.previous); pq.add(this.next);\r\n\t\t\r\n\t\tsynchronized(pq.poll()) {\r\n\t\t\tsynchronized(pq.poll()) {\r\n\t\t\t\tsynchronized(pq.poll()) {\r\n\t\t\t\t\t//Actually move the vertex \"this\"\r\n\t\t\t\t\tdouble r1 = Star.rnd.nextDouble();\r\n\t\t\t\t\tdouble r2 = Star.rnd.nextDouble();\r\n\t\t\t\t\tdouble newX = (1 - Math.sqrt(r1)) * previous.x + (Math.sqrt(r1) * (1 - r2)) * this.x + (Math.sqrt(r1) * r2) * next.x;\r\n\t\t\t\t\tdouble newY = (1 - Math.sqrt(r1)) * previous.y + (Math.sqrt(r1) * (1 - r2)) * this.y + (Math.sqrt(r1) * r2) * next.y;\r\n\t\t\t\t\tthis.x = newX;\r\n\t\t\t\t\tthis.y = newY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public DraggableBehavior setZIndex(int zIndex)\n\t{\n\t\tthis.options.put(\"zIndex\", zIndex);\n\t\treturn this;\n\t}", "public void bringToFront(int id)\n\t{\n\t\tgetObject().bringToFront(id);\n\t\treturn;\n\t}", "private void positionObjectInScene(float x, float y, float z) {\n setIdentityM(modelMatrix, 0);\n translateM(modelMatrix, 0, x, y, z);\n multiplyMM(modelViewProjectionMatrix, 0, viewProjectionMatrix,\n 0, modelMatrix, 0);\n }", "void preOrderOperation(PortfolioNode parentNode, Position position);", "public void setSpawnZ(int z)\n {\n spawnZ = z;\n }", "public void assignStackOrdering(SurfaceControl.Transaction t) {\n int layer;\n int layer2;\n SurfaceControl surfaceControl;\n SurfaceControl surfaceControl2;\n int HOME_STACK_STATE = 0;\n int layer3 = 0;\n int layerForAnimationLayer = 0;\n int layerForBoostedAnimationLayer = 0;\n int layerForHomeAnimationLayer = 0;\n boolean isInHwFreeFormAnimation = false;\n int layerForHwFreeFormAnimationLayer = 0;\n int layerForHwFreeFormAnimationImeLayer = 0;\n int layerForBoostedHwFreeFormAnimationLayer = 0;\n int state = 0;\n while (state <= 2) {\n int i = 0;\n while (i < this.mChildren.size()) {\n TaskStack s = (TaskStack) this.mChildren.get(i);\n boolean notFreeform = s.isAlwaysOnTop() && HwFreeFormUtils.isFreeFormEnable() && !s.inFreeformWindowingMode() && !s.inHwFreeFormWindowingMode();\n if ((state != 0 || s.isActivityTypeHome()) && ((state != 1 || (!s.isActivityTypeHome() && !notFreeform && !s.inHwFreeFormMoveBackState())) && (state != 2 || s.isAlwaysOnTop() || s.inHwFreeFormMoveBackState()))) {\n int layer4 = layer3 + 1;\n s.assignLayer(t, layer3);\n if ((s.inSplitScreenWindowingMode() || s.inHwSplitScreenWindowingMode() || s.inHwMagicWindowingMode()) && s.isVisible() && (surfaceControl2 = this.mSplitScreenDividerAnchor) != null) {\n t.setLayer(surfaceControl2, layer4);\n layer4++;\n }\n if (s.isTaskAnimating() || s.isAppAnimating()) {\n if (state != 2) {\n int layer5 = layer4 + 1;\n layerForAnimationLayer = layer4;\n layerForHwFreeFormAnimationLayer = layerForAnimationLayer;\n if (!s.inHwMagicWindowingMode() || !s.isVisible() || (surfaceControl = this.mSplitScreenDividerAnchor) == null) {\n layer4 = layer5;\n } else {\n t.setLayer(surfaceControl, layer5);\n layer4 = layer5 + 1;\n }\n } else if (s.inHwFreeFormWindowingMode() && s.isAlwaysOnTop()) {\n int layer6 = layer4 + 1;\n layerForHwFreeFormAnimationLayer = layer4;\n layer4 = layer6 + 1;\n layerForHwFreeFormAnimationImeLayer = layer6;\n isInHwFreeFormAnimation = true;\n }\n }\n if (s.inHwFreeFormWindowingMode() && s.getTopChild() != null && ((Task) s.getTopChild()).isHwFreeFormScaleAnimating()) {\n layerForAnimationLayer = layer4;\n layerForHwFreeFormAnimationLayer = layerForAnimationLayer;\n layer4++;\n }\n layer2 = 2;\n if (state != 2) {\n layer = layer4 + 1;\n layerForBoostedAnimationLayer = layer4;\n layerForBoostedHwFreeFormAnimationLayer = layerForBoostedAnimationLayer;\n } else if (!s.inHwFreeFormWindowingMode() || !s.isAlwaysOnTop()) {\n layer = layer4;\n } else {\n layer = layer4 + 1;\n layerForBoostedHwFreeFormAnimationLayer = layer4;\n }\n } else {\n layer = layer3;\n layer2 = 2;\n }\n i++;\n layer3 = layer;\n HOME_STACK_STATE = HOME_STACK_STATE;\n }\n if (state == 0) {\n layerForHomeAnimationLayer = layer3;\n layer3++;\n }\n state++;\n HOME_STACK_STATE = HOME_STACK_STATE;\n }\n SurfaceControl surfaceControl3 = this.mAppAnimationLayer;\n if (surfaceControl3 != null) {\n t.setLayer(surfaceControl3, layerForAnimationLayer);\n }\n SurfaceControl surfaceControl4 = this.mBoostedAppAnimationLayer;\n if (surfaceControl4 != null) {\n t.setLayer(surfaceControl4, layerForBoostedAnimationLayer);\n }\n SurfaceControl surfaceControl5 = this.mAppHwFreeFormAnimationLayer;\n if (surfaceControl5 != null) {\n t.setLayer(surfaceControl5, layerForHwFreeFormAnimationLayer);\n updateImeLayer(isInHwFreeFormAnimation, t, layerForHwFreeFormAnimationImeLayer);\n }\n SurfaceControl surfaceControl6 = this.mBoostedHwFreeFormAnimationLayer;\n if (surfaceControl6 != null) {\n t.setLayer(surfaceControl6, layerForBoostedHwFreeFormAnimationLayer);\n }\n SurfaceControl surfaceControl7 = this.mHomeAppAnimationLayer;\n if (surfaceControl7 != null) {\n t.setLayer(surfaceControl7, layerForHomeAnimationLayer);\n }\n }", "public void incrementOrder() {\n mOrder++;\n }", "public void assignStackOrdering(SurfaceControl.Transaction t) {\n this.mTaskStackContainers.assignStackOrdering(t);\n }", "private void turnOverItself() {\n byte tmp = leftEdge;\n leftEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n\n tmp = rightEdge;\n rightEdge = reversedLeftEdge;\n reversedLeftEdge = tmp;\n\n tmp = topEdge;\n topEdge = reversedTopEdge;\n reversedTopEdge = tmp;\n\n tmp = botEdge;\n botEdge = reversedBotEdge;\n reversedBotEdge = tmp;\n\n tmp = ltCorner;\n ltCorner = rtCorner;\n rtCorner = tmp;\n\n tmp = lbCorner;\n lbCorner = rbCorner;\n rbCorner = tmp;\n }", "@Override\n\tpublic void setPositionOrder(int positionOrder) {\n\t\t_dmGTShipPosition.setPositionOrder(positionOrder);\n\t}", "public void setX() {\n m_frontLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n m_frontRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n }", "protected void restoreSelf() {\n if (removed && parentNode != null && componentNode != null) {\n // Add self back BEFORE sibling (keeps original order)\n parentNode.insertBefore(componentNode, siblingNode);\n // Reset removed flag\n removed = false;\n }\n }", "List<Vertex> assignBumpOrdering(Tree t, Vertex root) throws FactorException {\n\t\t_bumpOnUpwardPass = false;\n\t\tif(DEBUG) System.out.println(\"\\n\\nassigning ordering!\\n\\n\");\n\t\tnextOrderID = UNMARKED; // begin again at 0\n\t\tList<Vertex> ordering = new ArrayList<Vertex>();\n//\t\tif(t._vertices.size() == 0) return ordering;\n//\t\t// mark all vertices unmarked\n//\t\tfor(Vertex v : t._vertices.values()) {\n//\t\t\tv.setUnmarked();\n//\t\t}\n//\t\tQueue<Vertex> toProcess = new LinkedList<Vertex>();\n//\t\ttoProcess.add(root);\n//\t\tif(DEBUG) System.out.println(\"root is \"+root.getVariableNames());\n//\t\t\n//\t\t// giving a number is equivalent to adding to ordering, giving index\n//\t\t// while all vertices don't have a number\n//\t\twhile(ordering.size() != t._vertices.size()) {\n//\t\t\tif(toProcess.size() == 0) {\n//\t\t\t\t// find an unmarked node... expensive\n//\t\t\t\tfor(Vertex v : t._vertices.values()) {\n//\t\t\t\t\tif(v._orderID == UNMARKED) {\n//\t\t\t\t\t\ttoProcess.add(v); // add to queue when find unmarked\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tVertex curr = toProcess.remove();\n//\t\t\tif(DEBUG) System.out.printf(\"curr VertexMax:%s\\n\",curr);\n//\t\t\t// mark\n//\t\t\tcurr.setOrderID();\n//\t\t\tordering.add(curr); // and add to our ordered list\n//\t\t\tif(curr._orderID != ordering.size()) {// verify\n//\t\t\t\tSystem.err.println(\"oops! order id incorrect\");\n//\t\t\t}\n//\t\t\t// and then for each downstream child...\n//\t\t\tfor(Edge e : curr._neighborEdges.keySet()) {\n//\t\t\t\tVertex k = e.getOtherVertex(curr);\n//\t\t\t\tif(DEBUG) System.out.println(\"check neighbor:\"+k);\n//\t\t\t\tif(k._orderID == UNMARKED) {\n//\t\t\t\t\tif(DEBUG) System.out.println(k+\" is unmarked - it's downstream\");\n//\t\t\t\t\t// downstream if we haven't marked it yet\n////\t\t\t\t\t// send belief update message to the child\n////\t\t\t\t\tcurr.sendMessage(e);\n//\t\t\t\t\t// and add the child to our list to process\n//\t\t\t\t\tif(DEBUG) System.out.printf(\"adding %s to be processed\\n\",root.getVariableNames());\n//\t\t\t\t\ttoProcess.add(k);\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t\treturn ordering;\n\t\tVertex v = findVertexInTree(t, 3,2);\n\t\tv.setOrderID();\n\t\tordering.add(v);\n\t\tv = findVertexInTree(t, 2,0);\n\t\tv.setOrderID();\n\t\tordering.add(v);\n\t\tv = findVertexInTree(t, 1,0);\n\t\tv.setOrderID();\n\t\tordering.add(v);\n\t\treturn ordering;\n//\t\t[[G, I], [I, J], [G, H]]\n\t}", "public static void setZOrderOnTop(SurfaceView surfaceView, boolean onTop)\n\t{\n\n\t\tMethod method;\n\t\ttry\n\t\t{\n\n\t\t\tmethod = Class.forName(\"android.view.SurfaceView\").getMethod(\"setZOrderOnTop\", boolean.class);\n\n\t\t\tif (method != null)\n\t\t\t{\n\t\t\t\tmethod.invoke(surfaceView, true);\n\t\t\t}\n\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void preorder()\r\n {\r\n preorder(root);\r\n }", "private void preOrder(int node, int[] parents) {\n currTour.add(node + 1);\n Queue<Integer> children = findChildren(node, parents);\n while(!children.isEmpty()) {\n preOrder(children.remove(), parents);\n }\n }", "public void setFront(Node front){\n this.front = front;\n }", "@Override\n protected void finalRender() {\n finishTraversalAnimation();\n placeTreeNodes();\n placeNodesAtDestination();\n render();\n\n }", "void setAlwaysOnTop(boolean alwaysOnTop);", "protected void moveFrontAndLaterally() {\n\n dbugThis(\"================================= NEW TRY ====================================================\");\n botTop.swing(BotTop.SWING_UP_COMMAND, true);\n autonomousIdleTasks();\n botTop.openClaw();\n autonomousIdleTasks();\n justWait(1000);\n moveXInchesFromFrontObject(DISTANCE_TO_STONEWALL, 10000, 0.2);\n boolean right = true;\n while (opModeIsActive()) {\n justWait(1000);\n if (right) {\n moveRight(40.0, 0.4);\n right = false;\n }\n else {\n moveLeft(40.0, 0.4);\n right = true;\n }\n }\n return;\n }", "public void setBlendOrderAt(@EntityInstance int instance, @IntRange(from = 0) int primitiveIndex,\n @IntRange(from = 0, to = 65535) int blendOrder) {\n nSetBlendOrderAt(mNativeObject, instance, primitiveIndex, blendOrder);\n }", "public void setOrder(int order) {\n q = new Queue();\n if (order == 1) {\n inOrder(root, q);\n } else if (order == 2) {\n preOrder(root, q);\n } else if (order == 3) {\n postOrder(root, q);\n } else {\n System.out.println(\"invalid order\");\n }\n }", "void topologicalSort() {\n\n\t\tfor (SimpleVertex vertice : allvertices) {\n\n\t\t\tif (vertice.isVisited == false) {\n\t\t\t\tlistset.add(vertice.Vertexname);\n\t\t\t\ttopologicalSortUtil(vertice);\n\n\t\t\t}\n\t\t}\n\n\t}", "public void lockFront()\n {\n m_bFrontLock = true;\n }", "@Override\r\n\tpublic void undo() \r\n\t\t{\n\t\tif (parent.addChild(child)) \r\n\t\t\t{\r\n\t\t\taddArcs(sourceArcs);\r\n\t\t\taddArcs(targetArcs);\r\n\t\t\t}\r\n\t\t}", "public void moveTo(float x, float y, float z) {\n\t\tthis.getPosition().x = x;\n\t\tthis.getPosition().y = y;\n\t\tthis.getPosition().z = z;\n\t}", "public void preOrder() {\r\n\t\tSystem.out.print(\"PRE: \");\r\n\r\n\t\tpreOrder(root);\r\n\t\tSystem.out.println();\r\n\r\n\t}", "public void bringSimpleMapToBack()\n\t{\n\t\tthis.openLayersMap.setStyleName(\"blipnip-gwt-Menu-Map-Back\");\n\t\t//this.openLayersMap.getElement().getStyle().setZIndex(-1); \n\t\t//this.openLayersMap.getElement().getFirstChildElement().getStyle().setZIndex(-1); // \n\t}", "@Override\n\tpublic void preorder() {\n\n\t}", "private void preorderSubtree(Position<E> p, List<Position<E>> snapshot) {\n snapshot.add(p);\n for (Position<E> c : children(p)) {\n preorderSubtree(c, snapshot); \n \n }\n }", "public void setPrevious()\n {\n\tint currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex -1);\n\t\n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = lastObject;\n }", "private void sort() {\n ObservableList<Node> workingCollection = FXCollections.observableArrayList(\n this.getChildren()\n );\n\n Collections.sort(workingCollection, new Comparator<Node>() {\n @Override\n public int compare(Node o1, Node o2) {\n CardView c1 = (CardView) o1;\n CardView c2 = (CardView) o2;\n return c1.getCard().compareTo(c2.getCard());\n }\n });\n\n this.getChildren().setAll(workingCollection);\n }", "public void enqueue ()\n {\n // update the transform state if necessary\n if (_ownTransformState) {\n _parentViewTransform.compose(_config.transform, _transformState.getModelview());\n _transformState.setDirty(true);\n }\n\n // sort by depth if so required (TODO: radix or incremental sort?)\n ParticleSystemConfig.Layer psconfig = (ParticleSystemConfig.Layer)_config;\n if (psconfig.depthSort) {\n Transform3D xform = _transformState.getModelview();\n for (int ii = 0, nn = _living.value; ii < nn; ii++) {\n Particle particle = _particles[ii];\n particle.depth = xform.transformPointZ(particle.getPosition());\n }\n QuickSort.sort(_particles, 0, _living.value - 1, DEPTH_COMP);\n }\n\n // update the center if necessary\n GroupPriority priorityMode = psconfig.priorityMode;\n if (priorityMode != null) {\n Box bounds = ((ParticleSystem)_parentScope).getGroupBounds(priorityMode.group);\n bounds.getCenter(_center);\n Transform3D xform = _ctx.getCompositor().getCamera().getWorldTransform();\n xform.getRotation().transformUnitZ(_vector).multLocal(\n priorityMode.priority * 0.0001f);\n pointToLayer(_center.addLocal(_vector), false);\n }\n }", "public void SetPosition(Vector2 position)\n\t{\n\t\tTransform transform = parent.transform;\n\t\ttransform.position = position;\n\t\t// Dont loose your dP!\n\t\tpreviousPosition = Vector2.Add(position,velocity.negate());\n\t}", "@objid (\"1b87bc43-5e33-11e2-b81d-002564c97630\")\n private void shiftAll(final BackgroundModel directedGraph) {\n // Center the center node in the view.\n // Get the size of the control showing the viewer (this has to be done\n // in the display thread to avoid InvalidThreadAccessException).\n final Point controlSize = getViewAreaSize();\n \n if (controlSize.x <= 0 || controlSize.y <= 0) {\n // FIXME We were called too early, SWT not yet ready\n return;\n }\n \n final GraphNode centerNode = directedGraph.getCenter();\n \n // Compute the vector to align the nodes.\n int xDelta;\n int yDelta;\n xDelta = (controlSize.x / 2) - (centerNode.x + (centerNode.width / 2));\n yDelta = (controlSize.y / 2) - (centerNode.y + (centerNode.height / 2));\n \n // Move all nodes\n for (Object nodeObj : directedGraph.nodes) {\n Node node = (Node) nodeObj;\n node.x += xDelta;\n node.y += yDelta;\n }\n }", "public void preOrder(Visitor v) {\r\n\t\tpreOrder(root, v);\r\n\t}", "protected void notifyParentOfPositionChange()\n {\n rotatedCorners = null;\n ShapeView view = getParentView();\n \n if (view != null)\n {\n view.onPositionChanged(this);\n }\n }", "public void linkToDepthRenderer(Renderer renderer) {\n renderer.addUniform(new UniformMatrix4(renderer.getShader(),\"viewMatrix\",shadowBoxMatrix));\n }", "@Override\n\tpublic void placeOrder() {\n\t\t\n\t}", "void setPrevPos(Vec3 pos);" ]
[ "0.65193003", "0.63612306", "0.6092523", "0.6092523", "0.6092523", "0.6007116", "0.5977047", "0.58240294", "0.5697987", "0.56587285", "0.56091356", "0.5560959", "0.55381054", "0.54929316", "0.5485448", "0.54693174", "0.538593", "0.5361896", "0.52687526", "0.5262296", "0.52334666", "0.52212685", "0.52136916", "0.5210523", "0.52053064", "0.51870114", "0.5166441", "0.5137546", "0.5130644", "0.5119678", "0.5096541", "0.5085168", "0.5065921", "0.5048295", "0.50189906", "0.50189906", "0.5005502", "0.50044847", "0.5002203", "0.5002012", "0.5000607", "0.49999732", "0.49979064", "0.49883083", "0.4983295", "0.4975513", "0.49693075", "0.49657345", "0.49638182", "0.49450716", "0.49450716", "0.4929211", "0.4925704", "0.4921339", "0.4912506", "0.49057856", "0.4876758", "0.48688886", "0.48581958", "0.48326817", "0.48252946", "0.4823751", "0.4820194", "0.48134977", "0.4812208", "0.48090994", "0.47972217", "0.47913674", "0.4783051", "0.47749543", "0.47740725", "0.47406173", "0.47190043", "0.4717019", "0.47144797", "0.47036526", "0.46962434", "0.46938646", "0.46913028", "0.46803835", "0.46775332", "0.4675551", "0.46734244", "0.4671574", "0.46710348", "0.46707308", "0.46660715", "0.465293", "0.46501315", "0.46489593", "0.46478277", "0.463959", "0.46344444", "0.4626178", "0.46232265", "0.46184176", "0.45722", "0.4572134", "0.45674938", "0.4558585" ]
0.6431693
1
Defines the interface for accessing the order processing system.
public interface OrderProcessing extends Serializable { // Used by public void newOrder(Basket bought) // Cashier throws OrderException; public int uniqueNumber() // Cashier throws OrderException; public Basket getOrderToPick() // Picker throws OrderException; public boolean informOrderPicked(int orderNum) // Picker throws OrderException; public boolean informOrderCollected(int orderNum) // Collection throws OrderException; public Map<String, List<Integer>> getOrderState() // Display throws OrderException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IOrderService {\n ServerResponse pay(Long orderNo, Long userId, String path);\n\n ServerResponse aliCallback(Map<String, String> params);\n\n ServerResponse queryOrderPayStatus(Long userId, Long orderNo);\n\n ServerResponse createOrder(Long userId, Integer shippingId);\n\n ServerResponse<String> cancel(Long userId, Long orderNo);\n\n ServerResponse getOrderCartProduct(Long userId);\n\n ServerResponse<OrderVo> getOrderDetail(Long userId, Long orderNo);\n\n ServerResponse<PageInfo> getOrderList(Long userId, int pageNum, int pageSize);\n\n //backend\n ServerResponse<PageInfo> manageList(int pageNum, int pageSize);\n\n ServerResponse<OrderVo> manageDetail(Long orderNo);\n\n ServerResponse<PageInfo> manageSearch(Long orderNo, int pageNum, int pageSize);\n\n ServerResponse<String> manageSendGoods(Long orderNo);\n\n}", "public interface OrderManager {\n\n\n OrderDTO getOrderDTO(Long orderId,Long sellerid,String appKey);\n\n List<OrderDTO> queryOrder(OrderQTO orderQTO, String appKey) throws ItemException;\n}", "public interface Order{\n\tvoid execute();\n}", "public interface IOrderModel {\n void createOrder(String url, Map<String, String> map);\n void queryOrder(String url, Map<String,String> par);\n void delectCart(String url, Map<String, String> map);\n}", "public interface IOrderService {\n\n public Object findByOrderId(String orderid) throws Exception;\n\n public Object addOrder(Map body)throws Exception;\n\n public Object findByOrderCutPage(Map body) throws Exception;\n\n public Object selectOrderCount() throws Exception;\n\n public Object deleteOrderId(String orderid) throws Exception;\n\n public Object receiveProduct(String orderid) throws Exception;\n\n}", "public interface UcManageOrder {\n\n /**\n * Deletes a order from the database by its id 'orderId'.\n *\n * @param orderId Id of the order to delete\n * @return boolean <code>true</code> if the order can be deleted, <code>false</code> otherwise\n */\n boolean deleteOrder(long orderId);\n\n /**\n * Saves a order and store it in the database.\n *\n * @param order the {@link OrderEto} to create.\n * @return the new {@link OrderEto} that has been saved with ID and version.\n */\n OrderEto saveOrder(OrderEto order);\n\n}", "public interface OrderFacade {\n}", "public interface ShopOrderService {\n Page<OrderBiz> queryPageOrderInfo(ShopOrderQuery query);\n\n OrderRechargeBiz queryOrderRechargeInfoByOrderId(Long orderid);\n\n void send(Long orderid,String remark) throws ManagerException;\n\n void rechargeOrder(Long orderid) throws ManagerException;\n\n void rechargeResult(Long orderid,Integer resultstatus);\n\n boolean updateSendRemarkById(Long orderid, String sendremark);\n\n boolean updateRemarkById(Long orderid, String remark);\n\n String queryRemarkById(Long orderid);\n}", "public interface OrderService {\n\n /**\n * 司机发布信息\n *\n * @param idno\n * @param driverShareInfo\n * @return\n */\n DriverShareInfo shareDriverInfo(String idno, DriverShareInfo driverShareInfo);\n\n /**\n * 乘客预定校验\n *\n * @param idno\n * @param driverOrderId\n * @param passerOrderId\n * @param genToken\n * @return\n */\n Result passerReserveCheck(String idno, Long driverOrderId, Long passerOrderId, boolean genToken);\n\n /**\n * 乘客预定\n *\n * @param radomToken\n * @param idno\n * @param driverOrderId\n * @param passerOrderId\n * @return\n */\n Result passerReserve(String radomToken, String idno, Long driverOrderId, Long passerOrderId);\n\n\n}", "public interface OrderService {\n\n public boolean addOrderByID(long userID);\n public boolean addOrderByName(String username);\n public boolean removeOrder(long orderID);\n\n public Order getOrderByID(long orderID);\n public List<Order> getAllOrders();\n\n public boolean finishOrder(long orderID);\n public boolean unfinishOrder(long orderID);\n\n public List<Order> getMyOrders();\n public Order getMyOrder(long id);\n\n}", "@Service\npublic interface IOrderService {\n\tOrders addOrder(Orders order);\n\n\tOrders updateOrder(Orders order);\n\n\tOrders deleteOrder(int orderId);\n\n\tOrders viewOrder(int orderId);\n\n\tList<Orders> viewAllOrders();\n}", "public interface IOrderable {\n void setOrderNum(int orderNum);\n\n int getOrderNum();\n}", "public interface IOrder {\n\n @RequestLine(\"POST /orders\")\n @Headers(\"Content-Type: application/json\")\n BaseResponse createOrder(OrderRequest request);\n @RequestLine(\"GET /orders\")\n @Headers(\"Content-Type: application/json\")\n BaseResponse queryOrder(String userId);\n}", "public interface OrderService {\n\n void makeOrder(Order order);\n}", "public interface OrderlineService {\n\n List<Orderline> getAllOrderline();\n\n void insertOrderLine(Orderline orderline);\n\n List<Order> selectAllOrder();\n\n List<Order> selectALlOrderByID(int orderid);\n\n Address selectAddressByID(int addressId);\n\n List<Orderline> selectALlOrderlineByID(int orderId);\n}", "public interface OrderService {\n\n void insertOrder(Order order);\n\n void updateState(String state);\n\n Order selectByPrice(String uuid);\n\n PageInfo<Order> queryOrderList(Page page);\n}", "public void processOrder(int orderID);", "public interface OrderService {\n\n MiaoshaOrder getMiaoshaOrderByUserIdGoodsId(long userId, long goodsId);\n\n OrderInfo createOrder(MiaoshaUser user, GoodsVo goods);\n\n OrderInfo getOrderById(long orderId);\n\n OrderInfo miaosha(MiaoshaUser user, GoodsVo goods);\n\n long getMiaoshaResult(Long userId, long goodsId);\n\n int updateOrderStatusById(OrderInfo orderInfo);\n\n int closeOrder(Date deadLine);\n}", "public interface IOrderFactory{\n\t\n\t/**\n\t * Creates a collection of taxes for US and EU customers\n\t * \n\t * @return the sales tax\n\t */\n\tpublic ISalesTax getTaxObject();\n\t\n\t/**\n\t * Creates the shipping cost for US and EU customers\n\t * \n\t * @return shipping cost\n\t */\n\tpublic IShippingRate getRateObject();\n}", "public interface StockExchangeService {\n\n void addSellOrder(String orderId, String stockName, Double price, int quantity, LocalTime time);\n\n void matchAndExecuteBuyOrder(String orderId, String stockName, Double price, int quantity, LocalTime time);\n}", "public interface IMakeOrderactivity {\n\n void uploadRes(boolean res, OrderEx result);\n void updateLogisticFee(boolean res, LogisticFee logisticFee);\n void updateAddress(List<Address> list);\n}", "public interface OrderService {\n /**\n * Create new order object and put it to database\n *\n * @param cart cart with data about new order\n * @param user session user - order owner\n * @throws FlowerValidationException if flowers count in cart more then count in shop\n * @see Cart\n */\n void create(Cart cart, User user) throws FlowerValidationException;\n\n /**\n * Change order status in database to PAID\n *\n * @param order order to update\n * @see flowershop.backend.enums.OrderStatus\n */\n void pay(Order order);\n\n /**\n * Change order status in database to CLOSED\n *\n * @param order order to update\n * @see flowershop.backend.enums.OrderStatus\n */\n void close(Order order);\n\n /**\n * Delete corresponding order object from database\n *\n * @param id order id to delete\n */\n void delete(Long id);\n\n /**\n * Find order in database with given id\n *\n * @param id order id\n * @return Order dto\n */\n Order find(Long id);\n\n /**\n * Get all orders from database\n *\n * @return orders list\n */\n List<Order> getAll();\n\n /**\n * Get all orders of given user from database\n *\n * @param user orders owner\n * @return orders list\n */\n List<Order> getByUser(User user);\n\n /**\n * Get items list (bought flowers) of given order\n *\n * @param order order to get details\n * @return items list (bought flowers)\n * @see OrderFlowerData\n */\n List<OrderFlowerData> getFlowersData(Order order);\n\n /**\n * Generates detailed cart from regular cart to represent data\n *\n * @param cart Cart to be detailed\n * @return DetailedCart\n * @see Cart\n * @see DetailedCart\n */\n DetailedCart generateDetailedCart(Cart cart);\n}", "public interface OrderService {\n List<Order> getOrdersByUserId(Map<String, Object> map);\n @Hmily\n long insertOrder(Map<String, Object> map);\n @Hmily\n long deleteOrder(Map<String, Object> map);\n @Hmily\n long setOrderStatus(Integer userId, long orderSN, Integer status);\n}", "ReadOnlyOrderManager getOrderManager();", "public interface OrderService {\n\n Order createOrder(List<OrderItem> orderItems);\n\n List<Order> getOrdersForUser(User user);\n\n List<Order> findAll();\n\n Order findById(Long orderId);\n\n Order updateOrder(Order order);\n\n void cancelOrder(Long orderId);\n}", "public interface OrderService {\n\n List<OrderInfoDto> getAllOrders();\n\n Long addNewOrder(OrderDto orderDto);\n\n OrderInfoDto getOrderInfoById(Long id);\n\n OrderDto getOrderById(Long id);\n\n void setTruckForOrder(Long orderId, Long truckId);\n\n void setDriverForOrder(Long orderId, Long driverId);\n\n void detachDriver(Long orderId, Long driverId);\n\n <T> T getCurrentOrderByDriverLogin(String login, Class<T> tClass);\n\n List<OrderInfoBoardDto> getOrdersInfo();\n\n List<CityDto> getRouteByOrderId(Long orderId);\n\n void addCityToRoute(Long orderId, List<Long> cityIdList);\n\n void removeCityFromRoute(Long orderId, Long cityId);\n\n void updateBoardUpdateOrder(Order order);\n\n void updateBoardUpdateOrder(String driverLogin);\n\n void closeOrder(Long orderId);\n\n boolean isAllPointsDoneByOrder(Order order);\n\n boolean isAllPointsDoneByOrderId(Long orderId);\n\n Order sortPathPointsByRoute(Order order);\n\n}", "public interface OpenOrder {\n\n /**\n * Returns the ID for this order.\n *\n * @return the ID of the order.\n */\n String getId();\n\n /**\n * Returns the exchange date/time the order was created.\n *\n * @return The exchange date/time.\n */\n Date getCreationDate();\n\n /**\n * Returns the id of the market this order was placed on.\n *\n * @return the id of the market.\n */\n String getMarketId();\n\n /**\n * Returns the type of order. Value will be {@link OrderType#BUY} or {@link OrderType#SELL}.\n *\n * @return the type of order.\n */\n OrderType getType();\n\n /**\n * Returns the price per unit for this order. This is usually in BTC or USD.\n *\n * @return the price per unit for this order.\n */\n BigDecimal getPrice();\n\n /**\n * Returns the Quantity remaining for this order. This is usually the amount of the other currency\n * you want to trade for BTC/USD.\n *\n * @return the Quantity remaining for this order.\n */\n BigDecimal getQuantity();\n\n /**\n * Returns the Original total order quantity. If the Exchange does not provide this information,\n * the value will be null. This is usually the amount of the other currency you want to trade for\n * BTC/USD.\n *\n * @return the Original total order quantity if the Exchange provides this information, null\n * otherwise.\n */\n BigDecimal getOriginalQuantity();\n\n /**\n * Returns the Total value of order (price * quantity). This is usually in BTC or USD.\n *\n * @return the Total value of order (price * quantity).\n */\n BigDecimal getTotal();\n}", "public interface SingleTaskOrderController {\n\n /**\n * This method is used to place a SingleTaskOrder.\n *\n * @param user The user who wants to place the order\n * @param order The order the caller wants to place.\n */\n public void placeSingleTaskOrder(User user, SingleTaskOrder order);\n\n}", "public interface OrderDaoIFC {\n void addOrder(final OrderInfo orderInfo);\n\n List<String> queryByTel(String tel);\n}", "public interface DubboOrderShippingService {\n}", "public interface OrderExcuter {\n void excute(IOrder order);\n\n}", "public interface OrderSplitService {\n\n void initiateOrderSplitData(Properties openOrderProperties) throws GloriaApplicationException;\n\n}", "public interface OrderService {\n\n /**\n * 分页\n * @param rebateVo\n * @return\n */\n PageDTO<RebateDTO> fetchPage(OrderVo rebateVo);\n\n /**\n * 获得订单详细信息\n *\n * @param orderId\n * @return\n */\n OrderDTO getOrder(long orderId);\n\n /**\n * 确认订单\n * @param orderId\n * @return\n */\n OrderDTO sureOrder(long orderId);\n\n}", "public interface AppEnvironment\n{\n /**\n * Registers the given OrderConsumer, such that it will be notified of order based events.\n * \n * @param orderConsumer\n */\n void registerOrderConsumer(OrderConsumer orderConsumer);\n\n /**\n * Performs a run of order processing\n */\n void run();\n\n}", "public interface OrderDetailService {\n\t\n\t/**\n\t * This method is to create all order details to a specific order. \n\t * @param lOrderDetails List of details to a specific order.\n\t * @param order Order to assigned the list of details\n\t * @return\n\t */\n\tpublic int addOrderDetail(List<OrderDetail> lOrderDetails, Order order);\n\t\n\t/**\n\t * This method find all order details of the a specific order\n\t * @param orderId orderId\n\t * @return List of order detail asociated a specific order \n\t */\n\tpublic List<OrderDetail> getOrderDetailByOrder(Long orderId);\n\n}", "public interface OIMBizLocal {\n \n public void localOp();\n \n public void processEvent(BusinessEvent event);\n}", "public interface OrderService {\n OrderDto makeOrder(OrderDto orderDto);\n\n List<OrderDto> getAllOrders(String userPhone);\n\n void removeOrderById(Long id);\n\n boolean getOrderById(Long id);\n\n List<OrderDto> getAllOrders();\n\n List<OrdersEntity> getOrders();\n\n OrderDto acceptOrder(OrderDto orderDto);\n\n List<OrderDto> getAcceptOrders(String driverPhone);\n\n OrderDto removeAcceptedOrder(Long id);\n}", "public interface IShopEngine {\n\n\n /**\n * Moves a product from basket to archive basket\n */\n public void doShopping(IBasket basket,IArchiveBasket archiveBasket);\n\n}", "public interface OrderService {\n\n /**\n * Get Quote ID\n *\n * @return String id of quote\n */\n @POST(\"V1/carts/mine\")\n Observable<String> getQuoteID();\n\n /**\n * Add item to cart\n *\n * @param CartItemRequest\n * @return CartProductItem\n * @see CartProductItem\n */\n @POST(\"V1/carts/mine/items\")\n Observable<CartProductItem> addItemToCart(@Body CartItemRequest CartItemRequest);\n\n /**\n * @param mail\n * @return\n */\n @POST(\"V2/eshopping/store/clearCart/{mail}\")\n Observable<Integer> clearItemFromCart(@Path(\"mail\") String mail);\n\n /**\n * @param id\n * @return OrderDetail\n * @see OrderDetail\n */\n @GET(\"V1/orders/{order_id}\")\n Observable<OrderDetail> getOrderDetail(@Path(\"order_id\") Long id);\n\n /**\n * Get order detail list\n *\n * @param stringHashMap\n * @return ItemList\n * @see ItemList\n */\n @GET(\"V1/orders/?\")\n Observable<ItemList> getOrderDetailList(@QueryMap HashMap<String, String> stringHashMap);\n\n /**\n * @param shippingMethod\n * @return List of ShipmentMethodInfo\n * @see ShipmentMethodInfo\n */\n @POST(\"V1/carts/mine/estimate-shipping-methods\")\n Observable<List<ShipmentMethodInfo>> estimateShippingMethods(@Body ShippingMethod shippingMethod);\n\n /**\n * @param shippingBilling\n * @return CheckoutResponse\n * @see CheckoutResponse\n */\n @POST(\"V1/carts/mine/shipping-information\")\n Observable<CheckoutResponse> summitShipment(@Body ShippingBilling shippingBilling);\n\n /**\n * @param orderProduct\n * @return List of Bulk Order\n */\n @POST(\"V2/eshopping/store/orderProduct\")\n Observable<List<String>> bulkOrder(@Body OrderProduct orderProduct);\n\n /**\n *\n * @param id\n * @return\n */\n @GET(\"V2/eshopping/order/getAddressLatitudeLongitude/{order_id}\")\n Observable<List<String>> getOrderDetailLatLng(@Path(\"order_id\") Long id);\n\n /**\n *\n * @param id\n * @return\n */\n @GET(\"V2/eshopping/order/getServiceFee/{order_id}\")\n Observable<String> getOrderServiceFee(@Path(\"order_id\") Long id);\n\n /**\n *\n * @param id\n * @return\n */\n @GET(\"V2/eshopping/order/getDeliveryDate/{order_id}\")\n Observable<String> getDeliveryDate(@Path(\"order_id\") Long id);\n\n /**\n *\n * @param id\n * @return\n */\n @GET(\"V2/eshopping/order/getDeliveryComment/{order_id}\")\n Observable<String> getOrderComment(@Path(\"order_id\") Long id);\n\n /**\n *\n * @param incrementId\n * @return\n */\n @GET(\"V2/eshopping/order/getItemsByIncrementId/{increment_id}\")\n Observable<List<ProductItem>> getOrderItems(@Path(\"increment_id\") String incrementId);\n\n /**\n * @see OrderItem\n * @param orderId orderId\n * @return List of OrderItem\n */\n @GET(\"V2/eshopping/order/visibaleItem/{orderId}\")\n Observable<List<OrderItem>> getOrderItemsByOrderId(@Path(\"orderId\") Long orderId);\n\n /**\n * get order status comment\n * @param orderId Long\n * @return List of OrderStatus\n */\n @GET(\"V2/eshopping/order/statusHistories/{orderId}\")\n Observable<List<OrderStatus>> getOrderStatusComment(@Path(\"orderId\") Long orderId);\n\n /**\n * Get driver location history\n * @param orderId Long\n * @return List<DriverLocation>\n */\n @GET(\"V2/eshopping/driver/getDriverLocationByOrderId/{orderId}\")\n Observable<List<DriverLocation>> getLocationHistoryByOrderId(@Path(\"orderId\") Long orderId);\n\n /**\n * Get last driver location history\n * @param orderId Long\n * @return List<DriverLocation>\n */\n @GET(\"V2/eshopping/driver/getDriverLastLocation/{orderId}\")\n Observable<List<DriverLocation>> getLastDriverLocationByOrderId(@Path(\"orderId\") Long orderId);\n\n /**\n *\n * @param orderId\n * @return\n */\n @GET(\"V2/eshopping/driver/getDriverInfoByOrderId/{orderId}\")\n Observable<List<DriverInfo>> getDriverInfoByOrderId(@Path(\"orderId\") Long orderId);\n}", "public interface OrderMapper<OrderPojo> {\n\n\n String setOrder(OrderPojo model);\n List<OrderPojo> getOrderList(List<String> orderIds,String searchWord);\n PageInfo getOrderList(List<Map> taskInfoList, String searchWord, Integer page, Integer size);\n OrderPojo getOrderInfo(String orderId);\n boolean deleteOrder(String id);\n String getProcessDefinitionId();\n List<OrderPojo> getOrderByTime(Date startTime,Date endTime);\n boolean doAfterCommit(ClaimInfo claimInfo , TaskInfo taskInfo);\n boolean setProInsId(String orderId , String proInsId);\n boolean setOrderStatus(String orderId , String orderStatus);\n PageInfo getOrderListByQueryCriteria(Map queryCriteria, Integer page, Integer size);\n}", "public interface IOrderDetails {\n String getOrderNumber();\n String getOrderDate();\n String getTrainNumber();\n String getDispatchStation();\n String getDestinationStation();\n String getDepartureDate();\n String getArrivalDate();\n String getWagonRoad();\n String getWagonOwner();\n String getWagonNumber();\n String getWagonType();\n String getNumberOfSeats();\n String getSeats();\n String getAdditionalInformation();\n String getPrice();\n String getOrderState();\n String getEcState();\n String getEcDate();\n}", "public interface Orders {\n Optional<Order> createOrder(User user, HashMap<String, Object> orderInfo);\n\n Optional<Order> findByUidOid(String uid, long oid);\n\n List<Order> findAllByUid(String username);\n\n}", "public interface JstOrderDAO {\n\n long saveOrder(JstOrder order);\n JstOrder getOrderById(long id);\n JstOrder getOrderByName(String name);\n List<Long> getOrderIds(Map<String, Object> map);\n List<Long> getOrderIdsInMonth(Map<String, Object> map);\n int getOrderCount();\n int getTotalByMemberId(@Param(\"memId\") long memId);\n List<Long> getOrderIdsByMem(long memId);\n int revokeOrder(@Param(\"orderId\")long orderId);\n Map<String, Object> getOrderCountAndAmount(Map<String, Object> map);\n}", "public interface MsgManageInf {\n void parseOrder(String order);\n}", "public interface StoreService {\n\n void registerOrder(Order order);\n Order getRecievedOrder(String id);\n\n}", "public interface OrderService {\n Order create(Order order);\n Order update(Order order);\n boolean delete(Order order);\n Order get(int id);\n Collection<Order> get();\n}", "public interface InventoryService {\n\n /**\n * Lists the inventory.\n * @return List of the inventory\n */\n List<Inventory> getInventoryList();\n\n /**\n * Executes an order using an OrderForm.\n * @param orderForm\n * @return\n * @throws Exception\n */\n List<Inventory> executeOrder(OrderForm orderForm) throws Exception;\n\n /**\n * Resets the data.\n */\n void reset();\n\n}", "public interface OrderService {\n PageInfo<OrderEntity> getOrders(int index, int size);\n PageInfo<OrderEntity> getOrdersForScript(int index, int size, OrderEntity entity);\n PageInfo<OrderEntity> getAll();\n int insertOrder(OrderEntity entity);\n}", "public interface IOrderService {\n /**\n * 添加订单\n * @param order\n * @return\n */\n public Order save(Order order);\n\n /**\n * 查询用户所有订单\n * @param id 用户id\n * @return\n */\n public List<Order> findAll(Integer id);\n\n /**\n * 查询订单详情\n * @param id\n * @return\n */\n public Order findOne(Integer id);\n\n /**\n * 查询房源订单\n * @param houseId 房源id\n * @param liveTime 入住时间\n * @param leaveTime 离开时间\n * @return\n */\n public List<Order> findByTime(Integer houseId, String liveTime, String leaveTime);\n}", "public interface OrderProcessPRDAO extends BaseDAO<OrderProcessPR> {\n\n\n}", "public interface ProductoOperations \r\n{\r\n boolean insertarProducto (int pro_id, String pro_detalle, int pro_valor);\r\n String consultarProducto (int pro_id, String pro_detalle, int pro_valor);\r\n boolean eliminarProducto (int pro_id, String pro_detalle, int pro_valor);\r\n boolean actualizarProducto (int pro_id, String pro_detalle, int pro_valor);\r\n String listarProducto ();\r\n void shutdown ();\r\n}", "public interface RegisterOrderUseCase {\n\n Map<String, String> putOrderInCart(ClientOrder order);\n\n}", "public interface COPSPdpOSDataProcess extends COPSDataProcess {\r\n\r\n /**\r\n * Gets the policies to be uninstalled\r\n * @param man The associated request state manager\r\n * @return A <tt>Vector</tt> holding the policies to be uninstalled\r\n */\r\n public List<COPSDecision> getRemovePolicy(COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Gets the policies to be installed\r\n * @param man The associated request state manager\r\n * @return A <tt>Vector</tt> holding the policies to be uninstalled\r\n */\r\n public List<COPSDecision> getInstallPolicy(COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Makes a decision from the supplied request data\r\n * @param man The associated request state manager\r\n * @param reqSIs Client specific data suppplied in the COPS request\r\n */\r\n public void setClientData(COPSPdpOSReqStateMan man, List<COPSClientSI> reqSIs);\r\n\r\n /**\r\n * Builds a failure report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void failReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Builds a success report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void successReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Builds an accounting report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void acctReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Notifies that no accounting report has been received\r\n * @param man The associated request state manager\r\n */\r\n public void notifyNoAcctReport (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies a keep-alive timeout\r\n * @param man The associated request state manager\r\n */\r\n public void notifyNoKAliveReceived (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies that the connection has been closed\r\n * @param man The associated request state manager\r\n * @param error Reason\r\n */\r\n public void notifyClosedConnection (COPSPdpOSReqStateMan man, COPSError error);\r\n\r\n /**\r\n * Notifies that a request state has been deleted\r\n * @param man The associated request state manager\r\n */\r\n public void notifyDeleteRequestState (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies that a request state has been closed\r\n * @param man The associated request state manager\r\n */\r\n public void closeRequestState(COPSPdpOSReqStateMan man);\r\n\r\n}", "public interface TOrderService {\r\n\r\n /**\r\n * @Description: 根据订单号查询订单详情\r\n * @Param: [ordCode]\r\n * @return: java.util.List<com.lcyzh.nmerp.entity.TOrderItem>\r\n * @Author: lijinku\r\n * @Iteration : 1.0\r\n * @Date: 2019/7/2 11:16 AM\r\n */\r\n List<TOrderItem> findByOrdCode(String ordCode);\r\n\r\n /**\r\n * @Description: 产品计划分配\r\n * @Param: [voList, ordCode]\r\n * @return: int\r\n * @Author: lijinku\r\n * @Iteration : 1.0\r\n * @Date: 2019/7/2 10:53 AM\r\n */\r\n int ordProduceAssign(List<OrderItemAssignVo> voList,String ordCode);\r\n\r\n /**\r\n * @Description: 多条件分页查询\r\n * @Param: [page, order]\r\n * @return: com.lcyzh.nmerp.common.persistence.Page<com.lcyzh.nmerp.model.vo.OrderQueryVo>\r\n * @Author: lijinku\r\n * @Iteration : 1.0\r\n * @Date: 2019/7/2 10:53 AM\r\n */\r\n Page<OrderQueryVo> findPage(Page<OrderQueryVo> page, OrderQueryVo order);\r\n\r\n int insert(OrderAddModifyVo vo);\r\n\r\n /**\r\n * @Description: 批量录入订单\r\n * @Param: [voList]\r\n * @return: int\r\n * @Author: lijinku\r\n * @Iteration : 1.0\r\n * @Date: 2019/7/2 10:53 AM\r\n */\r\n int insertBatch(List<OrderAddModifyVo> voList);\r\n\r\n int update(TOrder tOrder);\r\n\r\n int delete(TOrder tOrder);\r\n\r\n}", "public interface OrderService {\n /**\n * Save a order\n * \n * @param object\n * @return just saved profile\n */\n Order save(Order object);\n\n /**\n * Get all the order\n * \n * @return all the order\n */\n Collection<Order> getAll();\n\n /**\n * Get all the user profile filtered on user and project\n * \n * @param user\n * @param project\n * @param filterDate\n * @param filterDeliveredDate\n * @param filterStatus\n * @param firstResult\n * @param excludeCancelled\n * @param maxResult\n * @param sortProperty\n * @param isAscending\n * @return all the user profile\n */\n Collection<Order> get(User user, Project project, Date filterDate, Date filterDeliveredDate, OrderStatus filterStatus, boolean excludeCancelled, int firstResult,\n int maxResult, String sortProperty, boolean isAscending);\n\n /**\n * Remove a profile\n * \n * @param order\n */\n void remove(Order order);\n\n /**\n * Cancel an order\n * \n * @param order\n * @param user user is performing the action\n * \n */\n Order cancel(Order order, User user);\n\n /**\n * Return the order by id\n * \n * @param id\n * @return user with the passed email\n */\n Order getByID(String id);\n\n /**\n * place a new order\n * \n * @param order the new order to insert\n * @param project project relates to order\n * @param user user that place the order\n * @return\n */\n Order placeNewOrder(Order order, Project project, User user);\n\n /**\n * Creates a {@link ProductOrdered} with correct data, adds the new ProductOrdered to the Order, recalculates all the prices and discounts. <strong>NOT persists</strong>\n * \n * @param order\n * @param product\n * @param project\n * @param numberOfProds\n\n * @return\n */\n ProductOrdered addProductOrdered(Order order, Product product, Project project, int numberOfProds);\n\n /**\n * Remove a {@link ProductOrdered} from the given order, recalculates all the prices and discounts on the order.<strong>NOT persists</strong>\n * \n * @param order\n * @param productOrderedIndex position on the list of product to be removed\n * \n */\n void removeProductOrdered(Order order, int productOrderedIndex);\n\n /**\n * \n * @param user\n * @param project\n * @return\n */\n List<Date> getDates(User user, Project project);\n\n /**\n * \n * @param user\n * @param project\n * @return\n */\n List<Date> getDeliveredDates(User user, Project project);\n\n /**\n * Send mail notification, <b>Note</b>: <b>notificationEnabled</b> properties must be set to true\n * \n * @param order\n * @return\n */\n Order sendNotificationNewOrder(Order order);\n\n /**\n * Sets this order as in charge \n * \n * @param order\n * @param user user is performing the action\n * @return\n */\n Order setAsInCharge(Order order, User user);\n\n /**\n * Remove this order as in charge \n * \n * @param order\n * @param user user is performing the action\n * @return\n */\n Order removeInCharge(Order order, User user);\n\n /**\n * Sets this order as \"sent\" \n * \n * @param order\n * @param user user is performing the action\n * @return\n */\n Order setSentStatus(Order order, User user);\n\n /**\n * Remove this order as \"sent\" \n * \n * @param order\n * @param user user is performing the action\n * @return\n */\n Order removeSentStatus(Order order, User user);\n\n /**\n * Sets this order as \"delivered\" \n * \n * @param order\n * @param user user is performing the action\n * @param deliveredTime \n * @return\n */\n Order setDeliveredStatus(Order order, User user, Date deliveredTime);\n\n /**\n * Remove this order as \"delivered\" \n * \n * @param order\n * @param user user is performing the action\n * @return\n */\n Order removeDeliveredStatus(Order order, User user);\n\n /**\n * Sets this order as \"InvoiceApproved\" \n * \n * @param order\n * @param user user is performing the action\n * @param invoiceDate\n * @param invoiceDueDate \n * @return\n */\n Order setInvoiceApprovedStatus(Order order, User user);\n\n /**\n * Removes this order as \"InvoiceApproved\" \n * \n * @param order\n * @param user user is performing the action\n * @return\n */\n Order removeInvoiceApprovedStatus(Order order, User user);\n\n /**\n * Sets this order as \"InvoiceCreated\" \n * \n * @param order\n * @param user user is performing the action\n * @param invoiceDate\n * @param invoiceDueDate data di pagamento prevista \n * @return\n */\n Order setInvoiceCreatedStatus(Order order, User user, Date invoiceDate, Date invoiceDueDate);\n\n /**\n * Sets this order as \"PaidInvoice\" \n * \n * @param order\n * @param user user is performing the action\n * @return\n */\n Order setInvoicePaidStatus(Order order, User user);\n\n /**\n * Remove this order as \"InvoiceCreated\" \n * \n * @param order\n * @param user user is performing the action\n * @return\n */\n Order removeInvoiceCreatedStatus(Order order, User user);\n\n /**\n * Set the OrderStatus \n * \n * @param orderStatus\n * @param order\n * @param user user is performing the action\n * @return\n */\n Order setStatus(OrderStatus orderStatus, Order order, User user);\n\n /**\n * Set order on the given dates/project in charge\n * \n * @param user\n * @param project\n * @param date\n * @return\n */\n void setAsInCharge(User user, Project project, Date date);\n\n /**\n * Get products base on the given order properties\n * \n * @param order\n * @return\n */\n List<Product> getProducts(Order order);\n\n // /**\n // * \n // * @param o\n // * @return\n // */\n // Order applyDiscountIfApplicable(Order o);\n //\n // \n // /**\n // * \n // * @param o\n // * @return\n // */\n // Order applyFreeShippingCostIfApplicable(Order o);\n\n /**\n * \n * @param order\n * @return\n */\n boolean isOrderValid(Order order);\n\n String getNotesForDisplay(Order o);\n\n String getNotesForPDF(Order order);\n\n /**\n * Force discount on existing order <b>Use with caution</b>\n * \n * @param order\n * @param discountToAppply to the order\n * @return\n */\n Order modifyDiscountToOrder(Order order, int discountToAppply);\n\n /**\n * \n * @param o\n * @return the order, product ordered with the correct costs and discount applied\n */\n public abstract Order calculatesCostsAndDiscount(Order o);\n\n /**\n * \n * @param o\n * @param cost cost to apply\n * @param discountForced discount to be forced\n * @return\n */\n Order forcePriceAndDiscountAndRecalculate(Order o, BigDecimal cost, BigDecimal discountForced);\n\n}", "public interface OrderService {\r\n\r\n /**\r\n * 创建订单\r\n * @param orderDTO\r\n * @return\r\n */\r\n OrderDTO create(OrderDTO orderDTO);\r\n\r\n /**\r\n * 完结订单(只能卖家操作)\r\n * @param orderId\r\n * @return\r\n */\r\n OrderDTO finish(String orderId);\r\n}", "public interface SistemaArqOperations \r\n{\r\n int list_Arq (String nome, String[] aq, String p);\r\n String[] att_clientes ();\r\n String[] get_Arq (int a);\r\n void set_Arq (String[] aq, int idd);\r\n String get_path (int a);\r\n int qtd_clientes ();\r\n}", "public interface SuperOrderService {\n List<Order> queryForSettlement(Long customerId, Long carrierId, Date startDate, Date endDate);\n\n List<Order> queryForSettlement(Long customerId, Long carrierId, List<String> vins);\n\n List<Order> queryForSettlement(Map<String, Object> map);\n\n void updateForReconciliation(List<Long> orderDetailIds, boolean isReverse);\n\n void updateForTransfer(List<Long> orderDetailIds);\n\n void updateForSettlement(List<Long> orderDetailIds);\n\n List<Order> queryList(Map<String, Object> map);\n\n PageInfo<Order> queryList(Map<String, Object> map, int pageNum, int pageSize);\n\n List<OrderDetail> queryDetailByDetailIds(List<Long> detailIds);\n\n List<OrderDetail> queryDetailByOrderId(Long orderId);\n\n @Transactional\n void oneTouchOut(Long orderId, Long carrierId);\n\n void addSectionOrder(Order order);\n\n void addOrder(Order order);\n\n @Transactional\n void update(Order order);\n\n void checkDetailForOther(List<OrderDetail> details, boolean isSameCorp);\n\n void checkDetailForIn(List<OrderDetail> details);\n\n void checkOrder(Order order);\n}", "public interface OrderService {\n Order getById(Long id);\n\n void insert(Order order);\n\n List<Order> getAll();\n}", "public interface OrderContract {\n interface OrderContractPresenter {\n void loaAlldOrder(String userId, String status);\n\n boolean loadJudgeView(List<OrderAllBean.DataBean.ListBean> list, ListView listView, ImageView imageView, TextView textView);\n }\n\n interface OrderContractView {\n void showAlldOrder(OrderAllBean orderBean);\n }\n}", "public interface OrderPrePayService {\n\n int add(OrderPrePayDO orderPrePayDO);\n\n int deleteByOrderNo(String orderNo);\n\n OrderPrePayDO queryByOrderNo(String orderNo);\n}", "public interface PurchaseOrderService {\n /**\n * create Purchase Order From Boq.\n * @param boqDetail boqDetail\n * @param appUser appUser\n * @return PurchaseOrderHeader\n */\n PurchaseOrderHeader createPoFromBoq(BoqDetail boqDetail, AppUser appUser);\n /**\n * add lines to Purchase Order Header.\n * @param purchaseOrderHeader purchaseOrderHeader\n * @param boqDetail boqDetail\n * @return boolean\n */\n boolean addLineToPoFromBoqDetail(PurchaseOrderHeader purchaseOrderHeader, BoqDetail boqDetail);\n\n /**\n * save Purchase Order Header into database.\n * @param purchaseOrderHeader purchaseOrderHeader\n * @param securityContext securityContext\n * @return response\n */\n CommonResponse savePurchaseOrder(PurchaseOrderHeader purchaseOrderHeader, SecurityContext securityContext);\n\n /**\n * get all purchase Order Header.\n * @return List of PurchaseOrderHeader\n */\n List<PurchaseOrderHeader> getAllPurchaseOrderHeaders();\n\n /**\n * get PurchaseOrderHeader whole oblect per pohId.\n * @param pohId pohId.\n * @return PurchaseOrderHeader\n */\n PurchaseOrderHeader getPurchaseOrderHeaderWhole(long pohId);\n /**\n /**\n * get product purchase items for specific supplier.\n * @param suppId suppId\n * @param searchStr searchStr\n * @return List of PruductPurchaseItem\n */\n List<ProductPurchaseItem> getAllSupplierProductPurchaseItems(long suppId, String searchStr);\n /**\n * get all purchase Order Header.\n * @param supplierId supplierId\n * @return List of PurchaseOrderHeader\n */\n List<PurchaseOrderHeader> getAllPurchaseOrderHeaderPerOrguIdAndSupplierIdAndStatusCode(long supplierId);\n\n /**\n * get all purchase Order Header per orguid and status.\n * @return List of PurchaseOrderHeader\n */\n List<PurchaseOrderHeader> getAllPurchaseOrderHeaderNotFullyReceived();\n\n /**\n * get all purchase Order Header for specific supplier.\n * @param supplierId supplierId\n * @return List of PurchaseOrderHeader\n */\n List<PurchaseOrderHeader> getAllPurchaseOrderHeaderPerOrguIdAndSupplierId(long supplierId);\n /**\n * search purchase order header.\n * @param searchForm searchForm\n * @return List of PurchaseOrderHeader\n */\n List<PurchaseOrderHeader> searchPurchaseOrderHeaders(GeneralSearchForm searchForm);\n\n /**\n * get product purchase item for specific supplier and catalog no.\n * @param suppId suppId\n * @param catalogNo catalogNo\n * @return List of PruductPurchaseItem\n */\n ProductPurchaseItem getSupplierProductPurchaseItemPerCatalogNo(long suppId, String catalogNo);\n\n /**\n * get all purchase Order Header for specific product.\n * @param prodId prodId\n * @return List of PurchaseOrderHeader\n */\n List<PurchaseLine> getAllPurchaseOrderOfProduct(long prodId);\n\n /**\n * search purchase order header.\n * @param searchForm searchForm\n * @return List of PurchaseOrderHeader\n */\n GeneralSearchForm searchPurchaseOrderHeadersPaging(GeneralSearchForm searchForm);\n /**\n * create Purchase Order From Boq.\n * @param txnDetail sale order detail\n * @param appUser appUser\n * @return PurchaseOrderHeader\n */\n PurchaseOrderHeader createPoFromSaleOrder(TxnDetail txnDetail, AppUser appUser);\n\n /**\n * add lines to Purchase Order Header from txn detail.\n * @param purchaseOrderHeader purchaseOrderHeader\n * @param txnDetail txnDetail\n * @return true if successfull, otherwise return false;\n */\n boolean addLineToPoFromTxnDetail(PurchaseOrderHeader purchaseOrderHeader, TxnDetail txnDetail);\n\n /**\n * get all purchase order headers linked to specific sale order.\n * @param txhdId transaction header id.\n * @return List of purchase order linked to sale order\n */\n List<PurchaseOrderHeader> getAllPurchaseOrderOfSaleOrder(long txhdId);\n\n /**\n * update status of linked BOQ.\n * @param pohId purchaes order header id.\n */\n void updatePurchaseOrderLinkedBoqStatus(long pohId);\n\n /**\n * delete purchase order per poh id.\n * @param pohId pohId\n * @return CommonResponse.\n */\n CommonResponse deletePurchaseOrderPerPhoId(long pohId);\n\n /**\n * update order status of linked sales orders.\n * @param pohId purchaes order header id.\n */\n void updatePurchaseOrderLinkedSaleOrderStatus(long pohId);\n\n /**\n * get all IN-PROGRESS and CONFIRMED purchase Order Header.\n * @param supplierId supplierId\n * @return List of PurchaseOrderHeader\n */\n List<PurchaseOrderHeader> getAllOutstandingAndConfirmedPurchaseOrderHeaderPerOrguIdAndSupplierId(long supplierId);\n\n\n /**\n * get product purchase item for specific supplier and catalog no.\n * @param sprcId sprcId\n * @return List of PruductPurchaseItem\n */\n ProductPurchaseItem getProductPurchaseItemPerId(long sprcId);\n}", "public interface Iprocessor {\n public void process(RoundEnvironment roundEnvironment, Element typeElement, Filer mfFiler, Elements elements, Messager messager);\n}", "public interface WarehouseOperativeObserver {\n void updateOrder(OrderComponent orderComponent) throws OrderUpdateException;\n}", "public interface OrderService {\n\n OrderDTO create(OrderDTO orderDTO);\n\n OrderDTO findOne(String orderId);\n\n Page <OrderDTO> findList(String buyerOpenId, Pageable pageable);\n\n\n OrderDTO cancel(OrderDTO orderDTO);\n\n OrderDTO finish(OrderDTO orderDTO);\n\n OrderDTO paid(OrderDTO orderDTO);\n\n}", "public interface IServiceOrderDetailView {\n void getOrderInfoSuccess(Orders orders);\n\n void reDistributeSuccess();\n}", "public interface OrderRefCartService {\n public int insert(String ids,String orderNumber);\n}", "public interface AdditionalOrderInforCaller {\n\t/*\n\t * Command define from Order Confirmation API Guide\n\t * JSON and XML format\n\t */\n\t@Headers({\"Accept: application/json\",\"Content-Type: application/json\"})\n\t@RequestLine(\"POST /ordermgmt/order/addorderinfo?sellerid={sellerid}\")\n\tGetAdditionalOrderInformationResponse sendAdditionalOrderInforRequestJSON(@Param(\"sellerid\") String sellerID, GetAdditionalOrderInformationRequest body);\n\t\n\t@Headers({\"Accept: application/xml\",\"Content-Type: application/xml\"})\n\t@RequestLine(\"POST /ordermgmt/order/addorderinfo?sellerid={sellerid}\")\n\tGetAdditionalOrderInformationResponse sendAdditionalOrderInforRequestXML(@Param(\"sellerid\") String sellerID, GetAdditionalOrderInformationRequest body);\n\n\t// Implement default method of interface class that according to Variables.MediaType to run at JSON or XML request.\n\tdefault GetAdditionalOrderInformationResponse sendAdditionalOrderInforRequest(GetAdditionalOrderInformationRequest body) {\n\t\tswitch(Variables.MediaType) {\n\t\tcase JSON:\t\t\t\n\t\t\treturn sendAdditionalOrderInforRequestJSON(Content.SellerID, body);\n\t\t\t\n\t\tcase XML:\t\t\t\n\t\t\treturn sendAdditionalOrderInforRequestXML(Content.SellerID, body);\t\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new RuntimeException(\"Never Happened!\");\n\t\t}\n\t\t\t\t\n\t}\n\t\n\tstatic AdditionalOrderInforCaller buildJSON() {\n\t\tVariables.MediaType = MEDIA_TYPE.JSON;\n\t\t\n\t\treturn new CallerFactory<AdditionalOrderInforCaller>()\n\t\t\t.jsonBuild(AdditionalOrderInforCaller.class, Variables.LogLevel, Variables.Retryer, OrderClient.genClient());\t\t\n\t}\n\n\tstatic AdditionalOrderInforCaller buildXML() {\n\t\tVariables.MediaType = MEDIA_TYPE.XML;\n\t\t\n\t\treturn new CallerFactory<AdditionalOrderInforCaller>()\n\t\t\t.xmlBuild(AdditionalOrderInforCaller.class, Variables.LogLevel, Variables.Retryer, OrderClient.genClient());\t\t\n\t}\n\t\n}", "public interface PedidoOperations \r\n{\r\n boolean guardarPedido (int id_pedido, String fecha, String cantidad_producto, String precio_unitario);\r\n boolean actualizarPedido (int id_pedido, String fecha, String cantidad_producto, String precio_unitario);\r\n boolean eliminarPedido (int id_pedido);\r\n String consultarPedido (int id_pedido);\r\n void shoutdown ();\r\n}", "public interface ICookingTableService {\n public void saveOrder(int orderId);\n public List<CookingTable> findCookingTable();\n public void editOrderCookingNum(int orderId,int completeNum);\n public List<CookingTable> findNotServiceOrders();\n}", "public interface OrderDAOI{ \r\n\r\n \r\n enum SQL {\r\n\t\tGETALLUSERSORDERSBYID(\"SELECT * FROM TSR_ADMIN.TSR_ORDER WHERE CUSTOMER_ID=?\"),\r\n GETORDERBYDATE(\"SELECT * FROM TSR_ADMIN.TSR_ORDER WHERE ORDER_DATE=?\"),\r\n GETORDERBYID(\"SELECT * FROM TSR_ADMIN.TSR_ODER WHERE ORDER_ID=?\");\r\n\t\t\r\n\t\tString query;\r\n\t\t\r\n\t\tSQL(String givenQuery){\r\n\t\t\tquery = givenQuery;\r\n\t\t}\r\n\t\t\r\n\t\tString getQuery() {\r\n\t\t\treturn query;\r\n\t\t}\r\n }\r\n\r\n /**\r\n * getAllUsersOrdersById gets all of a users orders.\r\n * @param userId the user's ID \r\n * @return A list of orders type List\r\n */\r\n public List<Order> getAllUsersOrdersById(long userId);\r\n\r\n /**\r\n * getOrdersByDate gets all orders on a specified date\r\n * @param date the date of the order(s)\r\n * @return a List of Orders type List\r\n */\r\n public List<Order> getOrdersByDate(Date date);\r\n\r\n /**\r\n * getOrderByid returns an order specified by the ID\r\n * @param orderId the order's Id\r\n * @return a list of Orders type List\r\n */\r\n public Order getOrderById(long orderId);\r\n\r\n}", "public interface Chef {\n\n void update(Order order);\n\n}", "public interface Cartmanagement extends UcFindCart, UcManageCart {\n\n}", "public void provideOrderAccess() {\n\t\tint choiceOrder = View.NO_CHOICE;\n\t\t// get customer id and date for the order\n\t\tLong customerId = view.readIDWithPrompt(\"Enter Customer ID for Order: \");\n\t\tif (customerId == null) {\n\t\t\tSystem.out.println(\"Error: Customer Not Found.\");\n\t\t}\n\t\tLong orderId = view.readIDWithPrompt(\"Enter new Unique ID for Order: \");\n\t\tDate currDate = new Date();\n\n\t\t// create the order,\n\t\t// add the orderID to Customer\n\t\tatMyService.placeOrder(customerId, orderId, currDate);\n\n\t\t// enter loop to add items to the order\n\t\tArrayList<Long[]> items = new ArrayList<Long[]>();\n\t\twhile (choiceOrder != View.ENDORDER) {\n\t\t\t// display the order menu\n\t\t\tview.menuOrder();\n\t\t\tchoiceOrder = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\tswitch (choiceOrder) {\n\t\t\t\tcase View.ADD_ORDER_ITEM:\n\t\t\t\t\tLong itemID = view.readIDWithPrompt(\"Enter Item ID: \");\n\t\t\t\t\t// note: Needs to be Long for Long[] below. \n\t\t\t\t\t//Also, i DO want to use readID rather than readInt then convert to long,\n\t\t\t\t\t// because I do not want amt to be negative. \n\t\t\t\t\tLong amt = view.readIDWithPrompt(\"Enter Amount: \");\n\t\t\t\t\t// check to see if the item exists and is in stock\n\t\t\t\t\tItem temp = atMyService.findItem(itemID);\n\t\t\t\t\tif (temp == null) {\n\t\t\t\t\t\tSystem.out.println(\"Item '\" + itemID + \"' not found. Item skipped.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((temp.getStock() - amt) < 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"There is only '\" + temp.getStock() + \"' of this item left. Please try again.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the items to the arrayList\n\t\t\t\t\t\t\tLong[] toAdd = { itemID, amt };\n\t\t\t\t\t\t\titems.add(toAdd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase View.ENDORDER:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert arrayList to array, add to orders.\n\t\tif (!(items.isEmpty())) {\n\t\t\tLong[][] array = new Long[items.size()][2];\n\t\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\t\tarray[i][0] = items.get(i)[0];\n\t\t\t\tarray[i][1] = items.get(i)[1];\n\t\t\t}\n\t\t\tatMyService.addOrderItems(orderId, array);\n\t\t}\n\t}", "public interface EssayGalaxyService {\n Object order(Long start, Long end);\n}", "public interface OrderService {\n\t\n\t/**\n\t * Gets all orders\n\t * \n\t * @return List of orders\n\t * @throws ServiceException if DAOException was thrown\n\t */\n\tList<Order> getOrderList() throws ServiceException;\n\t\n\t/**\n\t * Gets orders by certain status\n\t * \n\t * @param orderStatus\n\t * @return List of orders with specific status\n\t * @throws ServiceException if DAOException was thrown\n\t */\n\tList<Order> getOrderListByStatus(OrderStatusEnum orderStatus) throws ServiceException;\n\t\n\t/**\n\t * Adds new order\n\t * \n\t * @param order\n\t * @return 0 of adding is successful\n\t * @throws ServiceException if DAOException was thrown\n\t */\n\tint createNewOrder (Order order) throws ServiceException;\t\n\t\n\t/**\n\t * Gets order by id\n\t * \n\t * @param id\n\t * @return Order entity\n\t * @throws ServiceException if DAOException was thrown\n\t */\n\tOrder getOrder(int id) throws ServiceException;\t\n\t\n\t/**\n\t * Updates order status\n\t * \n\t * @param id\n\t * @param orderStatus\n\t * @throws ServiceException if DAOException was thrown\n\t */\n\tvoid updateOrderStatus(int id, OrderStatusEnum orderStatus) throws ServiceException;\t\n\t\n\t/**\n\t * Sets rejection reason for order\n\t * \n\t * @param id\n\t * @param reason\n\t * @throws ServiceException if DAOException was thrown\n\t */\n\tvoid rejectOrder(int id, String reason) throws ServiceException;\t\n\t\n\t/**\n\t * Sets damage amount for certain order\n\t * \n\t * @param id\n\t * @param totalAmount\n\t * @throws ServiceException if DAOException was thrown\n\t */\n\tvoid sendDamagesAmount(int id, int totalAmount) throws ServiceException;\t\n\t\n\t/**\n\t * Gets all orders of certain user\n\t * \n\t * @param userId\n\t * @return List of users orders\n\t * @throws ServiceException if DAOException was thrown\n\t */\n\tList<Order> getUserOrderList(int userId) throws ServiceException;\t\n\t\n\t/**\n\t * Checks if user unfinished and unpaid orders\n\t * \n\t * @param userId\n\t * @return false if users does not have unfinished orders\n\t * @throws ServiceException if DAOException was thrown\n\t */\n\tboolean checkForUnfinishedOrders (int userId) throws ServiceException;\t\n\t\n\t/**\n\t * Gets list of dates for which car is unavailable\n\t * \n\t * @param carId\n\t * @return List of dates\n\t * @throws ServiceException if DAOException was thrown\n\t */\n\tList<String> getResevedDatesList(int carId) throws ServiceException;\n}", "public interface IFsOrderUserService {\n\n /**\n * 1.添加订单记录\n * @return\n */\n boolean addOrder(FsOrderUser fsOrderUser);\n\n /**\n * 2.按照id删除订单记录\n * @param orderId\n * @return\n */\n void removeOrder(Integer orderId);\n\n /**\n * 3.获取所有订单记录\n * @return\n */\n List<FsOrderUser> getAllOrder();\n\n /**\n * 4.根据id查询订单记录\n * @return\n */\n FsOrderUser getOrderById(Integer orderId);\n\n List<FsOrderUser> getOrderByUser(Integer userId);\n\n List<FsOrderUser> getOrderBySeller(Integer userId);\n\n List<FsOrderUser> getOrderUserChangeByUser(Integer userId);\n\n List<FsOrderUser> getFsOrderUserByorderNumber(String orderNumber);\n\n int deleteByPrimaryKey(Integer orderId);\n\n int insert(FsOrderUser record);\n\n int insertSelective(FsOrderUser record);\n\n FsOrderUser selectByPrimaryKey(Integer orderId);\n\n int updateByPrimaryKeySelective(FsOrderUser record);\n\n int updateByPrimaryKey(FsOrderUser record);\n\n List<FsOrderUser> getOrderUser();\n\n List<FsOrderUser> getOrderUserByUser(Integer userId);\n\n}", "protected abstract Order getOrder( int O_W_ID, int O_D_ID, Integer NO_O_ID, int O_CARRIER_ID );", "public interface IPrintOrderAccessor\n{\n Boolean persistPrintOrder(PrintOrder order);\n Boolean updatePrintOrderStatus(Long printOrderId, PrintOrder.ORDER_STATUS status);\n Boolean updatePrintOrderStatus(String manufacturerOrderNumber, PrintOrder.ORDER_STATUS status);\n Boolean updatePrintOrderStatuses(Long cartItemId, PrintOrder.ORDER_STATUS status);\n PrintOrder getPrintOrderByOrderNumber(String orderNumber, PrintOrder.ORDER_SYSTEM orderSystem,\n IEnums.SEEK_MODE mode);\n List<PrintOrder> getPrintOrdersByStatus(PrintOrder.ORDER_STATUS status, IEnums.SEEK_MODE mode, Long limit);\n Boolean updatePrintOrderManufacturerStatus(Long printOrderId, String status);\n List<PrintOrder> getPrintOrdersAwaitingSubmission(IEnums.SEEK_MODE mode, Long limit);\n Boolean updatePrintOrderShippingLabel(Long printOrderId, EasyPostPostageLabel shippingLabel);\n List<PrintOrder> getPrintOrdersBeingManufactured(IEnums.SEEK_MODE mode, Long limit);\n Boolean updatePrintOrderManufacturerOrderNumber(Long printOrderPrimaryKeyIdentifier, String orderNumber);\n Boolean updateLastStatusRequestDate(Long printOrderPrimaryKeyIdentifier, Date requestDate, Date nextRequestDate);\n Boolean updatePostageLabelStatus(String trackingNumber, EasyPostPostageLabel.TRACKING_STATUS status);\n String getEmailByTrackingNumber(String trackingNumber);\n PrintOrder.ORDER_STATUS getPrintOrderStatus(Long printOrderId);\n\n Boolean addPrintOrderToCartItem(Long cartItemId, PrintOrder printOrder);\n Boolean updateCartItemStatusByTrackingNumber(String trackingNumber, CartItem.CART_ITEM_STATUS status);\n List<CartItem> getCartItemsByTrackingNumber(String trackingNumber, IEnums.SEEK_MODE mode);\n Boolean updateOrderSubmitAttemptCount(Long printOrderId, Integer count);\n\n}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "public interface OrderContract {\n interface View extends BaseView{\n void showOrderList(List<OrderDto> orderEntities, int page);\n void getPayOrderSuccess(PayOrderDto payOrderDto);\n\n }\n interface Presenter extends BasePresenter{\n void loadOrder(int page,String finishOrder);\n void getPayOrder(OrderDto orderDto);\n }\n}", "public interface BillingService {\n /**\n * Attempts to charge the order to the credit card. Both successful and\n * failed transactions will be recorded.\n *\n * @return a receipt of the transaction. If the charge was successful, the\n * receipt will be successful. Otherwise, the receipt will contain a\n * decline note describing why the charge failed.\n */\n Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);\n}", "void getOrders();", "public interface OrderService {\n\n /**\n * 查询订单列表\n *\n * @param userId userId\n * @param pageNum pageNum\n * @param pageSize pageSize\n * @return pageInfo\n */\n ServerResponse<PageInfo> list(Integer userId, int pageNum, int pageSize);\n\n /**\n * 创建订单\n *\n * @param userId userId\n * @param shippingId shippingId\n * @return orderVo\n */\n ServerResponse insert(Integer userId, Integer shippingId);\n\n /**\n * 取消订单\n *\n * @param userId userId\n * @param orderNo orderNo\n * @return 取消的结果\n */\n ServerResponse<String> delete(Integer userId, Long orderNo);\n\n /**\n * 查询购物车商品\n *\n * @param userId userId\n * @return orderProductVO\n */\n ServerResponse getOrderCartProduct(Integer userId);\n\n /**\n * 查询订单详情\n *\n * @param userId userId\n * @param orderNo orderNo\n * @return orderVo\n */\n ServerResponse<OrderVO> getOrderDetail(Integer userId, Long orderNo);\n\n /**\n * 管理员查询所有订单\n *\n * @param pageNum pageNum\n * @param pageSize pageSize\n * @return 订单列表\n */\n ServerResponse<PageInfo> listOfAdmin(int pageNum, int pageSize);\n\n /**\n * 查看订单详情\n *\n * @param orderNo orderNo\n * @return 订单详情\n */\n ServerResponse<OrderVO> detail(Long orderNo);\n\n /**\n * 搜索订单\n *\n * @param orderNo orderNo\n * @param pageNum pageNum\n * @param pageSize pageSize\n * @return 搜索结果\n */\n ServerResponse<PageInfo> search(Long orderNo, int pageNum, int pageSize);\n\n /**\n * 发货\n *\n * @param orderNo orderNo\n * @return 发货结果\n */\n ServerResponse<String> sendGoods(Long orderNo);\n\n /**\n * 订单支付\n *\n * @param userId userId\n * @param orderNo orderNo\n * @param path path\n * @return 支付结果\n */\n ServerResponse pay(Integer userId, Long orderNo, String path);\n\n /**\n * 支付宝回调\n *\n * @param params params\n * @return 更新结果\n */\n ServerResponse alipayCallback(Map<String, String> params);\n\n /**\n * 查询订单支付状态\n *\n * @param userId userId\n * @param orderNo orderNo\n * @return 支付状态\n */\n ServerResponse queryOrderPayStatus(Integer userId, Long orderNo);\n}", "public interface ReceiptStrategy {\r\n public abstract void printReceipt();\r\n public abstract void addLineItem(String productID, int quantity);\r\n public abstract void addToLineItemArray(LineItem item);\r\n \r\n}", "public interface Process extends Serializable\n{\n\tpublic static final String NAME = \"Process Name\";\n\tpublic static final String TYPE = \"Process Type\";\n\t\n\tpublic static final String previousProcess = \"previousProcess\";\n\t\n\n\t/* initialization */\n\tpublic void init(Process process,Network network);\n\tpublic void init(Process process,List inputPorts,List outputPorts,Network network);\n\tpublic Network getNetwork();\n\tpublic Map getProperties();\n\tpublic void updateProperties(Map properties);\n\tpublic String getID();\n\t\n\t\n\n\t/* activity */\n\tpublic void preFire();\n\tpublic boolean isFireable(Map data);\n\tpublic void fire(Map data);\n\tpublic Map getData();\n\tpublic void updateData(Map change);\n\n\n\t/* communication management */\n\tpublic InputPort getInputPort(int index);\n\tpublic InputPort inputPortObject(int index);\n\tpublic int getInputPortCount();\n\tpublic List getInputPortList();\n\tpublic OutputPort getOutputPort(int index);\n\tpublic OutputPort outputPortObject(int index);\n\tpublic int getOutputPortCount();\n\tpublic List getOutputPortList();\n\n\tpublic void setPreviousProcess(Process pro1);\n\tpublic void setPrevProcessObj(Process prevProcessObj);\n}", "public interface OrderService {\n\n /**\n * Returns route time\n * @param routeDTO route data transfer object\n * @param orderDTO order dto for building route\n * @return\n */\n Long getRouteTime(RouteDTO routeDTO, OrderDTO orderDTO);\n\n /**\n * Returns drivers from database by specified order duration and order dto\n * @param time order duration\n * @param orderDTO order dto for building a route\n * @return linked hash map, key - drivers' id, value - drivers\n */\n LinkedHashMap<Long, Driver> getDriversForOrder(Long time, OrderDTO orderDTO);\n\n /**\n * Returns trucks from database by specified weight of cargoes\n * @param weight cargoes's weight\n * @return linked hash map, key - trucks' id, value - trucks\n */\n LinkedHashMap<Long, Truck> getTrucksForOrder(Long weight);\n\n /**\n * Specifies drop locations for picked up cargoes\n * @param routeDTO route dto with route points\n * @param points temp collection for building sub route\n */\n void setDropLocations(RouteDTO routeDTO, List<RoutePointDTO> points);\n\n /**\n * Returns weight of cargoes\n * @param routePointDTO temp route point dto with cargo or drop location\n * @param points already built route as list of ordered route points\n * @param weight previous weight data before adding new route point\n * @return weight\n */\n Long getWeight(RoutePointDTO routePointDTO, List<RoutePointDTO> points, Long weight);\n\n /**\n * Adds new route point to the route\n * @param routePointDTO new route point dto\n * @param routeDTO route data transfer object\n * @param points route as an ordered list of route points dtos\n */\n void newRoutePoint(RoutePointDTO routePointDTO, RouteDTO routeDTO, List<RoutePointDTO> points);\n\n /**\n * Returns all cities from database\n * @return linked hash map of cities, key - cities' id\n */\n LinkedHashMap<Long, City> getAllCitiesMap();\n\n /**\n * Adds order to a database\n * @param routeDTO route for building path for the order\n * @param orderDTO complex order data\n */\n void saveOrder(RouteDTO routeDTO, OrderDTO orderDTO);\n\n /**\n * Returns orders' from database as dtos\n * @return unsorted list of orders' data transfer objects\n */\n List<OrderDTO> getAllOrdersDTO();\n\n /**\n * Returns route points for order\n * @param order order entity for getting specified route points\n * @return unsorted list of route points\n */\n List<RoutePoint> getRoutePointsForOrder(Order order);\n\n /**\n * Returns cities dto adopted for RESTful architecture\n * @param id order id for retrieving data from database\n * @return unsorted list of cities as dtos adopted for RESTful architecture\n */\n List<CityDTORest> getRoutePointsForOrder(Long id);\n\n /**\n * Returns cargoes from database for the given order dto\n * @param orderDTO order dto\n * @return unsorted list of cargoes\n */\n List<Cargo> getCargoesForOrder(OrderDTO orderDTO);\n\n /**\n * Deletes order from database\n * @param id order's id for deletion\n */\n void deleteOrder(Long id);\n\n /**\n * Updates order\n * @param order order entity for updating\n */\n void updateOrder(Order order);\n\n /**\n * Return orders as dtos adopted for RESTful architecture\n * @return unsorted list of orders dtos adopted for RESTful architecture\n */\n List<OrderDTORest> getAllOrdersDTORest();\n\n /**\n * Delete temp route point dto from the route dto\n * @param routePoint temp route point dto\n * @param routeDTO route dto collected already built route\n */\n void deleteRoutePoint(String routePoint, RouteDTO routeDTO);\n\n /**\n * Processes new route point, recalculates distance and weight\n * @param orderDTO order dto\n * @param routeDTO route dto\n * @param routePointDTO new route point\n * @return temp cargoes weight\n */\n Long tempProcessPoint(OrderDTO orderDTO, RouteDTO routeDTO, RoutePointDTO routePointDTO);\n}", "public interface CommManagerInterface {\r\n\r\n /**\r\n * 执行comm命令\r\n */\r\n public String comm(List<String> paramerList);\r\n}", "public interface OrderService {\n\n /**\n * Creates a new order\n *\n * @param orderDTO order dto\n *\n * @return order created\n */\n OrderDTO create(OrderDTO orderDTO);\n\n /**\n * Updates an order\n *\n * @param orderDTO order dto\n *\n * @return order updated\n */\n OrderDTO update(String id, OrderDTO orderDTO);\n\n /**\n * Deletes a new order\n *\n * @param id order id\n *\n * @return order deleted\n */\n OrderDTO delete(String id);\n\n /**\n * Find an order for its id\n *\n * @param id order id\n *\n * @return order found\n */\n OrderDTO findBy(String id);\n\n /**\n * Find all orders that belongs to a customer\n * if customerId is null or empty, retrieves all orders\n *\n * @param customerId id of a customer\n *\n * @return orders\n */\n List<OrderDTO> findAll(String customerId);\n}", "@Override\n\tpublic String InterfaceName() {\n\t\treturn \"b2c.order.get_delivery\";\n\t}", "public interface IPaymentService {\r\n\r\n\r\n\r\n\t/**\r\n\t * Metodo que permite hacer le pago por PSE\r\n\t * @return factura de la factura generada\r\n\t */\r\n\tpublic FacturaCompra pagoPSE(String userName,TipoMoneda tipoMoneda);\r\n\t\r\n\t\r\n\t/**\r\n\t * Metodo que permite hacer le pago por PSE\r\n\t * @return factura de la factura generada\r\n\t */\r\n\tpublic FacturaCompra pagoCreditCard(String userName,TipoMoneda tipoMoneda);\r\n\t\r\n\t/**\r\n\t * Metodo que permite realizar el pago \r\n\t * mediante efectivo en un punto de pago\r\n\t * @return\r\n\t */\r\n\tpublic FacturaCompra cashOnDelivery(String userName,TipoMoneda tipoMoneda);\r\n\t\r\n}", "public interface DirectPreApprovalPaymentOrdersList {\n\n /**\n * Pre Approval Code\n *\n * @return Code\n */\n String getCode();\n\n /**\n * Status of the payment order\n *\n * @return Status\n */\n Integer getStatus();\n\n /**\n * Number of the page desired to see the result\n *\n * @return Page number\n */\n Integer getPage();\n\n /**\n * Max number os registers by page\n *\n * @return Max Page Results\n */\n Integer getMaxPageResults();\n}", "public interface Comunicator {\n \n\n}", "@Generated(\n value = {\n \"http://www.jooq.org\",\n \"jOOQ version:3.9.1\"\n },\n comments = \"This class is generated by jOOQ\"\n)\n@SuppressWarnings({ \"all\", \"unchecked\", \"rawtypes\" })\npublic interface IOrders extends Serializable {\n\n /**\n * Getter for <code>classicmodels.orders.orderNumber</code>.\n */\n public Integer getOrdernumber();\n\n /**\n * Getter for <code>classicmodels.orders.orderDate</code>.\n */\n public LocalDateTime getOrderdate();\n\n /**\n * Getter for <code>classicmodels.orders.requiredDate</code>.\n */\n public LocalDateTime getRequireddate();\n\n /**\n * Getter for <code>classicmodels.orders.shippedDate</code>.\n */\n public LocalDateTime getShippeddate();\n\n /**\n * Getter for <code>classicmodels.orders.status</code>.\n */\n public String getStatus();\n\n /**\n * Getter for <code>classicmodels.orders.comments</code>.\n */\n public String getComments();\n\n /**\n * Getter for <code>classicmodels.orders.customerNumber</code>.\n */\n public Integer getCustomernumber();\n}", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "public interface OrderDetailService {\n /**\n * 向OrderDetail表中插入数据\n * @param orderdetail\n * @return\n */\n boolean insertOrderDetail(Orderdetail orderdetail);\n\n /**\n * 通过主键id更新OrderDetail表中信息\n * @param orderdetail\n * @return\n */\n boolean updateOrderDatailById(Orderdetail orderdetail);\n\n /**\n * 通过主键id删除OrderDetail表中信息\n * @param orderdetail\n * @return\n */\n boolean deleteOrderDatailById(Orderdetail orderdetail);\n\n /**\n * 通过订单的id查找满足条件的所有订单详情信息\n * @param orderdetail\n * @return\n */\n List<Orderdetail> queryOrderDatailByOId(Orderdetail orderdetail);\n /**\n * 查询所有订单\n * @return\n */\n List<Orderdetail> query();\n}", "public interface Order {\n\n\t/**\n\t * Execute this battle order.\n\t * Returns true if the order is completed.\n\t * \n\t * @param who the actor \n\t * @return true if completed, false otherwise\n\t */\n\tpublic boolean execute(Living who);\n\t\n\t/**\n\t * Called after the order is done to check\n\t * if this order generated attacks.\n\t * For peaceful orders, this method can return\n\t * null of an array of zero length.\n\t * \n\t * @param target the <code>Living</code> being targeted\n\t * @return attack messages\n\t */\n\tpublic Message[] getAttackMessages(Living target);\n\t\n\t/**\n\t * Get the target of the attack messages.\n\t * If this order generated attack messages,\n\t * this method must return a valid target.\n\t * \n\t * @return the attack target\n\t */\n\tpublic Living getTarget();\n}", "public interface RemotInterfaceOperations \n{\n String createDRecord (String managerId, String firstName, String lastName, String address, String phone, String specialization, String location);\n String createNRecord (String managerId, String firstName, String lastName, String designation, String status, String statusDate);\n String getRecordCount (String managerId, int recordType);\n String editRecord (String managerId, String recordID, String fieldName, String newValue);\n String transferRecord (String managerID, String recordID, String remoteClinicServerName);\n}", "public interface ProductProcessorMP0 extends ProductProcessor {\n\n\n\n\n void processFile(MultipartFile file, ContractImage contractImage, Contract contract) throws IOException, IllegalDataException;\n}" ]
[ "0.67590696", "0.6703227", "0.6697133", "0.6580699", "0.6550196", "0.6540256", "0.6528338", "0.65173984", "0.6489064", "0.64779305", "0.6464972", "0.643117", "0.6420988", "0.6342747", "0.63315403", "0.6315969", "0.63151026", "0.6300055", "0.62896526", "0.6271811", "0.62710816", "0.6245012", "0.6223165", "0.622233", "0.6220035", "0.6215841", "0.62119526", "0.61949855", "0.6184938", "0.61798394", "0.61761904", "0.61337495", "0.6111586", "0.6099739", "0.6086339", "0.6059951", "0.6044273", "0.60422105", "0.60349023", "0.6018166", "0.60128146", "0.6004113", "0.59963715", "0.5990599", "0.5982324", "0.5979653", "0.5979547", "0.5950011", "0.5945278", "0.59429157", "0.59412766", "0.5935115", "0.5933747", "0.5932906", "0.5926194", "0.5924947", "0.5917513", "0.588798", "0.5884664", "0.5873016", "0.5856678", "0.58561087", "0.5855421", "0.5851492", "0.58420724", "0.58337355", "0.5832958", "0.5819262", "0.5810765", "0.5789552", "0.5787434", "0.5775873", "0.57708853", "0.57673615", "0.57652473", "0.5763587", "0.57568026", "0.5745053", "0.57429403", "0.5732955", "0.5732955", "0.57318246", "0.57297295", "0.57276446", "0.57263", "0.5720783", "0.5714247", "0.5700305", "0.5699296", "0.56824785", "0.56787497", "0.5677187", "0.5674287", "0.5668998", "0.56670696", "0.5666076", "0.56488955", "0.56475985", "0.56418717", "0.5641687" ]
0.763316
0
exception generation and handling
private static void fail(String filename, String errMsg, Module_itemContext itemCon) throws UnsupportedGrammerException { Interval int1 = itemCon.getSourceInterval(); // get token interval Token firstToken = tokenStream.get(int1.a); int lineNum = firstToken.getLine(); // get line of first token // Determining j, first token in int1 which occurs at a different line int j; for (j = int1.a; j < int1.b; j++) { if (tokenStream.get(j).getLine() != lineNum) break; } // form a string from tokens 1 through j-1 String tokenStr = tokenStream.getText(new Interval(int1.a, j)); System.err.printf("Parser error (%s:%d): %s\n", filename, lineNum, tokenStr); fail(errMsg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo57276a(Exception exc);", "String getException();", "String getException();", "@Override\r\n\tpublic void doException() {\n\r\n\t}", "@Override\n\tprotected String generateMessage() {\n\t\treturn \"Script evaluation exception \" + generateSimpleMessage();\n\t}", "protected final void delegateExceptionGeneration(final RESTReport rr)\n throws BackendRequestException {\n if (rr.wasInternalError()) {\n throw new BackendRequestException(\n \"internal error during user creation: \"\n + rr.getInternalErrorMessage());\n }\n\n if (rr.rejected()) {\n if (rr.getHttpResponseCode() == HTTPCodes.INTERNAL_SERVER_ERROR) {\n throw new BackendRequestException(\n \"an unrecoverable error occurred \"\n + \"on the server\");\n } else if (rr.getHttpResponseCode() == HTTPCodes.BAD_REQUEST) {\n throw new BackendRequestException(\n \"an unrecoverable error occurred \"\n + \"with the request made to the server\");\n } else if (rr.getHttpResponseCode() == HTTPCodes.UNAUTHORIZED) {\n throw new AuthenticationException(\n \"the authentication credentials \"\n + \"were rejected by the server\");\n }\n }\n\n if (!rr.success()) {\n if (rr.getSingleResponseMap()\n .get(\"message\")\n .contains(\"credentials\")) {\n throw new AuthenticationException(\n \"matching account not found\");\n }\n throw new BackendRequestException(\n \"the request was unsuccessful: \"\n + rr.getResponseValue(\"message\"));\n }\n }", "protected abstract SVGException createSVGException(short type, String key, Object[] args);", "public void toss(Exception e);", "protected abstract void exceptionsCatching( ExceptionType exceptionType );", "@Test\n public void testDumpError() {\n \n class TestExceptions {\n \n int start(int a, int b) {\n return sum(a, b);\n }\n \n int sum(int a, int b) {\n int result;\n \n try {\n result = a + product(a, b);\n } catch (Exception e) {\n throw new IllegalArgumentException(\"3 descendant exception\", e);\n }\n \n return result;\n }\n \n int product(int a, int b) {\n int result;\n \n try {\n result = division(a, b) * b;\n } catch (Exception e) {\n throw new IllegalArgumentException(\"2 descendant exception\", e);\n }\n \n return result;\n }\n \n int division(int a, int b) {\n int result;\n \n try {\n result = a / b;\n } catch (Exception e) {\n throw new IllegalArgumentException(\"1 descendant exception\", e);\n }\n \n return result;\n }\n }\n \n try {\n TestExceptions test = new TestExceptions();\n test.start(1, 0);\n } catch (Throwable e) {\n ErrorContainer errorContainer = new ErrorContainer(e);\n \n StringWriter writer = new StringWriter();\n e.printStackTrace(new PrintWriter(writer));\n \n assertEquals(e.getClass().getName(), errorContainer.getClassName());\n assertEquals(e.getMessage(), errorContainer.getMessage());\n assertEquals(writer.toString(), errorContainer.getStackTrace());\n }\n \n }", "public TeWeinigGeldException(Exception e) {this.e = e;}", "private static String doListBuilderExceptionResponse(HttpServletRequest request, HttpServletResponse response, Paginator paginator, ListBuilderException e) {\n request.setAttribute(\"listBuilderException\", e); // save the exception\n return \"listBuilderException\"; // FormletEventHandler should check for this\n }", "String getCauseException();", "protected abstract String defaultExceptionMessage(TransactionCommand transactionCommand);", "com.palantir.paxos.persistence.generated.PaxosPersistence.ExceptionProto getException();", "private void handleExceptions(Exception e,String uri) throws ServiceProxyException {\n \n //Step 1: Is error AdfInvocationRuntimeException, AdfInvocationException or AdfException? \n String exceptionPrimaryMessage = e.getLocalizedMessage();\n String exceptionSecondaryMessage = e.getCause() != null? e.getCause().getLocalizedMessage() : null;\n String combinedExceptionMessage = \"primary message:\"+exceptionPrimaryMessage+(exceptionSecondaryMessage!=null?(\"; secondary message: \"+exceptionSecondaryMessage):(\"\"));\n \n //chances are this is the Oracle MCS erro message. If so then ths message has a JSON format. A simple JSON parsing \n //test will show if our assumption is true. If JSONObject parsing fails then apparently the message is not the MCS\n //error message\n //{\n // \"type\":\".....\",\n // * \"status\": <error_code>,\n // * \"title\": \"<short description of the error>\",\n // * \"detail\": \"<long description of the error>\",\n // * \"o:ecid\": \"...\",\n // * \"o:errorCode\": \"MOBILE-<MCS error number here>\",\n // * \"o:errorPath\": \"<URI of the request>\"\n // }\n if(exceptionSecondaryMessage!=null){\n try {\n JSONObject jsonErrorObject = new JSONObject(exceptionSecondaryMessage);\n //if we get here, then its a Oracle MCS error JSON Object. Get the \n //status code or set it to 0 (means none is found)\n int statusCode = jsonErrorObject.optInt(\"status\", 0);\n throw new ServiceProxyException(statusCode, exceptionSecondaryMessage);\n \n } catch (JSONException jse) {\n //if parsing fails, the this is proof enough that the error message is not \n //an Oracle MCS message and we need to continue our analysis\n \n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Exception message is not a Oracle MCS error JSONObject\", this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n } \n }\n \n //continue message analysis and check for known error codes for the references MCS API\n \n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Rest invocation failed with following message\"+exceptionPrimaryMessage, this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n \n int httpErrorCode = -1; \n String restoredOracleMcsErrorMessage = null;\n \n /*\n * Try to identify an MCS failure from the exception message.\n */\n if(combinedExceptionMessage.contains(\"400\")){\n httpErrorCode = 400; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(400, \"Invalid JSON payload\", \"One of the following problems occurred: \" +\n \"the user does not exist, the JSON is invalid, or a property was not found.\", uri);\n }\n else if(combinedExceptionMessage.contains(\"401\")){\n httpErrorCode = 401; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(401, \"Authorization failure\", \"The user is not authorized to retrieve the information for another user.\",uri); \n }\n else if(combinedExceptionMessage.contains(\"403\")){\n httpErrorCode = 404; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(403, \"Functionality is not supported\", \"Functionality is not supported.\",uri); \n }\n else if(combinedExceptionMessage.contains(\"403\")){\n httpErrorCode = 404; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(404, \"User not found\", \"The user with the specified ID does not exist.\",uri);\n }\n \n else{\n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Request failed with Exception: \"+e.getClass().getSimpleName()+\"; message: \"+e.getLocalizedMessage(), this.getClass().getSimpleName(), \"handleExcpetion\");\n throw new ServiceProxyException(e.getLocalizedMessage(), ServiceProxyException.ERROR);\n }\n //if we get here then again its an Oracle MCS error, though one we found by inspecting the exception message\n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Request succeeded successful but failed with MCS application error. HTTP response: \"+httpErrorCode+\", Error message: \"+restoredOracleMcsErrorMessage, this.getClass().getSimpleName(), \"handleExcpetion\");\n throw new ServiceProxyException(httpErrorCode, restoredOracleMcsErrorMessage);\n }", "public static void main(String[] args) {\n try {\r\n\tthrow new Exc1();\r\n\t\r\n }catch(Exc0 e) {\r\n\t System.out.println(\"e0\");\r\n }\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Exception is..\" + msg;\r\n\t}", "public interface ExceptionContext {\n\n String DEFUALT_EX_MSG =\"网络异常\";//默认异常信息\n\n String DEFUALT_EX_CODE =\"500\";//默认异常状态码\n\n String UNKNOW_EX_MSG =\"未知异常\";//未知异常信息\n\n}", "public interface RoutineException {}", "@Override\n protected String handleGetExceptionKey()\n {\n\n final String type = this.getExceptionType();\n final int dotIndex = type.lastIndexOf(\".\");\n\n // the dot may not be the last character\n return StringUtilsHelper.toResourceMessageKey((dotIndex < (type.length() - 1)) ? type.substring(dotIndex + 1) : type);\n\n }", "private static Exception method_7085(Exception var0) {\r\n return var0;\r\n }", "public Exception() {\n\t\t\tsuper();\n\t\t}", "public Exception() {\n\tsuper();\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"com.cg.Exercise4Exception\"+super.getMessage();\r\n\t}", "public GameEndException(String exception){\n\t\tsuper(exception);\n\t}", "public interface ExceptionHandler\n{\n //TODO not sure how to handle this\n}", "SpaceInvaderTest_test_UnNouveauVaisseauPositionneHorsEspaceJeu_DoitLeverUneException createSpaceInvaderTest_test_UnNouveauVaisseauPositionneHorsEspaceJeu_DoitLeverUneException();", "public RedoException(){\r\n\t\tsuper();\r\n\t}", "UsedExceptions getExceptions();", "@Override public String toString(){\n return \"Logic Parameter Exception\";\n }", "@Test(expected = IllegalStateException.class)\n\tpublic void testException() {\n\t\tsubGen.subset(11);\n\t}", "public BusinessObjectException(Exception e) {\r\n super( \"\" + e );\r\n }", "public void addExceptionStyle();", "protected static ExceptionSignalingNode createExceptionNode(final SourceSection ss) {\n CompilerDirectives.transferToInterpreter();\n return ExceptionSignalingNode.createNode(Symbols.symbolFor(\"TypeError\"), ss);\n }", "public void falschesSpiel(SpielException e);", "private ModelValidationException constructClassException (String className, \n\t\tObject relatedField, String keyBase)\n\t{\n\t\treturn constructClassException(ModelValidationException.ERROR, \n\t\t\tclassName, relatedField, keyBase);\n\t}", "private void handleBuilderException(Throwable t)\r\n {\r\n log.error(\"Error when executing builder script!\", t);\r\n showErrorMessage(RES_ERRMSG_BUILDER);\r\n }", "void storeWebWideTrackingException(StoreExceptionsInformation args);", "private void writeExceptions(Method m) {\n Class<?>[] exceptions = m.getExceptionTypes();\n int size = exceptions.length;\n if (exceptions.length == 0)\n return;\n writer.print(\"throws \");\n for (int i = 0; i < size; i++) {\n writer.print(exceptions[i].getCanonicalName());\n if (i != size - 1)\n writer.print(\", \");\n }\n writer.print(\" \");\n }", "private void mapAndThrow(Exception e) {\n int status = HttpStatus.INTERNAL_SERVER_ERROR_500;\n String code = \"INTERNAL_SERVER_ERROR\";\n\n // Resolve and map standard exceptions\n if (e.getClass().isAssignableFrom(MockingjayDataAccessException.class) ||\n e.getClass().isAssignableFrom(MockingjayGenericException.class) ||\n e.getClass().isAssignableFrom(FileWriterException.class)) {\n status = HttpStatus.INTERNAL_SERVER_ERROR_500;\n code = \"INTERNAL_SERVER_ERROR\";\n } else if (e.getClass().isAssignableFrom(JsonTransformationException.class)) {\n status = HttpStatus.BAD_REQUEST_400;\n code = \"BAD_REQUEST\";\n } else if (e.getClass().isAssignableFrom(FileNotFoundException.class)) {\n status = HttpStatus.NOT_FOUND_404;\n code = \"RESOURCE_NOT_FOUND\";\n } else if (e.getClass().isAssignableFrom(FileStorageException.class)) {\n status = HttpStatus.INSUFFICIENT_STORAGE_507;\n code = \"INSUFFICIENT_STORAGE\";\n }\n\n // Throw resource exception\n throw new ResourceException(e, status, code);\n }", "public UnmatchedException(){\r\n\r\n\t}", "java.lang.String getExceptions(int index);", "protected String manage(DriverException e) {\r\n // Debug\r\n Logger.getLogger(Service.class.getName()).log(Level.SEVERE, \"Driver exception !\", e);\r\n \r\n // Display\r\n String data = \"\";\r\n Throwable buff = e;\r\n do {\r\n if (buff instanceof DriverException) {\r\n DriverException de = (DriverException) buff;\r\n data += \"<error id=\\\"1\\\">\" +\r\n \"<parameter name=\\\"driver\\\">\" + de.getThrower().getDriverName() + \"</parameter>\" +\r\n \"<parameter name=\\\"message\\\">\" + de.getMessage() + \"</parameter>\" +\r\n \"</error>\";\r\n } else if (buff instanceof WorkflowException) {\r\n data += \"<error id=\\\"2\\\">\" +\r\n \"<parameter name=\\\"message\\\">\" + buff.getMessage() + \"</parameter>\" +\r\n \"</error>\"; \r\n } else {\r\n data += \"<error id=\\\"3\\\">\" +\r\n \"<parameter name=\\\"message\\\">\" + buff.getMessage() + \"</parameter>\" +\r\n \"</error>\";\r\n }\r\n buff = buff.getCause();\r\n } while (buff != null);\r\n \r\n return data;\r\n }", "public AssertionFailedException(Exception ex) {\n/* 63 */ super(Messages.getString(\"AssertionFailedException.0\") + ex.toString() + Messages.getString(\"AssertionFailedException.1\"));\n/* */ }", "public interface ExceptionMessager {\n\n /**\n * Gets the error code (message properties).\n *\n * @return the error code\n */\n public String getErrorCode();\n\n /**\n * Gets the values for value substitute\n *\n * @return the values\n */\n public Object[] getValues();\n}", "@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}", "@DefaultMessage(\"Field is required\")\n @Key(\"gen.fieldRequiredException\")\n String gen_fieldRequiredException();", "@Test\n\tpublic final void testWriteException() {\n\t\tLog.write(LogMessageSeverity.WARNING, LogWriteMode.QUEUED,\n\t\t\t\tnew RuntimeException(\"This is our test assertion exception\"), \"Unit Tests\",\n\t\t\t\t\"Test of logging exception attachment.\", null);\n\n\t\tLog.write(LogMessageSeverity.WARNING, LogWriteMode.QUEUED,\n\t\t\t\tnew RuntimeException(\"This is our top exception\",\n\t\t\t\t\t\tnew RuntimeException(\"This is our middle exception\",\n\t\t\t\t\t\t\t\tnew RuntimeException(\"This is our bottom exception\"))),\n\t\t\t\t\"Unit Tests\", \"Test of logging exception attachment with nested exceptions.\", null);\n\t}", "ExceptionEvaluationCondition getException();", "static private ArithmeticException exception(String exp, int ofs, String txt) {\r\n return new ArithmeticException(txt+\" at offset \"+ofs+\" in expression \\\"\"+exp+\"\\\"\");\r\n }", "private void buildBasicStructure( Exception e )\r\n {\r\n m_rootID = addElement(0, m_Document_TypeID, DTM.NULL, DTM.NULL);\r\n m_extErrorID = addElement(1, m_ErrorExt_TypeID, m_rootID, DTM.NULL);\r\n m_MainMessageID = addElementWithData\r\n (e != null ? e.getLocalizedMessage() : \"SQLWarning\", 2, m_Message_TypeID, m_extErrorID, DTM.NULL);\r\n }", "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 }", "public ViaturaExistenteException(){\n super();\n }", "public static void main(String args[]) throws Exception{\n DifferentMethods_2 d2 = new DifferentMethods_2();\r\n d2.createObject();\r\n //Exception d = new Exception();\r\n //throw d;//throws exception as declared above\r\n }", "@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@DefaultMessage(\"A record with this value already exists. Please enter a unique value for this field\")\n @Key(\"gen.fieldUniqueException\")\n String gen_fieldUniqueException();", "public static com.myfitnesspal.shared.api.ApiResponseBase mapException(com.myfitnesspal.shared.api.ApiException r2) {\n /*\n com.myfitnesspal.shared.model.mapper.ApiJsonMapper r0 = new com.myfitnesspal.shared.model.mapper.ApiJsonMapper // Catch:{ IOException -> 0x001f, Exception -> 0x001a }\n r0.<init>() // Catch:{ IOException -> 0x001f, Exception -> 0x001a }\n java.lang.Class<com.myfitnesspal.shared.api.ApiResponseBase> r1 = com.myfitnesspal.shared.api.ApiResponseBase.class\n com.myfitnesspal.shared.model.mapper.ApiJsonMapper r0 = r0.withType(r1) // Catch:{ IOException -> 0x001f, Exception -> 0x001a }\n java.lang.String r1 = r2.getBody() // Catch:{ IOException -> 0x001f, Exception -> 0x001a }\n java.lang.String r1 = com.uacf.core.util.Strings.toString(r1) // Catch:{ IOException -> 0x001f, Exception -> 0x001a }\n java.lang.Object r0 = r0.mapFrom(r1) // Catch:{ IOException -> 0x001f, Exception -> 0x001a }\n com.myfitnesspal.shared.api.ApiResponseBase r0 = (com.myfitnesspal.shared.api.ApiResponseBase) r0 // Catch:{ IOException -> 0x001f, Exception -> 0x001a }\n goto L_0x0024\n L_0x001a:\n r0 = move-exception\n com.uacf.core.util.Ln.e(r0)\n goto L_0x0023\n L_0x001f:\n r0 = move-exception\n com.uacf.core.util.Ln.e(r0)\n L_0x0023:\n r0 = 0\n L_0x0024:\n if (r0 != 0) goto L_0x0045\n com.myfitnesspal.shared.api.ApiResponseBase r0 = new com.myfitnesspal.shared.api.ApiResponseBase\n r0.<init>()\n int r1 = r2.getStatusCode()\n java.lang.Integer r1 = java.lang.Integer.valueOf(r1)\n java.lang.String r1 = com.uacf.core.util.Strings.toString(r1)\n r0.setError(r1)\n java.lang.String r2 = r2.getBody()\n java.lang.String r2 = com.uacf.core.util.Strings.toString(r2)\n r0.setErrorDescription(r2)\n L_0x0045:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.myfitnesspal.shared.api.MfpApiUtil.mapException(com.myfitnesspal.shared.api.ApiException):com.myfitnesspal.shared.api.ApiResponseBase\");\n }", "void mo1332e(String str, String str2, Throwable th);", "public TechnicalException() {\r\n }", "public static void demoException() {\n\n try {\n print(1, \"hello\");\n String b = null;\n b.indexOf(\"a\");\n\n } catch (NullPointerException npe) {\n print(3, \"NPE\");\n } catch (Exception e) {\n print(4, \"Exception\");\n } finally {\n /** code will be executed anyway regardless of exception */\n print(2, \"finally\");\n // 做清理工作\n }\n\n try {\n print(1, \"hello\");\n int a = 2;\n a = a / 0;\n /** add a log file when an Exception occurs */\n } catch (NullPointerException npe) {\n print(3, \"NPE\");\n } catch (Exception e) {\n print(4, \"Exception\");\n } finally {\n /** code will be executed anyway regardless of exception */\n print(2, \"finally\");\n // 做清理工作\n }\n }", "void handleException(Context context, Throwable exc, String description);", "String getOnExceptionEnd();", "private void log(IndexObjectException e) {\n\t\t\r\n\t}", "private void sendInvocationException(HttpRequest request,\n\t\t\tHttpResponse response, ServiceInvocationException e) {\n\t\t// internal exception in service method\n\t\tresponse.clearContent();\n\t\tresponse.setStatus( HttpResponse.STATUS_INTERNAL_SERVER_ERROR );\n\t\tresponse.setContentType( \"text/xml\" );\n\t\tconnector.logError(\"Exception while processing RMI: \" + request.getPath());\n\t\t\n\t\tObject[] ret = new Object[4];\n\t\tret[0] = \"Exception during RMI invocation!\";\n\t\t\n\t\tret[1] = e.getCause().getCause().getClass().getCanonicalName();\n\t\tret[2] = e.getCause().getCause().getMessage();\n\t\tret[3] = e.getCause().getCause();\n\t\tString code = ret[0]+\"\\n\"+ret[1]+\"\\n\"+ret[2]+\"\\n\"+ret[3];\n\t\tresponse.println ( code );\n\t}", "GitletException() {\n super();\n }", "Throwable cause();", "private ModelValidationException constructFieldException (String fieldName, \n\t\tString key)\n\t{\n\t\treturn constructFieldException(ModelValidationException.ERROR, \n\t\t\tfieldName, key);\n\t}", "private void handleException(final Exception e) throws OsgpException {\n LOGGER.error(\"Exception occurred: \", e);\n if (e instanceof OsgpException) {\n throw (OsgpException) e;\n } else {\n throw new TechnicalException(COMPONENT_WS_PUBLIC_LIGHTING, e);\n }\n }", "ResolvedType getSpecifiedException(int index);", "private void throwsError() throws OBException {\n }", "public String toString ()\n {\n if (exception != null) {\n return exception.toString();\n } else {\n return super.toString();\n }\n }", "static EnigmaException error(String msgFormat, Object... arguments) {\n return new EnigmaException(String.format(msgFormat, arguments));\n }", "@Override\n\tpublic void exucute() {\n\t\t\n\t}", "public void testGetExceptions() {\n boolean buildEx = false;\n\n // Set up a SOSGet task\n sosGet.setProject(project);\n // No options set - SosServerPath should fail\n try {\n commandline = sosGet.buildCmdLine();\n } catch (BuildException be) {\n if (be.getMessage().compareTo(\"sosserverpath attribute must be set!\") == 0) {\n buildEx = true;\n }\n }\n assertTrue(\"GetException SosServerPath\", buildEx);\n buildEx = false;\n\n // Set SosServerPath - Username should fail\n sosGet.setSosServerPath(SOS_SERVER_PATH);\n try {\n commandline = sosGet.buildCmdLine();\n } catch (BuildException be) {\n if (be.getMessage().compareTo(\"username attribute must be set!\") == 0) {\n buildEx = true;\n }\n }\n assertTrue(\"GetException Username\", buildEx);\n buildEx = false;\n\n // Set Username - VssServerPath should fail\n sosGet.setUsername(SOS_USERNAME);\n try {\n commandline = sosGet.buildCmdLine();\n } catch (BuildException be) {\n if (be.getMessage().compareTo(\"vssserverpath attribute must be set!\") == 0) {\n buildEx = true;\n }\n }\n assertTrue(\"GetException VssServerPath\", buildEx);\n buildEx = false;\n\n // Set VssServerPath - ProjectPath should fail\n sosGet.setVssServerPath(VSS_SERVER_PATH);\n try {\n commandline = sosGet.buildCmdLine();\n } catch (BuildException be) {\n if (be.getMessage().compareTo(\"projectpath attribute must be set!\") == 0) {\n buildEx = true;\n }\n }\n assertTrue(\"GetException ProjectPath\", buildEx);\n\n // Set ProjectPath - All required options set\n sosGet.setProjectPath(VSS_PROJECT_PATH);\n try {\n commandline = sosGet.buildCmdLine();\n buildEx = true;\n } catch (BuildException be) {\n buildEx = false;\n }\n assertTrue(\"GetException All required options set\", buildEx);\n }", "private static void generateError(int i, int j, int k) {\n\t\t\n\t\tswitch(i) {\n\t\t\n\t\t\tcase 0: // CHEP\n\t\t\t\tswitch(k) {\n\t\t\t\t\tcase 1: // date\n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid invoice number. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;;\n\t\t\t\t\tcase 2: // date\n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid date. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid region. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\terr_msg = \"Error: The percentages of total invoices are invalid. The sum of all percentages should be 100%\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid net total. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tcase 1: // Delivery\n\t\t\t\tswitch(k) {\n\t\t\t\tcase 2: \n\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid date. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\treturn;\n\t\t\t\tcase 4:\n\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid amount. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\treturn;\n\t\t\t\tcase 5: \n\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid reference number. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\treturn;\n\t\t\t\tcase 6:\n\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid delivery date. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\treturn;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tswitch(k) {\n\t\t\t\t\tcase 2: \n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid date. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid amount. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 5: \n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid reference number. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "@DefaultMessage(\"Your Lock on this record has expired; Please abort and try again\")\n @Key(\"gen.expiredLockException\")\n String gen_expiredLockException();", "public abstract List<? extends Pair<Type.Clazz,String>> exceptions();", "private void outputAndThrow(RuntimeException ex) {\n\t\toutput += \"\\n\" + ex.getMessage();\n\t\tSystem.out.println(output);\n\t\tthrow ex;\n\t}", "@Override\n\tpublic void demoRunTimeException() throws RuntimeException {\n\n\t}", "protected CustomException getException(int code, String message, Object... objects) {\n return new CustomException(code, String.format(message, objects));\n }", "public NSException() {\n\t\tsuper();\n\t\tthis.exception = new Exception();\n\t}", "@Override\n\tprotected Respond exceptHandle(Exception e) {\n\t\treturn SqlTool.normalExceptionDeal(new RspSingleRow(), e);\n\t}", "WireframeException(String message, Throwable e){\r\n super(message, e);\r\n }", "public ExceptionSubVersion() {\n this(\"EcologicaExcepciones\");\n }", "public InvalidEventHandlerException() {\n }", "public OLMSException() {\r\n super();\r\n }", "public sparqles.avro.discovery.DGETInfo.Builder setException(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.Exception = value;\n fieldSetFlags()[3] = true;\n return this; \n }", "public String toString() \r\n {\r\n return \"InvalidInputException[\"+n+\"]\";\r\n }", "void handleError(Exception ex);", "@Override\n\tpublic void exceptionHandler(Handler<Exception> handler) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void onException(Exception arg0) {\n\n\t\t\t}", "public ItemNotFoundException(String e){\r\n super(e+\" was not found!\");\r\n }", "protected void connectionException(Exception exception) {}", "private static void throwException() throws Exception {\n\t\tthrow new Exception();\r\n\t}", "void failed (Exception e);", "public DynamicDeckDynamoException() {\n }", "public ReaderException( String code ){ super(code); }", "void storeSiteSpecificTrackingException(StoreSiteSpecificExceptionsInformation args);", "abstract void error(String error, Exception[] exceptions);", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1) { throw Extensions.todo(); }" ]
[ "0.66708416", "0.6616687", "0.6616687", "0.6586104", "0.63672465", "0.6270926", "0.62693185", "0.61711496", "0.6099027", "0.60686284", "0.6025486", "0.6022317", "0.59941244", "0.59737664", "0.5953321", "0.5951062", "0.59199005", "0.5904802", "0.5896019", "0.589374", "0.588736", "0.58778346", "0.587227", "0.5855345", "0.58539605", "0.58473474", "0.5846221", "0.5840328", "0.58383036", "0.58254594", "0.5811548", "0.58058137", "0.5801533", "0.5793054", "0.5792558", "0.57899064", "0.57883006", "0.5783846", "0.5765203", "0.574788", "0.5747541", "0.574465", "0.5735138", "0.57141006", "0.5709368", "0.57054245", "0.56922877", "0.56863624", "0.5675714", "0.5675339", "0.56745034", "0.56719834", "0.56699383", "0.5668157", "0.5666229", "0.56656", "0.56637704", "0.5660054", "0.5657078", "0.5638927", "0.56353855", "0.5629184", "0.5616282", "0.56150264", "0.5608662", "0.56064284", "0.56056833", "0.5601557", "0.5601463", "0.55880934", "0.5585023", "0.5580533", "0.5577491", "0.55714405", "0.5570737", "0.5561975", "0.5557312", "0.5555235", "0.5552854", "0.55481404", "0.5538172", "0.5538145", "0.55353266", "0.55349565", "0.5533471", "0.55305815", "0.55290306", "0.5524226", "0.5523947", "0.55227286", "0.5517791", "0.5516907", "0.5513464", "0.5511498", "0.5509566", "0.5508094", "0.55020636", "0.5499704", "0.5499242", "0.5497718", "0.54976535" ]
0.0
-1
pass null as `library` to parse without library
public static ArrayList<Netlist> parseString(String str, GateLibrary library) throws Exception { return getNetlists("STRING", new ANTLRInputStream(str), library == null ? new GateLibrary() : library); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String unparseAnnexLibrary(AnnexLibrary library, String indent) {\n\t\treturn serializer.serialize(library);\n\t}", "public void loadingLibrary(String libraryFilename);", "public LibraryParser(final LibraryObject root) throws NoChildrenException {\r\n\t\tthis.root = root;\r\n\t\tthis.allPlaylists = new PlaylistRetriever(root).retrievePlaylist();\r\n\t\tthis.allTracks = new TracksRetriever(root).getTracks();\r\n\t\tthis.plistTrackMap = new PlaylistTrackMapper(allPlaylists, allTracks)\r\n\t\t\t\t.getPlaylistTracks();\r\n\r\n\t\tlog.debug(\"Successfully Parsed.\");\r\n\t}", "private Module parse(InputStream input)\r\n\t\t\t\t\tthrows ModuleParseException\r\n\t{\n\t\treturn null;\r\n\t}", "public LibraryParser(final String libFileLocation) throws LibraryParseException, NoChildrenException {\r\n\t\tthis.root = new XMLParser().parseXML(libFileLocation);\r\n\t\tthis.allPlaylists = new PlaylistRetriever(root).retrievePlaylist();\r\n\t\tthis.allTracks = new TracksRetriever(root).getTracks();\r\n\t\tthis.plistTrackMap = new PlaylistTrackMapper(allPlaylists, allTracks)\r\n\t\t\t\t.getPlaylistTracks();\r\n\r\n\t\tlog.debug(\"Successfully Parsed.\");\r\n\t}", "protected static Library readALibrary(URL fileURL, Library lib, String libName, FileType type, Map<Setting,Object> projectSettings)\n \t{\n \t\t// handle different file types\n \t\tLibraryFiles in;\n \t\tif (type == FileType.ELIB)\n \t\t{\n \t\t\tin = new ELIB();\n \t\t\tif (in.openBinaryInput(fileURL)) return null;\n \t\t} else if (type == FileType.JELIB || type == FileType.DELIB)\n \t\t{\n try {\n LibId libId = lib != null ? lib.getId() : EDatabase.serverDatabase().getIdManager().newLibId(libName);\n in = new JELIB(libId, fileURL, type);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n \t\t} else if (type == FileType.READABLEDUMP)\n \t\t{\n \t\t\tin = new ReadableDump();\n \t\t\tif (in.openTextInput(fileURL)) return null;\n \t\t} else\n \t\t{\n \t\t\tSystem.out.println(\"Unknown import type: \" + type);\n \t\t\treturn null;\n \t\t}\n \n \t\t// determine whether this is top-level\n \t\tin.topLevelLibrary = false;\n \t\tif (lib == null)\n \t\t{\n \t\t\tmainLibDirectory = TextUtils.getFilePath(fileURL);\n if (type == FileType.DELIB) {\n mainLibDirectory = mainLibDirectory.replaceAll(libName+\".\"+type.getExtensions()[0], \"\");\n }\n \t\t\tin.topLevelLibrary = true;\n \t\t}\n \n \t\tif (lib == null)\n \t\t{\n \t\t\t// create a new library\n \t\t\tlib = Library.newInstance(libName, fileURL);\n \t\t}\n \n \t\tin.lib = lib;\n \n \t\t// read the library\n \t\tboolean error = in.readInputLibrary();\n \t\tin.closeInput();\n \t\tif (error)\n \t\t{\n \t\t\tSystem.out.println(\"Error reading \" + lib);\n \t\t\tif (in.topLevelLibrary) mainLibDirectory = null;\n \t\t\treturn null;\n \t\t}\n // if (CVS.isEnabled()) {\n // CVSLibrary.addLibrary(lib);\n // }\n if (projectSettings != null)\n projectSettings.putAll(in.projectSettings);\n \t\treturn in.lib;\n \t}", "public LibraryAnalysis(String option) throws IOException{\n \n if(option.equals(\"1\")){\n loadEnAfinnLibrary();\n } \n else if(option.equals(\"2\"))\n {\n loadFrAfinnLibrary(); \n }\n else if(option.equals(\"3\")){\n mohanLibrary = myLibrary.getLibrary();\n }\n else if(option.equals(\"4\")){\n loadEnAfinnLibrary();\n mohanLibrary = myLibrary.getLibrary();\n loadStopWords();\n }\n }", "public String getLibrary() {\n return library;\n }", "private static void loadParser() {\n if(parser_ == null)\n parser_ = ConfigIOFactory.getInstance(\"json\");\n }", "public void parseLibrary(String jsonData) throws JSONException {\r\n JSONArray library = new JSONArray(jsonData);\r\n\r\n for (int index = 0; index < library.length(); index++) {\r\n JSONObject book = library.getJSONObject(index);\r\n parseBook(book);\r\n }\r\n }", "public T caseBuiltinLibraryDefinition(BuiltinLibraryDefinition object) {\n\t\treturn null;\n\t}", "public void initParser() {;\r\n lp = DependencyParser.loadFromModelFile(\"edu/stanford/nlp/models/parser/nndep/english_SD.gz\");\r\n tokenizerFactory = PTBTokenizer\r\n .factory(new CoreLabelTokenFactory(), \"\");\r\n }", "public T caseLibrary(Library object) {\n\t\treturn null;\n\t}", "public T caseAnnexLibrary(AnnexLibrary object) {\n\t\treturn null;\n\t}", "private void ImportLibrary(){\n for(int i = 0; i < refact.size(); i++){\n if(refact.get(i).contains(\"import\")){\n for(String library : libraries){\n refact.add(i, library + \"\\r\");\n }\n break;\n }\n }\n\n\n }", "void parse();", "public CrossrefUnixrefSaxParser() {\n }", "protected Library readExternalLibraryFromFilename(String theFileName, FileType defaultType)\n \t{\n \t\t// get the path to the library file\n \t\tString legalLibName = TextUtils.getFileNameWithoutExtension(theFileName);\n // Checking if the library is already open\n \t\tLibrary elib = Library.findLibrary(legalLibName);\n \t\tif (elib != null) return elib;\n \n //\t\tURL url = TextUtils.makeURLToFile(theFileName);\n //\t\tString fileName = url.getFile();\n //\t\tFile libFile = new File(fileName);\n \n \t\t// see if this library is already read in\n \t\tString libFileName = theFileName;\n //\t\tString libFileName = libFile.getName();\n \n \t\t// special case if the library path came from a different computer system and still has separators\n \t\twhile (libFileName.endsWith(\"\\\\\") || libFileName.endsWith(\":\") || libFileName.endsWith(\"/\"))\n \t\t\tlibFileName = libFileName.substring(0, libFileName.length()-1);\n \t\tint backSlashPos = libFileName.lastIndexOf('\\\\');\n \t\tint colonPos = libFileName.lastIndexOf(':');\n \t\tint slashPos = libFileName.lastIndexOf('/');\n \t\tint charPos = Math.max(backSlashPos, Math.max(colonPos, slashPos));\n \t\tif (charPos >= 0)\n \t\t{\n \t\t\tlibFileName = libFileName.substring(charPos+1);\n \t\t}\n \t\tString libName = libFileName;\n \t\tFileType importType = OpenFile.getOpenFileType(libName, defaultType);\n FileType preferredType = importType;\n \n // this is just to remove the extension from the lib name string\n \t\tif (libName.endsWith(\".elib\"))\n \t\t{\n \t\t\tlibName = libName.substring(0, libName.length()-5);\n \t\t} else if (libName.endsWith(\".jelib\"))\n \t\t{\n \t\t\tlibName = libName.substring(0, libName.length()-6);\n } else if (libName.endsWith(\".delib\"))\n {\n libName = libName.substring(0, libName.length()-6);\n \t\t} else if (libName.endsWith(\".txt\"))\n \t\t{\n \t\t\tlibName = libName.substring(0, libName.length()-4);\n \t\t} else\n \t\t{\n \t\t\t// no recognizable extension, add one to the file name\n \t\t\tlibFileName += \".\" + defaultType.getExtensions()[0];\n \t\t}\n \n StringBuffer errmsg = new StringBuffer();\n \n // first try the library name with the extension it came with\n // However, do not look in electric library area to avoid problems with spice configurations for old chips\n URL externalURL = getLibrary(libName + \".\" + preferredType.getExtensions()[0], theFileName, errmsg, true);\n // Now try all file types, starting with jelib\n // try JELIB\n if (externalURL == null && preferredType != FileType.JELIB) {\n externalURL = getLibrary(libName + \".\" + FileType.JELIB.getExtensions()[0], theFileName, errmsg, true);\n }\n // try ELIB\n if (externalURL == null && preferredType != FileType.ELIB) {\n externalURL = getLibrary(libName + \".\" + FileType.ELIB.getExtensions()[0], theFileName, errmsg, true);\n }\n // try DELIB\n if (externalURL == null && preferredType != FileType.DELIB) {\n externalURL = getLibrary(libName + \".\" + FileType.DELIB.getExtensions()[0], theFileName, errmsg, true);\n }\n // try txt\n if (externalURL == null && preferredType != FileType.READABLEDUMP) {\n externalURL = getLibrary(libName + \".\" + FileType.READABLEDUMP.getExtensions()[0], theFileName, errmsg, true);\n }\n \n boolean exists = (externalURL == null) ? false : true;\n // last option: let user pick library location\n \t\tif (!exists)\n \t\t{\n \t\t\tSystem.out.println(\"Error: cannot find referenced library \" + libName+\":\");\n \t\t\tSystem.out.print(errmsg.toString());\n \t\t\tString pt = null;\n \t\t\twhile (true) {\n \t\t\t\t// continue to ask the user where the library is until they hit \"cancel\"\n \t\t\t\tString description = \"Reference library '\" + libFileName + \"'\";\n \t\t\t\tpt = OpenFile.chooseInputFile(FileType.LIBFILE, description);\n \t\t\t\tif (pt == null) {\n \t\t\t\t\t// user cancelled, break\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\t// see if user chose a file we can read\n \t\t\t\texternalURL = TextUtils.makeURLToFile(pt);\n \t\t\t\tif (externalURL != null) {\n \t\t\t\t\texists = TextUtils.URLExists(externalURL, null);\n \t\t\t\t\tif (exists) {\n \t\t\t\t\t\t// good pt, opened it, get out of here\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\tif (exists)\n \t\t{\n \t\t\tSystem.out.println(\"Reading referenced library \" + externalURL.getFile());\n importType = OpenFile.getOpenFileType(externalURL.getFile(), defaultType);\n elib = Library.newInstance(legalLibName, externalURL);\n \t\t}\n \n if (elib != null)\n {\n // read the external library\n String oldNote = getProgressNote();\n setProgressValue(0);\n setProgressNote(\"Reading referenced library \" + legalLibName + \"...\");\n \n \t\t\t// get the library name\n \t\t\tString eLibName = TextUtils.getFileNameWithoutExtension(externalURL);\n elib = readALibrary(externalURL, elib, eLibName, importType, null);\n setProgressValue(100);\n setProgressNote(oldNote);\n }\n \n if (elib == null)\n {\n System.out.println(\"Error: cannot find referenced library \" + theFileName);\n System.out.println(\"...Creating new \"+legalLibName+\" Library instead\");\n elib = Library.newInstance(legalLibName, null);\n elib.setLibFile(TextUtils.makeURLToFile(theFileName));\n elib.clearFromDisk();\n }\n //\t\tif (failed) elib->userbits |= UNWANTEDLIB; else\n //\t\t{\n //\t\t\t// queue this library for announcement through change control\n //\t\t\tio_queuereadlibraryannouncement(elib);\n //\t\t}\n \n \t\treturn elib;\n \t}", "@Override\n\t\t\t\tpublic boolean hasParser() {\n\t\t\t\t\treturn true;\n\t\t\t\t}", "ISOAErrLibrary getLibrary();", "CParser getParser();", "private static List<Message> parse(File f, String sourceUrlString) {\n \t\treturn null;\n \t}", "@Override\n\tpublic String unparse() {\n\t\treturn null;\n\t}", "public Parser() {}", "private Parser () { }", "public void libraryLoaded();", "SAPL parse(String saplDefinition);", "public Library getLibrary() {\r\n\t\treturn library;\t\r\n\t}", "public void loadLibrary(String str) {\n _lancet.com_ss_android_ugc_aweme_lancet_launch_LoadSoLancet_loadLibrary(str);\n }", "@Test\n public void parseReturnsNullIfNotInteger() {\n assertNull(InputProcessing.tryParse(\"assdf\"));\n }", "public void testParse_empty() {\n DumpsysPackageReceiver parser = new DumpsysPackageReceiver();\n assertEquals(0, parser.getPackages().size());\n }", "static RobotProgramNode parseFile(File code){\r\n\tScanner scan = null;\r\n\ttry {\r\n\t scan = new Scanner(code);\r\n\r\n\t // the only time tokens can be next to each other is\r\n\t // when one of them is one of (){},;\r\n\t scan.useDelimiter(\"\\\\s+|(?=[{}(),;])|(?<=[{}(),;])\");\r\n\r\n\t RobotProgramNode n = parseProgram(scan); // You need to implement this!!!\r\n\r\n\t scan.close();\r\n\t return n;\r\n\t} catch (FileNotFoundException e) {\r\n\t System.out.println(\"Robot program source file not found\");\r\n\t} catch (ParserFailureException e) {\r\n\t System.out.println(\"Parser error:\");\r\n\t System.out.println(e.getMessage());\r\n\t scan.close();\r\n\t}\r\n\treturn null;\r\n }", "public void parse() {\n }", "public Library getLibrary() {\r\n\t\treturn library;\r\n\t}", "@Override\r\n public FirstElement documentBodyParse(String filePath) {\n return null;\r\n }", "void Parse(Source source);", "void initBeforeParsing() {\r\n }", "public void parse(String filename);", "DefaultTypeParser()\r\n {\r\n importPackageNames.add(\"\");\r\n importPackageNames.add(\"java.lang.\");\r\n }", "@Test\n void testParser() {\n VmParsingHelper.DEFAULT.parse(VM_SRC);\n }", "public ApkParser() {}", "private void extractLibraryData( final ArrayList librarys,\n final ArrayList fileset )\n throws TaskException\n {\n if( !fileset.isEmpty() )\n {\n final Extension[] extensions = getExtensions( fileset );\n for( int i = 0; i < extensions.length; i++ )\n {\n librarys.add( extensions[ i ] );\n }\n }\n }", "void parse(String[] args) throws Exception;", "void parse(String[] args);", "public abstract String filterLibraryName(final String name);", "public static Parser getParser(String url)\n\t{\n\t\ttry\n\t\t{\n\t\t\tjava.net.URLConnection conn = (new java.net.URL(url)).openConnection();\n\t\t\tconn.setRequestProperty(\"User-Agent\", \"Mozilla\");\n\t\t\tParser p = new Parser(conn);\n\t\t\treturn p;\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t}\n\t\treturn null;\n\t}", "@Before\n\tpublic void initParser() {\n\t\tXMLTagParser.init(file);\n\t}", "public abstract XMLDocument parse(URL url);", "public static OpenLibraryBook parse(JSONObject jsonObject) throws JSONException {\n OpenLibraryBook book = null;\n\n JSONArray names = jsonObject.names();\n if (names != null && names.length() > 0) {\n jsonObject = jsonObject.getJSONObject(names.getString(0));\n book = new OpenLibraryBook();\n if (jsonObject.has(TITLE)) {\n book.title = jsonObject.getString(TITLE);\n }\n if (jsonObject.has(SUBTITLE)) {\n book.subtitle = jsonObject.getString(SUBTITLE);\n }\n if (jsonObject.has(PUBLISHERS)) {\n JSONArray publishers = jsonObject.getJSONArray(PUBLISHERS);\n\n for (int i = 0; i < publishers.length(); i++) {\n JSONObject publisher = publishers.getJSONObject(i);\n if (publisher.has(PUBLISHER_NAME)) {\n book.publishers.add(publisher.getString(PUBLISHER_NAME));\n }\n }\n }\n if (jsonObject.has(IDENTIFIERS)) {\n JSONObject identifiers = jsonObject.getJSONObject(IDENTIFIERS);\n if (identifiers.has(ISBN_10)) {\n JSONArray isbn10 = identifiers.getJSONArray(ISBN_10);\n if (isbn10.length() > 0) {\n book.isbn10 = isbn10.getString(0);\n }\n }\n if (identifiers.has(ISBN_13)) {\n JSONArray isbn13 = identifiers.getJSONArray(ISBN_13);\n if (isbn13.length() > 0) {\n book.isbn13 = isbn13.getString(0);\n }\n }\n }\n if (jsonObject.has(NUMBER_OF_PAGES)) {\n book.numberOfPages = jsonObject.getLong(NUMBER_OF_PAGES);\n }\n if (jsonObject.has(COVER)) {\n JSONObject cover = jsonObject.getJSONObject(COVER);\n if (cover.has(COVER_SMALL)) {\n book.coverLinkSmall = cover.getString(COVER_SMALL);\n }\n if (cover.has(COVER_MEDIUM)) {\n book.coverLinkMedium = cover.getString(COVER_MEDIUM);\n }\n if (cover.has(COVER_LARGE)) {\n book.coverLinkLarge = cover.getString(COVER_LARGE);\n }\n }\n if (jsonObject.has(SUBJECTS)) {\n JSONArray subjects = jsonObject.getJSONArray(SUBJECTS);\n for (int i = 0; i < subjects.length(); i++) {\n JSONObject subject = subjects.getJSONObject(i);\n if (subject.has(SUBJECT_NAME)) {\n book.subjects.add(subject.getString(SUBJECT_NAME));\n }\n }\n }\n if (jsonObject.has(PUBLISH_DATE)) {\n book.publishDate = jsonObject.getString(PUBLISH_DATE);\n }\n if (jsonObject.has(AUTHORS)) {\n JSONArray authors = jsonObject.getJSONArray(AUTHORS);\n for (int i = 0; i < authors.length(); i++) {\n JSONObject author = authors.getJSONObject(i);\n if (author.has(AUTHOR_NAME)) {\n book.authors.add(author.getString(AUTHOR_NAME));\n }\n }\n }\n }\n return book;\n }", "@Test(expected = IllegalArgumentException.class)\n public void testParseNullFileFails()\n {\n parser.parse((File)null);\n fail(\"Should have thrown an IllegalArgumentException\");\n }", "public void parseJson() {\n\n try {\n JSONParser parser = new JSONParser();\n jsonReader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/resources/bangor-library.json\")));\n JSONObject jsonObj = (JSONObject) parser.parse(jsonReader);\n \n String name = (String) jsonObj.get(\"name\");\n libraryName = name;\n JSONArray extractedBooks = (JSONArray) jsonObj.get(\"books\");\n\n Iterator i = extractedBooks.iterator();\n while (i.hasNext()) {\n rec = new LibraryRecord();\n rec.setLib_name(libraryName);\n JSONObject innerObj = (JSONObject) i.next();\n rec.setBook_name(innerObj.get(\"name\").toString());\n rec.setAuth_name(innerObj.get(\"author\").toString());\n rec.setCat_name(innerObj.get(\"category\").toString());\n\n if (!LibraryAccess.bookShelves.isEmpty()) {\n for (LibraryRecord bookSaved : LibraryAccess.bookShelves) {\n if (this.rec.getHashOfContent() == bookSaved.getHashOfContent()) {\n duplicate = true;\n rec = null;\n }\n }\n if (!duplicate) {\n LibraryAccess.addRecord(rec);\n }\n duplicate = false;\n\n } else {\n System.out.println(\"Library empty : Adding records...\");\n LibraryAccess.addRecord(this.rec);\n }\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ParseException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void removeLibrary(String library) {\n \t\tfor (ILibrary candidate : new ArrayList<ILibrary>(LIBRARIES)) {\n\t\t\tif (candidate.getURI().toString().endsWith(library)) {\n \t\t\t\tLIBRARIES.remove(candidate);\n \t\t\t}\n \t\t}\n \t}", "public void testParse() throws Exception\r\n {\r\n System.out.println(\"parse\");\r\n \r\n String context1 = \"package test.testpack;\\n class TestClass\\n{\\n\\tdouble d;\\n}\";\r\n String context2 = \"package test.test.testpack;\\n class TestClass\\n{\\n\\tdouble d;\\n}\";\r\n String context3 = \"\\npack age test.test.testpack ;\\n class TestClass \\n{\\n\\tdouble d;\\n}\";\r\n String context4 = \"package test.test.testpack\\n class TestClass\\n{\\n\\tdouble d;\\n}\";\r\n \r\n String context5 = \"package test.test.testpack;\\n class TestClass {\\n\\tdouble d;\\n}\";\r\n String context6 = \"package test.test.testpack;\\n class Test Class{\\n\\tdouble d;\\n}\";\r\n String context7 = \"package test.test.testpack;\\n class TestClass\\n{\\n\" +\r\n \"\\t//Det här är en double\\n\" +\r\n \"\\tdouble d;\\n\" +\r\n \"\\tdouble[] ds;\\n\" +\r\n \"\\tidltype test.test2.Test2Class idlTestObject;\" +\r\n \"\\n}\";\r\n \r\n \r\n FileParser instance = new FileParser();\r\n \r\n IDLClass expResult = null;\r\n \r\n IDLClass result = instance.parse(context1);\r\n assertEquals(result.getPackageName(), \"test.testpack\");\r\n assertEquals(result.getClassName(), \"TestClass\");\r\n \r\n result = instance.parse(context2);\r\n assertEquals(result.getPackageName(), \"test.test.testpack\");\r\n assertEquals(result.getClassName(), \"TestClass\");\r\n \r\n try\r\n {\r\n \r\n result = instance.parse(context3);\r\n fail(\"Should through\");\r\n } \r\n catch (ParseException ex)\r\n {\r\n assertEquals(\"At line 2: Invalid package declaration.\", ex.getMessage());\r\n }\r\n \r\n try\r\n {\r\n \r\n result = instance.parse(context4);\r\n fail(\"Should through\");\r\n } \r\n catch (ParseException ex)\r\n {\r\n assertEquals(\"At line 1: Missing ; .\", ex.getMessage());\r\n }\r\n \r\n result = instance.parse(context5);\r\n assertEquals(result.getPackageName(), \"test.test.testpack\");\r\n assertEquals(result.getClassName(), \"TestClass\");\r\n \r\n try\r\n {\r\n \r\n result = instance.parse(context6);\r\n fail(\"Should through\");\r\n } \r\n catch (ParseException ex)\r\n {\r\n assertEquals(\"At line 2: Invalid class declaration.\", ex.getMessage());\r\n }\r\n \r\n result = instance.parse(context7);\r\n assertEquals(result.getPackageName(), \"test.test.testpack\");\r\n assertEquals(result.getClassName(), \"TestClass\");\r\n assertEquals(result.getFields().get(0).getComment(), \"//Det här är en double\");\r\n \r\n \r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }", "@Override\n public List<FileInfo> getBaseLibraryFiles() {\n return null;\n }", "public boolean hasParse();", "@Override\n public List<FileInfo> getLibrarySubFiles(FileInfo fileInfo) {\n return null;\n }", "public OnionooParser() {\n\n\t}", "public void initParser(String file) {\n if (checkFileExists(file)) {\n parseXml(file);\n }\n }", "@VisibleForTesting\n\tDocument parseLocalFile(String url) throws IOException {\n\t\treturn Jsoup.parse(new File(url), \"UTF-8\", \"\");\n\t}", "public static boolean libraryStatement(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"libraryStatement\")) return false;\n if (!nextTokenIs(b, \"<library statement>\", AT, LIBRARY)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, LIBRARY_STATEMENT, \"<library statement>\");\n r = libraryStatement_0(b, l + 1);\n r = r && consumeToken(b, LIBRARY);\n r = r && libraryStatement_2(b, l + 1);\n p = r; // pin = 3\n r = r && consumeToken(b, SEMICOLON);\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "public LibraryModel readDefaultLibrary(Translator translator, File location) {\r\n\t\t/*\r\n\t\t * Check against inifiniloops. This is usually caused by trying to get\r\n\t\t * something from the library while the library isn't done loading yet.\r\n\t\t * \r\n\t\t * - remiller\r\n\t\t */\r\n\t\tif (this.mode == IoMode.LIBRARY) {\r\n\t\t\tthrow new IllegalStateException(\r\n\t\t\t\t\t\"Loop detected in LibraryModel Loading\");\r\n\t\t}\r\n\r\n\t\treturn this.readLibrary(translator, location);\r\n\t}", "SAPL parse(InputStream saplInputStream);", "void setParser(CParser parser);", "public void _default(Object parser, Object data) {\n }", "@Test(expected = IllegalArgumentException.class)\n public void testParseNullConfigPathFails()\n {\n parser.parse((String)null);\n fail(\"Should have thrown an IllegalArgumentException\");\n }", "public static Library readLibrary(URL fileURL, String libName, FileType type, boolean quick, Map<Setting,Object> projectSettings) {\n \t\tif (fileURL == null) return null;\n \t\tlong startTime = System.currentTimeMillis();\n errorLogger = ErrorLogger.newInstance(\"Library Read\");\n \n File f = new File(fileURL.getPath());\n \n if (f != null && f.exists()) {\n LibDirs.readLibDirs(f.getParent());\n }\n \t\tLibraryFiles.initializeLibraryInput();\n \n \t\tLibrary lib = null;\n \t\tboolean formerQuiet = isChangeQuiet();\n \t\tif (!formerQuiet) changesQuiet(true);\n \t\ttry {\n \t\t\t// show progress\n \t\t\tif (!quick) startProgressDialog(\"library\", fileURL.getFile());\n \n \t\t\tCell.setAllowCircularLibraryDependences(true);\n \n \t\t\tStringBuffer errmsg = new StringBuffer();\n \t\t\tboolean exists = TextUtils.URLExists(fileURL, errmsg);\n \t\t\tif (!exists)\n \t\t\t{\n \t\t\t\tSystem.out.print(errmsg.toString());\n \t\t\t\t// if doesn't have extension, assume DEFAULTLIB as extension\n \t\t\t\tString fileName = fileURL.toString();\n \t\t\t\tif (fileName.indexOf(\".\") == -1)\n \t\t\t\t{\n \t\t\t\t\tfileURL = TextUtils.makeURLToFile(fileName+\".\"+type.getExtensions()[0]);\n \t\t\t\t\tSystem.out.print(\"Attempting to open \" + fileURL+\"\\n\");\n \t\t\t\t\terrmsg.setLength(0);\n \t\t\t\t\texists = TextUtils.URLExists(fileURL, errmsg);\n \t\t\t\t\tif (!exists && (type != FileType.DELIB)) { // Check if this is a DELIB\n \t\t\t\t\t\tfileURL = TextUtils.makeURLToFile(fileName+\".\"+FileType.DELIB.getExtensions()[0]);\n \t\t\t\t\t\tSystem.out.print(\"Attempting to open \" + fileURL+\"\\n\");\n \t\t\t\t\t\terrmsg.setLength(0);\n \t\t\t\t\t\texists = TextUtils.URLExists(fileURL, errmsg);\n \t\t\t\t\t\tif (exists) { // If it is a DELIB\n \t\t\t\t\t\t\tlibName = null; // Get the library name from fileURL\n \t\t\t\t\t\t\ttype = FileType.DELIB; // Set the type to DELIB\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tif (!exists) System.out.print(errmsg.toString());\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (exists)\n \t\t\t{\n \t\t\t\t// get the library name\n \t\t\t\tif (libName == null) libName = TextUtils.getFileNameWithoutExtension(fileURL);\n \t\t\t\tlib = readALibrary(fileURL, null, libName, type, projectSettings);\n \t\t\t}\n \t\t\tif (LibraryFiles.VERBOSE)\n \t\t\t\tSystem.out.println(\"Done reading data for all libraries\");\n \n \t\t\tLibraryFiles.cleanupLibraryInput();\n \t\t\tif (LibraryFiles.VERBOSE)\n \t\t\t\tSystem.out.println(\"Done instantiating data for all libraries\");\n \t\t} finally {\n \t\t\tif (!quick) stopProgressDialog();\n \t\t\tCell.setAllowCircularLibraryDependences(false);\n \t\t}\n \t\tif (!formerQuiet) changesQuiet(formerQuiet);\n \t\tif (lib != null && !quick)\n \t\t{\n \t\t\tlong endTime = System.currentTimeMillis();\n \t\t\tfloat finalTime = (endTime - startTime) / 1000F;\n \t\t\tSystem.out.println(\"Library \" + fileURL.getFile() + \" read, took \" + finalTime + \" seconds\");\n \t\t}\n \n // if CVS is enabled, get status of library\n // if (CVS.isEnabled()) {\n // Update.updateOpenLibraries(Update.UpdateEnum.STATUS);\n // }\n \t\terrorLogger.termLogging(true);\n \n \t\treturn lib;\n \t}", "public OrotParser() {\n createPackagesJson();\n }", "public abstract void parse() throws IOException;", "private T parse(String value)\n\t\t{\n\t\t\treturn null;\n\t\t}", "public Parser()\n {\n //nothing to do\n }", "public interface Parser {\n\n}", "@Test\r\n public void testOnDemandImportStringHandling() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.*\");\r\n\r\n Type t0 = typeParser.parse(\"List\");\r\n assertEquals(t0, java.util.List.class);\r\n }", "private static SimpleNode parse(String filename) throws ParseException {\n\t\tParser parser;\n\t\t// open file as input stream\n\t\ttry {\n\t\t\tparser = new Parser(new java.io.FileInputStream(filename));\n\t\t}\n\t\tcatch (java.io.FileNotFoundException e) {\n\t\t\tSystem.out.println(\"ERROR: file \" + filename + \" not found.\");\n\t\t\treturn null;\n\t\t}\n\t\t// parse and return root node\n\t\treturn parser.parse();\n\t}", "Parse createParse();", "public Library() {\n this.okToPrint = true;\n this.libraryBooks = this.readBookCollection();\n this.patron = new HashMap<String, Patron>();\n this.calendar = new Calendar();\n this.openOrNot = false;\n this.numberedListOfServing = new HashMap<Integer, Book>();\n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n this.serveOrNot = false;\n this.searchOrNot = false;\n this.servingPatron = new Patron(null,null);\n }", "private void parse() {\n if (workingDirectory != null) {\n Parser.initConstants(this, workingDirectory, remainderFile);\n Parser.parseIt();\n workingDirectory = null;\n remainderFile = null;\n jbParse.setEnabled(false);\n }\n }", "public void beginLoad(int libraryCount);", "public ArrayList getLibrary() {\n return Library;\n }", "public AdvConditionParser()\n{\n //nothing to do\n}", "public void setLibele(String lib){\n\t\tlibeleService = lib;\n\t}", "Program parse() throws SyntaxException {\n\t\tProgram p = null;\n\t\tp = program();\n\t\tmatchEOF();\n\t\treturn p;\n\t}", "private void initialize() {\r\n\t\t//For the library model\r\n\t\tEObject eObject=ModelPersisterHelper.modelLoader();\r\n\t\tLibrary library=null;\r\n\t\tif(eObject instanceof Library){\r\n\t\t\tlibrary=(Library)eObject;\r\n\t\t}\r\n\t\tinvisibleRoot = new TreeParent(\"\");\r\n\t\tinvisibleRoot.addChild(library);\r\n\t}", "@Before\n public void buildParser() throws Exception {\n parser = new com.putable.siteriter.msmith19.SDLParserImpl();\n }", "public void setLibrary(Library library2) {\r\n\t\tthis.library = library2;\r\n\t}", "public LibraryMap readFromSource(Source source, String libraryFileContents) {\n BooleanErrorListener errorListener = new BooleanErrorListener();\n Scanner scanner = new Scanner(\n source,\n new CharSequenceReader(libraryFileContents),\n errorListener);\n Parser parser = new Parser(source, errorListener);\n CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize());\n LibraryBuilder libraryBuilder = new LibraryBuilder(useDart2jsPaths);\n // If any syntactic errors were found then don't try to visit the AST structure.\n if (!errorListener.getErrorReported()) {\n unit.accept(libraryBuilder);\n }\n return libraryBuilder.getLibrariesMap();\n }", "private NativeLibraryLoader() {\n }", "private ParseTree parse(String testProgram, String parseOption) {\n CharStream input = new ANTLRInputStream(testProgram);\n Lexer lexer = new LanguageLexer(input);\n TokenStream tokens = new CommonTokenStream(lexer);\n LanguageParser parser = new LanguageParser(tokens);\n\n ParseTree result = null;\n if(parseOption.equals(\"program\")) {\n result = parser.program();\n } else if (parseOption.equals(\"stat\")) {\n result = parser.stat();\n } else { // Parse Expression.\n result = parser.expr();\n }\n\n return result;\n }", "public BlobParserConfig() {\n\t\tthis.libraryPath = null;\n\t\tthis.parserClass = null;\n\t}", "public void parse(String fileName) throws Exception;", "private GraphParser(){ \n\t}", "public static boolean testLibraryParseRunLibrarianCheckoutBookCommand() {\n boolean test = false; // boolean test set to false because must throw a ParseException to be\n // true\n try {\n // creates a new Exceptional Library\n ExceptionalLibrary lib = new ExceptionalLibrary(\"Madison\", \"Gus\", \"abc\");\n String[] commands = new String[3]; // commands to pass throughout the parameters\n commands[1] = \"201900000987761\"; // invalid cardBarCode\n commands[2] = \"1\"; // bookId to correctly check if it parses the string\n lib.parseRunLibrarianCheckoutBookCommand(commands);\n } catch (ParseException e) {\n test = true; // if ParseException caught test is true and passed\n System.out.println(\"Caught parse exception: test passed\");\n }\n return test;\n }", "@Test\r\n public void testImportStringPriorities() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser0 = TypeParsers.create();\r\n typeParser0.addImport(\"java.awt.List\");\r\n typeParser0.addImport(\"java.util.*\");\r\n\r\n Type t0 = typeParser0.parse(\"List\");\r\n assertEquals(t0, java.awt.List.class);\r\n \r\n TypeParser typeParser1 = TypeParsers.create();\r\n typeParser1.addImport(\"java.awt.*\");\r\n typeParser1.addImport(\"java.util.List\");\r\n\r\n Type t1 = typeParser1.parse(\"List\");\r\n assertEquals(t1, java.util.List.class);\r\n \r\n }", "public OpenOfficeXMLDocumentParser() {\r\n }", "@Test\r\n public void testImportStringAmbiguity() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.*\");\r\n typeParser.addImport(\"java.awt.*\");\r\n try\r\n {\r\n typeParser.parse(\"List\");\r\n fail(\"Expected exception\");\r\n }\r\n catch (IllegalArgumentException e)\r\n {\r\n // Expected\r\n }\r\n }", "HRESULT LoadTypeLib(String szFile, PointerByReference pptlib);", "List<ParseData> parse(ParseDataSettings parseData);", "public Library() {\n books = new Book[0];\n numBooks = 0;\n }", "public Parser()\n{\n //nothing to do\n}", "protected abstract void parseSource(final Document doc, final Resource.Builder resource);", "static void parseIt() {\n try {\n long start = System.nanoTime();\n int[] modes = {DET_MODE, SUM_MODE, DOUBLES_MODE};\n String[] filePaths = {\"\\\\catalogue_products.xml\", \"\\\\products_to_categories.xml\", \"\\\\doubles.xml\"};\n HashMap<String, String[]> update = buildUpdateMap(remainderFile);\n window.putLog(\"-------------------------------------\\n\" + updateNodes(offerNodes, update) +\n \"\\nФайлы для загрузки:\");\n for (int i = 0; i < filePaths.length; i++) {\n // Define location for output file\n File outputFile = new File(workingDirectory.getParent() + filePaths[i]);\n pushDocumentToFile(outputFile, modes[i]);\n printFileInfo(outputFile);\n }\n window.putLog(\"-------------------------------------\\nВсего обработано уникальных записей: \" +\n offerNodes.size());\n long time = (System.nanoTime() - start) / 1000000;\n window.putLog(\"Завершено без ошибок за \" + time + \" мс.\");\n offerNodes = null;\n //window.workshop.setParseButtonDisabled();\n } catch (TransformerException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \" (\" + e.getException() + \")\\n\\t\" + e.getMessageAndLocation()));\n } catch (ParserConfigurationException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \"\\n\\t\" + e.getLocalizedMessage()));\n } catch (SAXException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(\"SAXexception: \" + e.getMessage()));\n\n } catch (IOException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \"\\n\\t\" + e.getMessage() + \". \" + e.getStackTrace()[0]));\n }\n }", "public String getLibraryNumber()\r\n {\r\n return libraryNumber;\r\n }" ]
[ "0.55300504", "0.54706436", "0.5416343", "0.5339435", "0.5314789", "0.5257001", "0.5255851", "0.523613", "0.5194612", "0.51557714", "0.5142058", "0.51199436", "0.50945944", "0.50879484", "0.5045182", "0.50061494", "0.4998454", "0.49964032", "0.49899092", "0.49654377", "0.49585947", "0.49388474", "0.49194205", "0.49188218", "0.4897772", "0.4880189", "0.48775393", "0.4860765", "0.4836958", "0.48097622", "0.47517344", "0.47387657", "0.47348437", "0.47212377", "0.47171104", "0.4717028", "0.4709978", "0.47096562", "0.4705647", "0.4699416", "0.4692078", "0.4686783", "0.46820503", "0.46763933", "0.46619543", "0.4651147", "0.46434465", "0.46409383", "0.46360368", "0.46348736", "0.4610219", "0.46086308", "0.45966208", "0.45881626", "0.45776647", "0.45554787", "0.4543708", "0.453987", "0.45384952", "0.45345744", "0.45254773", "0.450701", "0.44947764", "0.44848773", "0.44723928", "0.44721043", "0.4471581", "0.44693527", "0.44687772", "0.44626272", "0.44618303", "0.445814", "0.4454087", "0.4448209", "0.44476053", "0.4443649", "0.44417658", "0.444128", "0.44402885", "0.44384092", "0.44366038", "0.44336432", "0.4429889", "0.44263875", "0.4425656", "0.4424437", "0.44242358", "0.44093323", "0.44037628", "0.43940148", "0.439194", "0.4388661", "0.43880343", "0.4388008", "0.43826488", "0.43785104", "0.43712923", "0.43517444", "0.43511048", "0.4350928", "0.43469658" ]
0.0
-1
note: returns null on failure, parent method must throw parsing error if this method returns null
private static Net parseArrayNet(ParserRuleContext con) throws Exception { int tokensR = con.getSourceInterval().length(); if (tokensR == 4 || tokensR == 5) { // indexed identifier, e.g. x[1] int spaceBuffer = tokensR == 5 ? 1 : 0; int firstToken = con.start.getTokenIndex(); Token token1 = tokenStream.get(firstToken); Token token2 = tokenStream.get(firstToken + 1 + spaceBuffer); Token token3 = tokenStream.get(firstToken + 2 + spaceBuffer); Token token4 = tokenStream.get(firstToken + 3 + spaceBuffer); if (token2.getText().equals("[") && token4.getText().equals("]")) { Net result = new Net(token1.getText()); int bit = Integer.parseInt(token3.getText()); result.start = bit; result.end = bit; return result; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parse() {\n }", "@Override\n\tpublic String unparse() {\n\t\treturn null;\n\t}", "@Override\n public String parse(ValidationInfo validationInfo) {\n return null;\n }", "@Override\n public String parse(AssignmentInfo assignmentInfo) {\n return null;\n }", "@Override\n\tpublic void parse() throws IOException {\n\t}", "@Override\n\tpublic void postParse() {\n\t}", "@Override\n\tpublic void postParse() {\n\t}", "public abstract void parse() throws IOException;", "private T parse(String value)\n\t\t{\n\t\t\treturn null;\n\t\t}", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "void parse();", "@Override\r\n public FirstElement documentBodyParse(String filePath) {\n return null;\r\n }", "@Nullable\n public ParseError getParseError() {\n //TODO\n return null;\n }", "private void parseData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void parseSelf(String leftstr)\r\n\t{\n\t\t\r\n\t}", "private Sentence parseSentence(Sentence s) throws Exception {\n\t\tif(s == null)\n\t\t\treturn null;\n\t\treturn (useParser)?textTools.parseSentence(s):s;\n\t}", "private Parser () { }", "private Module parse(InputStream input)\r\n\t\t\t\t\tthrows ModuleParseException\r\n\t{\n\t\treturn null;\r\n\t}", "@Override\r\n protected void parseAttributes()\r\n {\n\r\n }", "private Object read() throws XMLParseException {\n\t\tswitch (_tokenizer.next()) {\n\t\tdefault: break;\n\t\tcase ERROR: throw new XMLParseException(_tokenizer.getCurrentText());\n\t\tcase TEXT: return _tokenizer.getCurrentText();\n\t\tcase OPEN:\n\t\t\tElement result = new Element(_tokenizer.getCurrentName());\n\t\t\twhile (_tokenizer.next() == XMLTokenType.ATTR) {\n\t\t\t\tif (result.setAttr(_tokenizer.getCurrentName(), _tokenizer.getCurrentText()) != null) {\n\t\t\t\t\tthrow new XMLParseException(\"duplicate attribute: \" + _tokenizer.getCurrentName());\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (_tokenizer.current() == XMLTokenType.ECLOSE) {\n\t\t\t\t// System.out.println(\"ended /> for \" + result.getName());\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tif (_tokenizer.current() != XMLTokenType.CLOSE) {\n\t\t\t\tthrow new XMLParseException(_tokenizer.getCurrentText());\n\t\t\t}\n\t\t\t_pending.push(result.getName());\n\t\t\twhile (_tokenizer.next() != XMLTokenType.ETAG) {\n\t\t\t\t/*if (_tokenizer.current() == XMLTokenType.END) {\n\t\t\t\t\tthrow new XMLParseException(\"Unexpected end of file\");\n\t\t\t\t}*/\n\t\t\t\tif (_tokenizer.current() == XMLTokenType.END) {\n\t\t\t\t\tif (isHTML) {\n\t\t\t\t\t\t_pending.pop();\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new XMLParseException(\"Missing end tag for <\" + result.getName() + \">\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_tokenizer.saveToken();\n\t\t\t\tresult.addContent(read());\n\t\t\t}\n\t\t\t_pending.pop();\n\t\t\tif (!_tokenizer.getCurrentName().equals(result.getName())) {\n\t\t\t\tif (isHTML) {\n\t\t\t\t\t// System.out.println(\"HTML backup for \" + result.getName());\n\t\t\t\t\tfor (String p : _pending) {\n\t\t\t\t\t\tif (_tokenizer.getCurrentName().equals(p)) {\n\t\t\t\t\t\t\t_tokenizer.saveToken();\n\t\t\t\t\t\t\t//System.out.println(\"implicitly ended by </\" + p + \">\");\n\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new XMLParseException(\"<\" + result.getName() + \"> ended with </\" + _tokenizer.getCurrentName() + \">\");\n\t\t\t}\n\t\t\treturn result;\n\t\tcase END: throw new XMLParseException(\"no XML element\");\n\t\t}\n\t\t// NB: if execution reaches here, we did something wrong.\n\t\tthrow new XMLParseException(\"internal error: what kind of token is this? \" + _tokenizer);\n\t}", "CParser getParser();", "public IParser getParserSuccessfull ( ){ return mParserSuccessfull; }", "@Override\r\n protected void parseIssues()\r\n {\n\r\n }", "@Override\n\t\t\tprotected Response<String> parseNetworkResponse(\n\t\t\t\t\tNetworkResponse response) {\n\n\t\t\t\treturn null;\n\t\t\t}", "private Term parseImpl() throws ParseException {\n final Term expr = parseTerm(false);\n final int tt = _tokenizer.next();\n if (tt != Tokenizer.TT_EOS) {\n reportError(\"Incomplete expression.\"); /*I18N*/\n }\n return expr;\n }", "@Override\n public RecordType parseMetadata() {\n \n this.stationIndex = StationLookup.lookup(getStationId(this.filename));\n \n try {\n reader.mark(READ_AHEAD_LIMIT);\n String line = null;\n boolean headerRead = false;\n List<Variable> vars = null;\n while (null != (line = reader.readLine())) {\n Matcher matcher = headerLinePattern.matcher(line);\n if (matcher.matches()) {\n vars = headerVariables(matcher.group(1));\n reader.mark(READ_AHEAD_LIMIT);\n headerRead = true;\n }\n else if (headerRead) {\n matcher = dataLinePattern.matcher(line);\n if (matcher.matches()) {\n String date = matcher.group(1);\n Instant timestep = Instant.parse(date, getInputDateFormatter());\n this.baseDate = timestep;\n \n RecordType recordType = new RecordType(\"days since \" + baseDate.toString());\n for (Variable var : vars) {\n recordType.addType(var);\n }\n \n reader.reset();\n return recordType;\n }\n }\n }\n \n }\n catch (IOException ex) {\n LOG.debug(\"Error reading metadata\", ex);\n }\n return null;\n }", "@Override\r\n public List<FirstElement> documentBodyParse(String filePath, int subLength, int subSum) {\n return null;\r\n }", "protected Parser getParser() {\n\t\treturn myParser;\n\t}", "public void parse() {\n if (commandSeparate.length == 1) {\n parseTaskType();\n } else if (commandSeparate.length == 2) {\n parseTaskType();\n index = commandSeparate[1];\n taskName = commandSeparate[1];\n } else {\n parseTaskType();\n parseTaskName();\n parseTaskDate();\n }\n }", "private ParseInterface getParser(String sid) {\n if (parseMap.containsKey(sid)) {\n return parseMap.get(sid);\n } else {\n Log.d(TAG, \"Could not instantiate \" + sid + \"parser\");\n }\n return null;\n }", "@Override\n\t\t\t\tpublic boolean hasParser() {\n\t\t\t\t\treturn true;\n\t\t\t\t}", "protected Parser getParser() throws TemplateException {\n try {\n return (Parser) _broker.getValue(\"parser\",\"wm\"); \n } catch (Exception e) {\n Engine.log.exception(e);\n throw new TemplateException(\"Could not load parser type \\\"\" + \n _parserName + \"\\\": \" + e);\n }\n }", "public NFA parse() throws ParseException;", "@Override\r\n\tpublic Object getParseResult() {\n\t\treturn this;\r\n\t}", "@Override\r\n\tpublic Object getParseResult() {\n\t\treturn this;\r\n\t}", "Parse createParse();", "CParserResult getParserResult();", "private static List<Message> parse(File f, String sourceUrlString) {\n \t\treturn null;\n \t}", "protected Element parseString(String str){\n\t\ttry {\n\t\t\tparser.parse(str);\n\t\t\treturn parser.getDocument().getDocumentElement();\n\t\t} catch (SAXException e) {\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn el(\"failure\", text(\"The workflow instrumenter could not insert an activity here, because\" +\n\t\t\t\"the code for the activitiy, that was supplied in the requirement specification was not correct!\"));\n\t}", "public Parse(String str)\r\n {\r\n super(str);\r\n }", "public String getParseErrorMessage();", "@Override\n public String visit(UnparsableStmt n, Object arg) {\n return null;\n }", "public abstract boolean isParseCorrect();", "@Override\r\n public Object getValueFromString(String text_p) throws Exception\r\n {\n return null;\r\n }", "IElementDef parse(ConfigSource configSource);", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }" ]
[ "0.6755542", "0.67433584", "0.67276186", "0.6645589", "0.65029466", "0.61908203", "0.61908203", "0.6122212", "0.6087517", "0.6085672", "0.6061088", "0.6049203", "0.59971064", "0.5913961", "0.5893831", "0.58568865", "0.5855423", "0.58242226", "0.57865095", "0.5753644", "0.57408094", "0.5724129", "0.5724008", "0.5708786", "0.57007575", "0.569606", "0.5673681", "0.56415", "0.5578269", "0.5569067", "0.5563926", "0.5558259", "0.55574185", "0.5542672", "0.5542672", "0.55407876", "0.5533873", "0.55308735", "0.55237", "0.5514358", "0.5502801", "0.54931605", "0.5471323", "0.5465957", "0.5463696", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129", "0.5457129" ]
0.0
-1
verify no ports have UNKNOWN direction
private static void checkPortDirections(Netlist netlist) throws UnsupportedGrammerException { for (Map.Entry<String, Port> entry : netlist.ports.entrySet()) { if (entry.getValue().direction == PinDirection.UNKONWN) { String msg = String.format(ERR_MSG_3, entry.getValue().id); fail(msg); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasPort();", "boolean hasPort();", "public boolean hasPort() {\n return !ports.isEmpty();\n }", "@Test\n public void testConnectToInvalidService()\n throws IOException\n {\n final boolean availability = ConnectionChecker.checkServiceAvailability(\"localhost\", 65534, 3000);\n\n assertFalse(availability);\n }", "public boolean isValid() {\n return (m_Port != 0);\n }", "boolean hasDirection();", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkInfoPort() {\n\t\tboolean flag = oTest.checkInfoPort();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "public boolean hasPort() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasPort() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "private boolean isPortInUse(String portId) {\n return false;\n }", "public boolean hasPort() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasPort() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean isInputPortOpen(int portNumber) { throw new RuntimeException(\"Stub!\"); }", "@Test(expected=IllegalStateException.class)\n public void portBeforeInitialization() {\n port();\n fail(\"cannot get the port value now, Jadler hasn't been initialized yet\");\n }", "public void testConstructorWithInvalidPorts() {\n\t\tint[] invalidPorts = new int[2];\n\t\tinvalidPorts[0] = -1;\n\t\tinvalidPorts[1] = 66000;\n\t\tfor(int i=0; i<invalidPorts.length; i++) {\n\t\t\ttry {\n\t\t\t\tRemoteFileDesc rfd = \n\t\t\t\t\tnew RemoteFileDesc(\"www.limewire.org\", invalidPorts[i], \n\t\t\t\t\t\t\t\t\t 10, \"test\",\n\t\t\t\t\t\t\t\t\t 10, TEST_GUID, 10, false, 3,\n\t\t\t\t\t\t\t\t\t false, null, null, false, false,\"\",\n 0, null, -1);\n\t\t\t\tfail(\"rfd1 should have received an exception for invalid port: \"+\n\t\t\t\t\t rfd.getPort());\n\t\t\t} catch(IllegalArgumentException e) {\n\t\t\t\t// this is expected\n\t\t\t}\n\t\t}\n\t}", "private boolean correctValues() {\n try {\n //TODO: check COM ports\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n return true;\n }", "@Test\n public void testReplyExternalPortBadRequest() {\n replay(hostService); // no further host service expectations\n replay(interfaceService);\n\n Ip4Address theirIp = Ip4Address.valueOf(\"10.0.1.254\");\n\n // Request for a valid external IP address but coming in the wrong port\n Ethernet arpRequest = buildArp(ARP.OP_REQUEST, VLAN1, MAC1, null, theirIp,\n Ip4Address.valueOf(\"10.0.3.1\"));\n proxyArp.reply(arpRequest, LOC1);\n assertEquals(0, packetService.packets.size());\n\n // Request for a valid internal IP address but coming in an external port\n packetService.packets.clear();\n arpRequest = buildArp(ARP.OP_REQUEST, VLAN1, MAC1, null, theirIp, IP1);\n proxyArp.reply(arpRequest, LOC1);\n assertEquals(0, packetService.packets.size());\n }", "@Override\r\n\tpublic boolean canTeleport() {\n\t\treturn false;\r\n\t}", "private static boolean isLocalUdpPortFree(int port) {\r\n \tboolean res = false;\r\n \ttry {\r\n \t\tDatagramConnection conn = NetworkRessourceManager.createDatagramConnection();\r\n \t\tconn.open(port);\r\n conn.close();\r\n \t\tres = true;\r\n \t} catch(IOException e) {\r\n \t\tres = false;\r\n \t}\r\n \treturn res;\r\n }", "public boolean hasPort() {\n return fieldSetFlags()[6];\n }", "boolean isSetDirection();", "private static int checkPort(String raw) \n\t{\n\t\tint portNumber = -1;\n\t\ttry \n\t\t{\n\t\t\tportNumber = Integer.parseInt(raw);\n\t\t\t\n\t\t\tif(portNumber <= 0)\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Port must be positive.\");\n\t\t\t}\n\t\t}catch(Exception e) \n\t\t{\n\t\t\terrorQuit(\"Invalid port.\");\n\t\t}\n\t\treturn portNumber;\n\t}", "public boolean hasPort() {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"hasPort()\");\n Via via=(Via)sipHeader;\n return via.hasPort();\n }", "public static boolean isValidPort(int a_port)\n\t{\n\t\tif ( (a_port < PORT_MIN_VALUE) || (a_port > PORT_MAX_VALUE))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean validPort(int port) {\n if (port >= 0 && port <= 65535) {\n return true;\n } else return false;\n }", "boolean checkDir(Directions dir);", "public boolean hasDirection() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }", "boolean hasResponsePort();", "public boolean hasDirection() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }", "boolean hasDestination();", "boolean hasDestination();", "@Test\n void conditionalBindToPort()\n {\n objectUnderTest\n .conditionalBind(() -> false, ProxyAdapter.class).to(SimpleApplicationService.class)\n .start();\n\n //Assert that no binding has been performed\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class);\n\n assertTrue(result.getPortList().isEmpty());\n }", "boolean no_onport(DiagnosticChain diagnostics, Map<Object, Object> context);", "public void scannerPort(boolean grid[]){\r\n\t\tint dimension = grid.length;\r\n\t\tSystem.out.println(\"Porte da scansionare: \"+dimension);\r\n\t\tint portNumber = 0;\r\n\t\tfor(int i = 0;i < dimension;i++){\t\t\t\r\n\t\t\tportNumber = i + 1024;\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tDatagramSocket ds = new DatagramSocket(portNumber);\r\n\t\t\t\tds.close();\r\n\t\t\t\tgrid[i] = true;\r\n\t\t\t\tSystem.out.println(\"Porta \"+portNumber+\" libera\");\r\n\t\t\t}\r\n\t\t\tcatch(BindException bex){\r\n\t\t\t\tgrid[i] = false;\r\n\t\t\t\tSystem.out.println(\"Porta \"+portNumber+\" occupata\");\r\n\t\t\t}\r\n\t\t\tcatch(SocketException soex){\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private boolean isResolvable() {\n\t\tfinal int sourceParity = board.calculateParity() % 2;\n\t\tfinal int targetParity = goal.calculateParity() % 2;\n\t\treturn (((sourceParity != 0) && (targetParity != 0)) || ((sourceParity == 0) && (targetParity == 0)));\n\t}", "@Test\n public void testIsValid() {\n assertTrue(scoutDec.isValid());\n scoutDec.setParameters(new DirectionParameters(null));\n assertFalse(scoutDec.isValid());\n }", "boolean isBadCommunication();", "private static void checkPortsAndNets(Netlist netlist) throws UnsupportedGrammerException {\n\n\t\tfor (Map.Entry<String, Port> entry : netlist.ports.entrySet()) {\n\n\t\t\tPort port = entry.getValue();\n\n\t\t\tNet net = netlist.nets.get(port.id);\n\n\t\t\tif (net != null) {\n\n\t\t\t\tif (net.start != port.start || net.end != port.end) {\n\n\t\t\t\t\tString emsg = String.format(ERR_MSG_9, port.id, port.start, port.end, net.id, net.start, net.end);\n\n\t\t\t\t\tfail(emsg);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "public void testParsePortNumber_Null() throws UnknownHostException {\n try {\n PortParser.parsePortNumber(null);\n fail(\"Expected CommandSyntaxException\");\n }\n catch (CommandSyntaxException expected) {\n LOG.info(\"Expected: \" + expected);\n }\n }", "public boolean isUnivSinkExistsSol1() {\n\t\t\tList<Integer> degrees = new ArrayList(this.indegreeCounts.values());\n\t\t\tfor (int degree : degrees) {\n\t\t\t\tif (degree == this.v - 1) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public void testParsePortNumber_InsufficientParameters() throws UnknownHostException {\n try {\n PortParser.parsePortNumber(PARAMETERS_INSUFFICIENT);\n fail(\"Expected CommandSyntaxException\");\n }\n catch (CommandSyntaxException expected) {\n LOG.info(\"Expected: \" + expected);\n }\n }", "private void verifyPacketOut(Ethernet expected, ConnectPoint outPort,\n OutboundPacket actual) {\n assertArrayEquals(expected.serialize(), actual.data().array());\n assertEquals(1, actual.treatment().immediate().size());\n assertEquals(outPort.deviceId(), actual.sendThrough());\n Instruction instruction = actual.treatment().immediate().get(0);\n assertTrue(instruction instanceof OutputInstruction);\n assertEquals(outPort.port(), ((OutputInstruction) instruction).port());\n }", "private AvailablePortFinder() {\n // Do nothing\n }", "boolean hasQueryPort();", "public boolean hasLanded ();", "@Test\n public void testNoMoreEnabledPortCase1() throws Exception {\n Port port1 = new DefaultPort(dev1, p1, true);\n Port port2 = new DefaultPort(dev1, p2, true);\n Port port3 = new DefaultPort(dev1, p3, true);\n Port port4 = new DefaultPort(dev1, p4, true);\n Port port5 = new DefaultPort(dev1, p5, true);\n List<Port> ports = Lists.newArrayList(port1, port2, port3, port4, port5);\n\n expect(deviceService.getPorts(anyObject(DeviceId.class))).andReturn(ports).anyTimes();\n replay(deviceService);\n assertFalse(rrp.noMoreEnabledPort(devId1, v10));\n assertFalse(rrp.noMoreEnabledPort(devId1, v20));\n assertFalse(rrp.noMoreEnabledPort(devId1, vInt));\n }", "@Test\n void invalidBindToPortAdapter()\n {\n var drivingAdapter = objectUnderTest\n .bind(ProxyAdapter.class);\n\n //Act /Assert\n assertThrows(PortConventionViolation.class, () -> drivingAdapter.to(SimpleApplicationServiceAdapter.class));\n }", "public void testConstructorWithValidPorts() {\n\t\tint[] validPorts = new int[2];\n\t\tvalidPorts[0] = 10000;\n\t\tvalidPorts[1] = 6000;\n\t\tfor(int i=0; i<validPorts.length; i++) {\n\t\t\ttry {\n\t\t\t\tRemoteFileDesc rfd = \n\t\t\t\t\tnew RemoteFileDesc(\"www.limewire.org\", validPorts[i], \n\t\t\t\t\t\t\t\t\t 10, \"test\",\n\t\t\t\t\t\t\t\t\t 10, TEST_GUID, 10, false, 3,\n\t\t\t\t\t\t\t\t\t false, null, null, false, false,\"\",\n 0, null, -1);\n\t\t\t} catch(IllegalArgumentException e) {\n\t\t\t\tfail(\"rfd1 should not have received an exception for valid port: \"+\n\t\t\t\t\t validPorts[i], e);\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testReplyExternalPortBadRequestIpv6() {\n replay(hostService); // no further host service expectations\n replay(interfaceService);\n\n Ip6Address theirIp = Ip6Address.valueOf(\"1000::ffff\");\n\n Ethernet ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION,\n MAC1,\n MacAddress.valueOf(\"33:33:ff:00:00:01\"),\n theirIp,\n Ip6Address.valueOf(\"3000::1\"));\n proxyArp.reply(ndpRequest, LOC1);\n assertEquals(0, packetService.packets.size());\n\n // Request for a valid internal IP address but coming in an external port\n packetService.packets.clear();\n ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION,\n MAC1,\n MacAddress.valueOf(\"33:33:ff:00:00:01\"),\n theirIp,\n IP3);\n proxyArp.reply(ndpRequest, LOC1);\n assertEquals(0, packetService.packets.size());\n }", "boolean hasCanIpForward();", "public boolean isConnectedPort() {\n for (Tile t : getTile().getSurroundingTiles(1)) {\n if (!t.isLand() && t.isHighSeasConnected()) return true;\n }\n return false;\n }", "public boolean canFrameConnectOut(int dir)\r\n/* 40: */ {\r\n/* 41: 31 */ return (this.StickySides & 1 << dir) > 0;\r\n/* 42: */ }", "public boolean isNetworkValid()\n\t{\n\t\t// TODO will need to implement this..\n\t\treturn true;\n\t}", "@Test\n public void testNoMoreEnabledPortCase3() throws Exception {\n Port port1 = new DefaultPort(dev1, p1, false);\n Port port2 = new DefaultPort(dev1, p2, true);\n Port port3 = new DefaultPort(dev1, p3, false);\n Port port4 = new DefaultPort(dev1, p4, true);\n Port port5 = new DefaultPort(dev1, p5, true);\n List<Port> ports = Lists.newArrayList(port1, port2, port3, port4, port5);\n\n expect(deviceService.getPorts(anyObject(DeviceId.class))).andReturn(ports).anyTimes();\n replay(deviceService);\n assertFalse(rrp.noMoreEnabledPort(devId1, v10));\n assertTrue(rrp.noMoreEnabledPort(devId1, v20));\n assertFalse(rrp.noMoreEnabledPort(devId1, vInt));\n }", "public boolean isValidPort(String port) {\n\t\tfor(char x : port.toCharArray()) {\n\t\t\tif(!Character.isDigit(x)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean isForwarding();", "public void testGetPort() {\n }", "boolean hasRouteDest();", "public void validatePort(String port) {\r\n\t\tthis.isPortValid = model.isValidPort(port);\r\n\r\n\t\tif (this.isPortValid) {\r\n\t\t\tview.port.setStyle(\"-fx-text-inner-color: green;\");\r\n\t\t\tcheckButtonUnlock();\r\n\t\t} else {\r\n\t\t\tview.port.setStyle(\"-fx-text-inner-color: red;\");\r\n\t\t\tlockButton();\r\n\t\t}\r\n\t}", "public void validate(FailureCollector collector) {\n if (!containsMacro(PORT) && port != null && port < 0) {\n collector.addFailure(\"Port must be a positive number.\", null).withConfigProperty(PORT);\n }\n }", "private void checkAddress() {\n\t\t// if \"Set Address\" has not been performed then give the message to set\n\t\t// it first\n\t\tif (null == oscPort) {\n\t\t\tshowError(\"Please set an address first\");\n\t\t}\n\t}", "private static boolean validDir(double direction) {\r\n\t\treturn multipleOfTen(direction) && withinDirRange(direction);\r\n\t}", "private void checkNotUnknown() {\n if (isUnknown())\n throw new AnalysisException(\"Unexpected 'unknown' value!\");\n }", "boolean connected(int p, int q) {return false; /*mock*/}", "boolean hasPlainTransferFrom();", "@Test\r\n public void should_not_be_allowed_to_move_in_wrong_direction() {\r\n game.nextTurn(); // will throw [1,2] and thus black starts\r\n assertFalse(game.move(Location.R12, Location.R10));\r\n }", "public boolean getHasPort() {\n return this.hasPort;\n }", "public boolean getOpenPorts() {\n // Declare variables\n Socket sock;\n InetSocketAddress isa;\n\n // Check if port range is valid\n if(mEndPort-mStartPort < 0 ) {\n return false;\n }\n else if(iStack.size() == 0){\n return false;\n }\n\n // Declare a 2D int array of size of the range of ports\n mPortsStatus = new int[iStack.size()][2];\n\n // Print scanning a continue to print dots as long as the scanning continues\n // so the user knows the program hasn't locked.\n System.out.print(\"\\r\\nScanning\");\n\n for (int i = 0; i < mPortsStatus.length; i++) {\n if(i % 5 == 0) {\n System.out.print(\".\");\n }\n\n // If we can connect to the socket, it's open. Mark that element in the array as\n // true. If there's an exception, it's closed, so mark it false.\n try {\n isa = new InetSocketAddress(mIP, iStack.peek());\n sock = new Socket();\n sock.connect(isa, mTimeout);\n sock.close();\n mPortsStatus[i][0] = iStack.pop();\n mPortsStatus[i][1] = 1;\n } catch (Exception ex) {\n mPortsStatus[i][0] = iStack.pop();\n mPortsStatus[i][1] = 0;\n }\n }\n\n // Everything went okay, so return true.\n return true;\n }", "@java.lang.Override\n public boolean hasNetwork() {\n return stepInfoCase_ == 17;\n }", "public boolean isSetDirection() {\r\n return this.direction != null;\r\n }", "public boolean isSetDirection() {\r\n return this.direction != null;\r\n }", "public boolean isUnivSinkExistsSol2() {\n\t\t\tList<Integer> degrees = new ArrayList(this.indegreeCounts.values());\n\t\t\tfor (int degree : degrees) {\n\t\t\t\tif (degree == this.v - 1) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "List<Direction> getValidDirectionsForMovement();", "@Test\n public void respawnRobotX0Y0OnMoveDirectionNORTH(){\n checkRespawnOnOutOfBounds(0, 0, CardinalDirection.NORTH);\n }", "public boolean tunnelAvailable();", "public static boolean isLoclePortUsing(int port){\n\t\tboolean flag = true;\n\t\ttry {\n\t\t\tflag = isPortUsing(\"127.0.0.1\", port);\n\t\t} catch (Exception e) {\n\t\t}\n\t\treturn flag;\n\t}", "protected boolean canUseOtherDirection() {\n return false;\n }", "boolean known() {\n\t\t\treturn !varAddress && !varMask;\n\t\t}", "public IllegalConnectionCheck() {\n listener = new LinkedHashSet<CheckListener>();\n active = true;\n }", "@Test\n public void connectionNotFound() {\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(2, 3).setDistance(1).set(speedEnc, 10, 0);\n\n Path path = calcPath(0, 3, 0, 1);\n assertNotFound(path);\n }", "public boolean hasPort(Pt port) {\n return ports.contains(port);\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkProtocol() {\n\t\tboolean flag = oTest.checkProtocol();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn false;\r\n\t}", "public boolean hasRouteDest() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }", "public int getOutputPortOpenCount(int portNumber) { throw new RuntimeException(\"Stub!\"); }", "@Override\n\tpublic boolean isIsPort() {\n\t\treturn _scienceApp.isIsPort();\n\t}", "boolean hasForwardingParams();", "@java.lang.Override\n public boolean hasNetwork() {\n return stepInfoCase_ == 17;\n }", "@FXML\r\n public void checkComPorts(ActionEvent event) {\r\n SerialConnection.availablePorts();\r\n }", "@Override\n\tpublic void testEtherNet() {\n\t\tieWebDriver.checkEthernet();\n\t}", "private void processNeighbors() {\n for(int i = 0; i < this.nextAvailPort; i++) {\n if(this.ports[i] == null) { continue; }\n System.out.println(this.ports[i].getRemoteRouterDesc().simulatedIPAddress);\n }\n }", "@Override\n\tpublic boolean isInputPort() {\n\t\tif (getFlexoPort() != null) {\n\t\t\treturn getFlexoPort().isInPort();\n\t\t}\n\t\treturn false;\n\t}", "public boolean verifyFields()\n\t{\n\t\t// check name first\n\t\tif (!validateUserName(username.getText()))\n\t\t\treturn false;\n\n\t\t// check address if name is valid\n\t\tif (!validateIP(address.getText()))\n\t\t{\n\t\t\tsetWarning(\"invalid address\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// only check port if name and address are okay\n\t\ttry\n\t\t{\n\t\t\tInteger.parseInt(port.getText());\n\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\tsetWarning(\"invalid port number\");\n\t\t\treturn false;\n\t\t}\n\n\t\tstatus.setTextFill(GREEN);\n\t\tstatus.setText(\"attempting connection\");\n\n\t\treturn true;\n\t}", "private boolean isNothingBehind(Direction direction, Box box){\n //TODO wall detection not only boxes\n for(Box temp : boxes){\n switch (direction){\n case DOWN:\n if(temp.getDestinationX()==box.getDestinationX() && box.getDestinationY()+DISTANCE == temp.getDestinationY())\n return false;\n break;\n case UP:\n if(temp.getDestinationX()==box.getDestinationX() && box.getDestinationY()-DISTANCE == temp.getDestinationY())\n return false;\n break;\n case LEFT:\n if(temp.getDestinationY()==box.getDestinationY() && box.getDestinationX()-DISTANCE == temp.getDestinationX())\n return false;\n break;\n case RIGHT:\n if(temp.getDestinationY()==box.getDestinationY() && box.getDestinationX()+DISTANCE == temp.getDestinationX())\n return false;\n break;\n }\n }\n for(Wall temp : walls){\n switch (direction){\n case DOWN:\n if(temp.getDestinationX()==box.getDestinationX() && box.getDestinationY()+DISTANCE == temp.getDestinationY())\n return false;\n break;\n case UP:\n if(temp.getDestinationX()==box.getDestinationX() && box.getDestinationY()-DISTANCE == temp.getDestinationY())\n return false;\n break;\n case LEFT:\n if(temp.getDestinationY()==box.getDestinationY() && box.getDestinationX()-DISTANCE == temp.getDestinationX())\n return false;\n break;\n case RIGHT:\n if(temp.getDestinationY()==box.getDestinationY() && box.getDestinationX()+DISTANCE == temp.getDestinationX())\n return false;\n break;\n }\n }\n return true;\n }", "@Test\n public void portConfiguration() throws IOException {\n initJadlerListeningOn(SocketUtils.findAvailableTcpPort());\n \n try {\n onRequest().respond().withStatus(EXPECTED_STATUS);\n assertExpectedStatus();\n }\n finally {\n closeJadler();\n }\n }", "Integer destinationPort();", "public void invalidRoute() \n {\n validRoute = false;\n }", "private boolean checkDirection(PositionTracker tracker, int direction){\n\n\t boolean validFlag = false;\n\n\t switch(direction){//initiate switch statement, checking the value of direction\n\n\t //enter case 1 and invoke the checkMoveNext method\n\t case 1:\tvalidFlag = this.checkMoveNext(tracker);\n\t \t\t\tbreak;\n\n\t //enter case 2 and invoke the checkMovePrevious method\n\t case 2:\tvalidFlag = this.checkMovePrevious(tracker);\n\t \t\t\tbreak;\n\n\t \t}//end switch\n\n\t return validFlag;\n\t }", "@Test(groups = \"Integration\")\n public void testIsSshableWhenFalse() throws Exception {\n byte[] unreachableIp = new byte[] {123,123,123,123};\n SshMachineLocation unreachableHost = new SshMachineLocation(MutableMap.of(\"address\", InetAddress.getByAddress(\"unreachablename\", unreachableIp)));\n assertFalse(unreachableHost.isSshable());\n }", "private void checkFlipDirection()\n\t{\n\t\tif (currentFloor == 0) //Are we at the bottom?\n\t\t\tcurrentDirection = Direction.UP; //Then we must go up\n\t\tif (currentFloor == (ElevatorSystem.getNumberOfFloors() - 1)) //Are we at the top?\n\t\t\tcurrentDirection = Direction.DOWN; //Then we must go down\n\t}", "public boolean isSetINetPort() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INETPORT_ISSET_ID);\n }" ]
[ "0.66434973", "0.66434973", "0.6274854", "0.6024962", "0.59486467", "0.5922357", "0.5900893", "0.5855601", "0.58498836", "0.584559", "0.5838042", "0.5826669", "0.5721486", "0.57163537", "0.570952", "0.568237", "0.56669873", "0.56639475", "0.5638782", "0.563028", "0.55893886", "0.5534337", "0.5514087", "0.5505539", "0.54819036", "0.5472407", "0.5453822", "0.5453465", "0.5437244", "0.543415", "0.543415", "0.54231036", "0.54207057", "0.541441", "0.5395556", "0.5381036", "0.53803515", "0.5373256", "0.53711694", "0.53699774", "0.5368649", "0.5347525", "0.5336392", "0.53239936", "0.53127486", "0.5302341", "0.5292968", "0.5291765", "0.5270664", "0.52569926", "0.524821", "0.52372706", "0.5217887", "0.52170974", "0.51926416", "0.51912296", "0.51890945", "0.5178067", "0.51732904", "0.51708835", "0.515403", "0.51502097", "0.5150017", "0.5132788", "0.5130126", "0.5114354", "0.511325", "0.51130253", "0.5112431", "0.5109306", "0.5109306", "0.50916296", "0.50859636", "0.5083944", "0.50693053", "0.50598323", "0.5044392", "0.504259", "0.5042236", "0.5038692", "0.50274974", "0.5021253", "0.5019534", "0.5018951", "0.50156265", "0.50148636", "0.5010628", "0.50038385", "0.5003815", "0.4997737", "0.49974254", "0.4987716", "0.49794212", "0.49786896", "0.49759182", "0.49734932", "0.49722582", "0.49693584", "0.4965288", "0.49618137" ]
0.7084288
0
verify that port definitions match any existing net definitions
private static void checkPortsAndNets(Netlist netlist) throws UnsupportedGrammerException { for (Map.Entry<String, Port> entry : netlist.ports.entrySet()) { Port port = entry.getValue(); Net net = netlist.nets.get(port.id); if (net != null) { if (net.start != port.start || net.end != port.end) { String emsg = String.format(ERR_MSG_9, port.id, port.start, port.end, net.id, net.start, net.end); fail(emsg); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void checkPortDirections(Netlist netlist) throws UnsupportedGrammerException {\n\n\t\tfor (Map.Entry<String, Port> entry : netlist.ports.entrySet()) {\n\n\t\t\tif (entry.getValue().direction == PinDirection.UNKONWN) {\n\n\t\t\t\tString msg = String.format(ERR_MSG_3, entry.getValue().id);\n\n\t\t\t\tfail(msg);\n\n\t\t\t}\n\n\t\t}\n\t}", "boolean hasPort();", "boolean hasPort();", "@Test\n public void configuration() throws ConstructionException {\n Node node1 = new Node(Node.NodeIDType.OPENFLOW, 1L);\n Node node2 = new Node(Node.NodeIDType.OPENFLOW, 2L);\n Node node3 = new Node(Node.NodeIDType.OPENFLOW, 3L);\n NodeConnector nc1 = new NodeConnector(NodeConnector.NodeConnectorIDType.OPENFLOW, (short)1, node1);\n NodeConnector nc2 = new NodeConnector(NodeConnector.NodeConnectorIDType.OPENFLOW, (short)2, node2);\n NodeConnector nc3 = new NodeConnector(NodeConnector.NodeConnectorIDType.OPENFLOW, (short)3, node3);\n List<String> portList = new ArrayList<String>();\n portList.add(nc1.toString());\n portList.add(nc2.toString());\n portList.add(nc3.toString());\n\n // Full subnet creation\n SubnetConfig config = new SubnetConfig(\"eng\", \"11.1.1.254/16\", portList);\n Status status = config.validate();\n Assert.assertTrue(status.isSuccess());\n\n // No port set specified\n config = new SubnetConfig(\"eng\", \"11.1.1.254/16\", null);\n status = config.validate();\n Assert.assertTrue(status.isSuccess());\n\n // Empty port set\n config = new SubnetConfig(\"eng\", \"11.1.1.254/16\", new ArrayList<String>(0));\n status = config.validate();\n Assert.assertTrue(status.isSuccess());\n\n // Zero subnet\n config = new SubnetConfig(\"eng\", \"1.2.3.254/1\", null);\n status = config.validate();\n Assert.assertFalse(status.isSuccess());\n\n // Port set with invalid port notation\n List<String> badPortList = new ArrayList<String>();\n badPortList.add(\"1/1\");\n config = new SubnetConfig(\"eng\", \"1.2.3.254/1\", badPortList);\n status = config.validate();\n Assert.assertFalse(status.isSuccess());\n }", "private boolean checkInList(String ip, int port) {\r\n\t\tif(this.ip.equals(ip) & this.port == port)\r\n\t\t\treturn true;\r\n\t\t\r\n\t\tif(nodes.size()>0) {\r\n\t\t\tSystem.out.println(\"checking if node already exists...\");\r\n\t\t\t\r\n\t\t\tfor (Node node : this.nodes) {\r\n\t\t\t\treturn node.ip.equals(ip) && node.port == port;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean hasPort() {\n return !ports.isEmpty();\n }", "private boolean isPortInUse(String portId) {\n return false;\n }", "@Test\n public void portConfiguration() throws IOException {\n initJadlerListeningOn(SocketUtils.findAvailableTcpPort());\n \n try {\n onRequest().respond().withStatus(EXPECTED_STATUS);\n assertExpectedStatus();\n }\n finally {\n closeJadler();\n }\n }", "public void validatePort(String port) {\r\n\t\tthis.isPortValid = model.isValidPort(port);\r\n\r\n\t\tif (this.isPortValid) {\r\n\t\t\tview.port.setStyle(\"-fx-text-inner-color: green;\");\r\n\t\t\tcheckButtonUnlock();\r\n\t\t} else {\r\n\t\t\tview.port.setStyle(\"-fx-text-inner-color: red;\");\r\n\t\t\tlockButton();\r\n\t\t}\r\n\t}", "@Test\n public void shouldListNetworks() {\n assertFalse(NetworkResolver.getParameters().isEmpty());\n assertFalse(NetworkResolver.getNames().isEmpty());\n assertFalse(NetworkResolver.getCodes().isEmpty());\n }", "public void testConstructorWithValidPorts() {\n\t\tint[] validPorts = new int[2];\n\t\tvalidPorts[0] = 10000;\n\t\tvalidPorts[1] = 6000;\n\t\tfor(int i=0; i<validPorts.length; i++) {\n\t\t\ttry {\n\t\t\t\tRemoteFileDesc rfd = \n\t\t\t\t\tnew RemoteFileDesc(\"www.limewire.org\", validPorts[i], \n\t\t\t\t\t\t\t\t\t 10, \"test\",\n\t\t\t\t\t\t\t\t\t 10, TEST_GUID, 10, false, 3,\n\t\t\t\t\t\t\t\t\t false, null, null, false, false,\"\",\n 0, null, -1);\n\t\t\t} catch(IllegalArgumentException e) {\n\t\t\t\tfail(\"rfd1 should not have received an exception for valid port: \"+\n\t\t\t\t\t validPorts[i], e);\n\t\t\t}\n\t\t}\n\t}", "public boolean isValidPort(String port) {\n\t\tfor(char x : port.toCharArray()) {\n\t\t\tif(!Character.isDigit(x)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private static boolean portsMatch(ServicePort servicePort, IntOrString intOrString) {\n if (intOrString != null) {\n Integer port = servicePort.getPort();\n Integer intVal = intOrString.getIntVal();\n String strVal = intOrString.getStrVal();\n if (intVal != null) {\n if (port != null) {\n return port.intValue() == intVal.intValue();\n } else {\n /// should we find the port by name now?\n }\n } else if (strVal != null ){\n return Objects.equal(strVal, servicePort.getName());\n }\n }\n return false;\n }", "@Test\n public void testCheckAccess() throws Exception {\n PolyspaceAccessConfig.DescriptorImpl desc_access = new PolyspaceAccessConfig.DescriptorImpl();\n\n FormValidation port_access_ok = desc_access.doCheckPolyspaceAccessPort(\"1234\");\n assertEquals(FormValidation.Kind.OK, port_access_ok.kind);\n\n FormValidation port_access_ko = desc_access.doCheckPolyspaceAccessPort(\"wrong-port\");\n assertEquals(FormValidation.Kind.ERROR, port_access_ko.kind);\n assertEquals(com.mathworks.polyspace.jenkins.config.Messages.portMustBeANumber(), port_access_ko.renderHtml());\n \n FormValidation protocol_access_http = desc_access.doCheckPolyspaceAccessProtocol(\"http\");\n assertEquals(FormValidation.Kind.OK, protocol_access_http.kind);\n\n FormValidation protocol_access_https = desc_access.doCheckPolyspaceAccessProtocol(\"https\");\n assertEquals(FormValidation.Kind.OK, protocol_access_https.kind);\n\n FormValidation protocol_access_ko = desc_access.doCheckPolyspaceAccessProtocol(\"wrong_protocol\");\n assertEquals(FormValidation.Kind.ERROR, protocol_access_ko.kind);\n assertEquals(com.mathworks.polyspace.jenkins.config.Messages.wrongProtocol(), protocol_access_ko.renderHtml());\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkInfoPort() {\n\t\tboolean flag = oTest.checkInfoPort();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "public void validateDockerImage() throws DockerTestException, InterruptedException {\n List<String> ports = getExposedPorts(DOCKER_IMAGE);\n Assert.assertEquals(ports.size(), 1);\n Assert.assertEquals(ports.get(0), \"9099/tcp\");\n }", "public void testConstructorWithInvalidPorts() {\n\t\tint[] invalidPorts = new int[2];\n\t\tinvalidPorts[0] = -1;\n\t\tinvalidPorts[1] = 66000;\n\t\tfor(int i=0; i<invalidPorts.length; i++) {\n\t\t\ttry {\n\t\t\t\tRemoteFileDesc rfd = \n\t\t\t\t\tnew RemoteFileDesc(\"www.limewire.org\", invalidPorts[i], \n\t\t\t\t\t\t\t\t\t 10, \"test\",\n\t\t\t\t\t\t\t\t\t 10, TEST_GUID, 10, false, 3,\n\t\t\t\t\t\t\t\t\t false, null, null, false, false,\"\",\n 0, null, -1);\n\t\t\t\tfail(\"rfd1 should have received an exception for invalid port: \"+\n\t\t\t\t\t rfd.getPort());\n\t\t\t} catch(IllegalArgumentException e) {\n\t\t\t\t// this is expected\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testReplyExternalPortBadRequestIpv6() {\n replay(hostService); // no further host service expectations\n replay(interfaceService);\n\n Ip6Address theirIp = Ip6Address.valueOf(\"1000::ffff\");\n\n Ethernet ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION,\n MAC1,\n MacAddress.valueOf(\"33:33:ff:00:00:01\"),\n theirIp,\n Ip6Address.valueOf(\"3000::1\"));\n proxyArp.reply(ndpRequest, LOC1);\n assertEquals(0, packetService.packets.size());\n\n // Request for a valid internal IP address but coming in an external port\n packetService.packets.clear();\n ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION,\n MAC1,\n MacAddress.valueOf(\"33:33:ff:00:00:01\"),\n theirIp,\n IP3);\n proxyArp.reply(ndpRequest, LOC1);\n assertEquals(0, packetService.packets.size());\n }", "public boolean hasPort(String id) {\n for(Pt port : ports){\n if(port.getId().equals(id))\n return true;\n }\n return false;\n }", "public boolean isValidIP(String port) {\n\t\tfor(char x : port.toCharArray()) {\n\t\t\tif((!Character.isDigit(x)) && x != '.') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void testNoMoreEnabledPortCase3() throws Exception {\n Port port1 = new DefaultPort(dev1, p1, false);\n Port port2 = new DefaultPort(dev1, p2, true);\n Port port3 = new DefaultPort(dev1, p3, false);\n Port port4 = new DefaultPort(dev1, p4, true);\n Port port5 = new DefaultPort(dev1, p5, true);\n List<Port> ports = Lists.newArrayList(port1, port2, port3, port4, port5);\n\n expect(deviceService.getPorts(anyObject(DeviceId.class))).andReturn(ports).anyTimes();\n replay(deviceService);\n assertFalse(rrp.noMoreEnabledPort(devId1, v10));\n assertTrue(rrp.noMoreEnabledPort(devId1, v20));\n assertFalse(rrp.noMoreEnabledPort(devId1, vInt));\n }", "public void setNports(int n) {\n\t\tnports = n;\n\t}", "public void scannerPort(boolean grid[]){\r\n\t\tint dimension = grid.length;\r\n\t\tSystem.out.println(\"Porte da scansionare: \"+dimension);\r\n\t\tint portNumber = 0;\r\n\t\tfor(int i = 0;i < dimension;i++){\t\t\t\r\n\t\t\tportNumber = i + 1024;\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tDatagramSocket ds = new DatagramSocket(portNumber);\r\n\t\t\t\tds.close();\r\n\t\t\t\tgrid[i] = true;\r\n\t\t\t\tSystem.out.println(\"Porta \"+portNumber+\" libera\");\r\n\t\t\t}\r\n\t\t\tcatch(BindException bex){\r\n\t\t\t\tgrid[i] = false;\r\n\t\t\t\tSystem.out.println(\"Porta \"+portNumber+\" occupata\");\r\n\t\t\t}\r\n\t\t\tcatch(SocketException soex){\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setPortRange(String input) throws BadConfigException {\n Set<Integer> inputPorts= new TreeSet<Integer>();\n String[] ranges = input.split(\",\");\n for ( String range : ranges ) {\n if (range.trim().isEmpty()) {\n continue;\n }\n Matcher m = SINGLE_NUMBER.matcher(range.trim());\n if (m.find()) {\n inputPorts.add(Integer.parseInt(m.group()));\n continue;\n }\n m = NUMBER_RANGE.matcher(range.trim());\n if (m.find()) {\n String[] boundaryValues = m.group(0).split(\"-\");\n int start = Integer.parseInt(boundaryValues[0].trim());\n int end = Integer.parseInt(boundaryValues[1].trim());\n if (end < start) {\n throw new BadConfigException(\"End of port range is before start: \"\n + range + \" in input: \" + input);\n }\n for (int i = start; i < end + 1; i++) {\n inputPorts.add(i);\n }\n continue;\n }\n throw new BadConfigException(\"Bad port range: \" + range + \" in input: \"\n + input);\n }\n if (inputPorts.size() == 0) {\n throw new BadConfigException(\"No ports found in range: \" + input);\n }\n this.remainingPortsToCheck = new ArrayList<Integer>(inputPorts);\n }", "public boolean hasPort() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "private Map<String, Integer> reassignPorts() throws TransactionFailure {\n\n Map<String, Integer> portProps = newServerPorts.getMap();\n Map<String, Integer> changedPortProps = new HashMap<String, Integer>();\n Set<Map.Entry<String, Integer>> entries = portProps.entrySet();\n\n for (Map.Entry<String, Integer> entry : entries) {\n String name = entry.getKey();\n Integer num = entry.getValue();\n Integer newNum = reassignPort(num);\n\n if (!newNum.equals(num))\n changedPortProps.put(name, newNum);\n }\n return changedPortProps;\n }", "public Network() {\n\t\tnodes.put(\"192.168.0.0\", new NetNode(\"192.168.0.0\"));\n\t\tnodes.put(\"192.168.0.1\", new NetNode(\"192.168.0.1\"));\n\t\tnodes.put(\"192.168.0.2\", new NetNode(\"192.168.0.2\"));\n\t\tnodes.put(\"192.168.0.3\", new NetNode(\"192.168.0.3\"));\n\t\tnodes.put(\"192.168.0.4\", new NetNode(\"192.168.0.4\"));\n\t\t//manually entering ports\n\t\t//0 to 1 and 2\n\t\tnodes.get(\"192.168.0.0\").addPort(nodes.get(\"192.168.0.1\"));\n\t\tnodes.get(\"192.168.0.0\").addPort(nodes.get(\"192.168.0.2\"));\n\t\t//1 to 0 and 3\n\t\tnodes.get(\"192.168.0.1\").addPort(nodes.get(\"192.168.0.0\"));\n\t\tnodes.get(\"192.168.0.1\").addPort(nodes.get(\"192.168.0.3\"));\n\t\t//2 to 0 and 3 and 4\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.0\"));\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.3\"));\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.4\"));\n\t\t//3 to 1 and 2 and 4\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.1\"));\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.2\"));\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.4\"));\n\t\t//4 to 2 and 3\n\t\tnodes.get(\"192.168.0.4\").addPort(nodes.get(\"192.168.0.2\"));\n\t\tnodes.get(\"192.168.0.4\").addPort(nodes.get(\"192.168.0.3\"));\n\t}", "public boolean hasPort() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasPort(Pt port) {\n return ports.contains(port);\n }", "static void test2 () throws Exception {\n\n server = new ServerSocket ();\n InetSocketAddress sadr = new InetSocketAddress (ia4addr, 0);\n server.bind (sadr);\n dprintln (\"server bound to \" + sadr);\n int port = server.getLocalPort();\n InetSocketAddress sadr6 = new InetSocketAddress (ia6addr, port);\n\n c1 = new Socket (ia4addr, port);\n try {\n dprintln (\"connecting to \" + ia6addr);\n c2 = new Socket ();\n c2.connect (sadr6, 1000);\n throw new RuntimeException (\"connect to IPv6 address should be refused\");\n } catch (IOException e) { }\n server.close ();\n c1.close ();\n\n /* now try IPv6 only */\n\n server = new ServerSocket ();\n sadr = new InetSocketAddress (ia6addr, 0);\n dprintln (\"binding to \" + sadr);\n server.bind (sadr);\n port = server.getLocalPort();\n\n c1 = new Socket (ia6addr, port);\n try {\n c2 = new Socket (ia4addr, port);\n throw new RuntimeException (\"connect to IPv4 address should be refused\");\n } catch (IOException e) { }\n server.close ();\n c1.close ();\n\n /* now try IPv6 specific port only */\n\n server = new ServerSocket ();\n sadr = new InetSocketAddress (ia6addr, 5200);\n server.bind (sadr);\n port = server.getLocalPort();\n t_assert (port == 5200);\n\n c1 = new Socket (ia6addr, port);\n try {\n c2 = new Socket (ia4addr, port);\n throw new RuntimeException (\"connect to IPv4 address should be refused\");\n } catch (IOException e) { }\n server.close ();\n c1.close ();\n\n /* now try IPv4 specific port only */\n\n server = new ServerSocket ();\n sadr = new InetSocketAddress (ia4addr, 5200);\n server.bind (sadr);\n port = server.getLocalPort();\n t_assert (port == 5200);\n\n c1 = new Socket (ia4addr, port);\n\n try {\n c2 = new Socket (ia6addr, port);\n throw new RuntimeException (\"connect to IPv6 address should be refused\");\n } catch (IOException e) { }\n server.accept().close();\n c1.close ();\n server.close();\n System.out.println (\"Test2: OK\");\n }", "public boolean hasPort() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasPort() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "@Test\n public void testReplyExternalPortBadRequest() {\n replay(hostService); // no further host service expectations\n replay(interfaceService);\n\n Ip4Address theirIp = Ip4Address.valueOf(\"10.0.1.254\");\n\n // Request for a valid external IP address but coming in the wrong port\n Ethernet arpRequest = buildArp(ARP.OP_REQUEST, VLAN1, MAC1, null, theirIp,\n Ip4Address.valueOf(\"10.0.3.1\"));\n proxyArp.reply(arpRequest, LOC1);\n assertEquals(0, packetService.packets.size());\n\n // Request for a valid internal IP address but coming in an external port\n packetService.packets.clear();\n arpRequest = buildArp(ARP.OP_REQUEST, VLAN1, MAC1, null, theirIp, IP1);\n proxyArp.reply(arpRequest, LOC1);\n assertEquals(0, packetService.packets.size());\n }", "@Test\n public void testNoMoreEnabledPortCase1() throws Exception {\n Port port1 = new DefaultPort(dev1, p1, true);\n Port port2 = new DefaultPort(dev1, p2, true);\n Port port3 = new DefaultPort(dev1, p3, true);\n Port port4 = new DefaultPort(dev1, p4, true);\n Port port5 = new DefaultPort(dev1, p5, true);\n List<Port> ports = Lists.newArrayList(port1, port2, port3, port4, port5);\n\n expect(deviceService.getPorts(anyObject(DeviceId.class))).andReturn(ports).anyTimes();\n replay(deviceService);\n assertFalse(rrp.noMoreEnabledPort(devId1, v10));\n assertFalse(rrp.noMoreEnabledPort(devId1, v20));\n assertFalse(rrp.noMoreEnabledPort(devId1, vInt));\n }", "public void validate(FailureCollector collector) {\n if (!containsMacro(PORT) && port != null && port < 0) {\n collector.addFailure(\"Port must be a positive number.\", null).withConfigProperty(PORT);\n }\n }", "public boolean getOpenPorts() {\n // Declare variables\n Socket sock;\n InetSocketAddress isa;\n\n // Check if port range is valid\n if(mEndPort-mStartPort < 0 ) {\n return false;\n }\n else if(iStack.size() == 0){\n return false;\n }\n\n // Declare a 2D int array of size of the range of ports\n mPortsStatus = new int[iStack.size()][2];\n\n // Print scanning a continue to print dots as long as the scanning continues\n // so the user knows the program hasn't locked.\n System.out.print(\"\\r\\nScanning\");\n\n for (int i = 0; i < mPortsStatus.length; i++) {\n if(i % 5 == 0) {\n System.out.print(\".\");\n }\n\n // If we can connect to the socket, it's open. Mark that element in the array as\n // true. If there's an exception, it's closed, so mark it false.\n try {\n isa = new InetSocketAddress(mIP, iStack.peek());\n sock = new Socket();\n sock.connect(isa, mTimeout);\n sock.close();\n mPortsStatus[i][0] = iStack.pop();\n mPortsStatus[i][1] = 1;\n } catch (Exception ex) {\n mPortsStatus[i][0] = iStack.pop();\n mPortsStatus[i][1] = 0;\n }\n }\n\n // Everything went okay, so return true.\n return true;\n }", "public Bounds bounds(String ipAddrsFile, String subnetsFile) throws IOException {\n\t\tfinal Map<String,NetNode> nodes = parseAddresses(ipAddrsFile);\n\t\tfinal Map<NetNode,Subnet> subnets = parseSubnets(subnetsFile, nodes);\n\n\t\tfinal Universe universe = universe(nodes.keySet());\n\t\tfinal Bounds bounds = new Bounds(universe);\n\t\tfinal TupleFactory factory = universe.factory();\n\n\t\t// bind the integers\n\t\tfor (int i = 0; i < 32; i++) {\n\t\t\tbounds.boundExactly(1 << i, factory.setOf(Integer.valueOf(1 << i)));\n\t\t}\n\n\t\t// bind the port relation exactly to the port names\n\t\tbounds.boundExactly(port, factory.range(factory.tuple(universe.atom(0)),\n\t\t\t\tfactory.tuple(universe.atom(nodes.keySet().size() - 1))));\n\n\t\t// bind the unknown relation exactly to the port names of ports with\n\t\t// unknown addresses or masks\n\t\tfinal TupleSet unknownBound = factory.noneOf(1);\n\t\tfor (NetNode n : nodes.values()) {\n\t\t\tif (!n.known()) {\n\t\t\t\tunknownBound.add(factory.tuple(n.port));\n\t\t\t}\n\t\t}\n\t\tbounds.boundExactly(unknown, unknownBound);\n\n\t\t// bind the subnet relation exactly, choosing the first element of each\n\t\t// subnet as the representative\n\t\tfinal TupleSet subnetBound = factory.noneOf(2);\n\t\tfor (Map.Entry<NetNode,Subnet> entry : subnets.entrySet()) {\n\t\t\tfinal NetNode rep = entry.getKey();\n\t\t\tfor (NetNode member : entry.getValue().members) {\n\t\t\t\tsubnetBound.add(factory.tuple(rep.port, member.port));\n\t\t\t}\n\t\t}\n\t\tbounds.boundExactly(subnet, subnetBound);\n\n\t\t// bind the addr relation so that each address is guaranteed to be\n\t\t// between minAddr (121.96.0.0) and maxAddr (121.96.255.255), inclusive\n\t\tfinal TupleSet lAddr = factory.noneOf(2), uAddr = factory.noneOf(2);\n\t\tfor (NetNode node : nodes.values()) {\n\t\t\tif (node.varAddress) { // unknown address\n\t\t\t\tlAddr.addAll(portToBits(factory, node.port, minAddr));\n\t\t\t\tuAddr.addAll(portToBits(factory, node.port, maxAddr));\n\t\t\t} else { // known address\n\t\t\t\tfinal TupleSet portToAddrBits = portToBits(factory, node.port, node.address);\n\t\t\t\tlAddr.addAll(portToAddrBits);\n\t\t\t\tuAddr.addAll(portToAddrBits);\n\t\t\t}\n\t\t}\n\t\tbounds.bound(addr, lAddr, uAddr);\n\n\t\t// bind the group and groupMask relations so that all ports with the\n\t\t// same interface on the same subnet are guaranteed to have the same\n\t\t// mask\n\t\tfinal TupleSet lMask = factory.noneOf(2), uMask = factory.noneOf(2), groupBound = factory.noneOf(2);\n\t\tfor (Subnet sub : subnets.values()) {\n\t\t\tfor (Map.Entry<NetNode,Set<NetNode>> entry : sub.groups.entrySet()) {\n\t\t\t\tfinal NetNode rep = entry.getKey();\n\t\t\t\tfor (NetNode member : entry.getValue()) {\n\t\t\t\t\tgroupBound.add(factory.tuple(member.port, rep.port));\n\t\t\t\t\tnodes.remove(member.port); // remove a grouped member out of\n\t\t\t\t\t\t\t\t\t\t\t\t// the addresses set\n\t\t\t\t}\n\t\t\t\tif (rep.varMask) { // unknown mask for the representative\n\t\t\t\t\tuMask.addAll(portToBits(factory, rep.port, 31));\n\t\t\t\t} else { // known mask for the representative\n\t\t\t\t\tfinal TupleSet portToMaskBits = portToBits(factory, rep.port, rep.mask);\n\t\t\t\t\tlMask.addAll(portToMaskBits);\n\t\t\t\t\tuMask.addAll(portToMaskBits);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// bind the group and groupMask relations for ports that are not a part\n\t\t// of any subnet\n\t\tfor (NetNode ungrouped : nodes.values()) {\n\t\t\tgroupBound.add(factory.tuple(ungrouped.port, ungrouped.port));\n\t\t\tif (ungrouped.varMask) { // unknown mask for the representative\n\t\t\t\tuMask.addAll(portToBits(factory, ungrouped.port, 31));\n\t\t\t} else { // known mask for the representative\n\t\t\t\tfinal TupleSet portToMaskBits = portToBits(factory, ungrouped.port, ungrouped.mask);\n\t\t\t\tlMask.addAll(portToMaskBits);\n\t\t\t\tuMask.addAll(portToMaskBits);\n\t\t\t}\n\t\t}\n\n\t\tbounds.bound(groupMask, lMask, uMask);\n\t\tbounds.boundExactly(group, groupBound);\n\n\t\t// System.out.println(\"groupMask.size: \" + uMask.size() + \", group.size:\n\t\t// \" + groupBound.size());\n\t\t// System.out.println(\"ports.size: \" + bounds.upperBound(port).size() +\n\t\t// \", unknown.size: \" + unknownBound.size());\n\t\treturn bounds;\n\n\t}", "PortDefinition createPortDefinition();", "public static boolean isLoclePortUsing(int port){\n\t\tboolean flag = true;\n\t\ttry {\n\t\t\tflag = isPortUsing(\"127.0.0.1\", port);\n\t\t} catch (Exception e) {\n\t\t}\n\t\treturn flag;\n\t}", "public static boolean isValidPort(int a_port)\n\t{\n\t\tif ( (a_port < PORT_MIN_VALUE) || (a_port > PORT_MAX_VALUE))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void testGetFlowEntries() {\n Collection<FlowEntry> flowEntries = frProgramable.getFlowEntries();\n\n assertNotNull(flowEntries);\n //There will be 12 flow entries\n // 2 for IP Src Address filtering\n // 2 for EVC 7 - one each port\n // 8 for EVC 8 - one for host port, 7 on optics port because of ceVlanMap 12:14,20:22,25\n assertEquals(12, flowEntries.size());\n\n //Test the first Flow Entry\n Iterator<FlowEntry> feIter = flowEntries.iterator();\n while (feIter.hasNext()) {\n FlowEntry fe = feIter.next();\n assertTrue(fe.isPermanent());\n assertEquals(EA1000FlowRuleProgrammable.PRIORITY_DEFAULT, fe.priority());\n\n Set<Criterion> criteria = fe.selector().criteria();\n IPCriterion ipCr = null;\n PortNumber port = null;\n for (Criterion cr:criteria.toArray(new Criterion[criteria.size()])) {\n if (cr.type() == Criterion.Type.IPV4_SRC) {\n ipCr = (IPCriterion) cr;\n } else if (cr.type() == Criterion.Type.IN_PORT) {\n port = ((PortCriterion) cr).port();\n } else if (cr.type() == Criterion.Type.VLAN_VID) {\n VlanId vid = ((VlanIdCriterion) cr).vlanId();\n } else {\n fail(\"Unexpected Criterion type: \" + cr.type().toString());\n }\n }\n if (ipCr != null && (port == null || port.toLong() != 0L)) {\n fail(\"Port number not equal 0 when IP Src Address filter is present\");\n }\n\n List<Instruction> instructions = fe.treatment().allInstructions();\n\n if (fe.tableId() == 1) {\n //Note that in MockNetconf session 10.10.10.10/16 was entered\n //but it has been corrected to the following by the OF implementation\n assertEquals(\"10.10.0.0/16\", ipCr.ip().toString());\n assertEquals(FlowEntryState.ADDED, fe.state());\n } else if (fe.tableId() == 2) {\n //Likewise 20.30.40.50 has been truncated because of the 18 bit mask\n assertEquals(\"20.30.0.0/18\", ipCr.ip().toString());\n assertEquals(FlowEntryState.ADDED, fe.state());\n } else if (fe.tableId() == 7 || fe.tableId() == 8) {\n // 7 and 8 are EVC entries - 2 elements - IN_PORT and VLAN_ID\n assertEquals(2, fe.selector().criteria().size());\n //In MockNetconfSession we're rigged it so that the last two chars of the\n //flow id is the same as the VlanId\n short vlanId = ((VlanIdCriterion) fe.selector().getCriterion(Type.VLAN_VID)).vlanId().toShort();\n long flowId = fe.id().id();\n String flowIdStr = String.valueOf(flowId).substring(String.valueOf(flowId).length() - 2);\n assertEquals(flowIdStr, String.valueOf(vlanId));\n if (((PortCriterion) fe.selector().getCriterion(Type.IN_PORT)).port().toLong() == 1L) {\n assertEquals(Instruction.Type.L2MODIFICATION, instructions.get(0).type());\n }\n } else {\n fail(\"Unexpected Flow Entry Rule \" + fe.tableId());\n }\n }\n }", "private void validatePort(String port) throws PSValidationException {\n PSValidationErrorsBuilder builder = validateParameters(\"validatePort\").rejectIfNull(\"PORT_FIELD\", port)\n .throwIfInvalid();\n\n // Validate characters\n Pattern pattern = Pattern.compile(\"[\\\\d]+\");\n Matcher matcher = pattern.matcher(port);\n if (!matcher.matches())\n {\n builder.rejectField(PORT_FIELD, PORT_VALUE_IS_INVALID, PORT_FIELD);\n builder.throwIfInvalid();\n }\n }", "public boolean hasPort() {\n return fieldSetFlags()[6];\n }", "public static void check() {\r\n NetworkCode nCodes = new NetworkCode();\r\n Map<Short, String> nCodeMap = new HashMap<Short, String>();\r\n\r\n for (Field field : NetworkCode.class.getDeclaredFields()) {\r\n try {\r\n Short value = (Short) field.get(nCodes);\r\n\r\n if (nCodeMap.containsKey(value)) {\r\n Log.println_e(field.getName() + \" is conflicting with \" + nCodeMap.get(value));\r\n } else {\r\n nCodeMap.put(value, field.getName());\r\n }\r\n } catch (IllegalArgumentException ex) {\r\n Log.println_e(ex.getMessage());\r\n } catch (IllegalAccessException ex) {\r\n Log.println_e(ex.getMessage());\r\n }\r\n }\r\n }", "@Test\n public void testCheckMetrics() throws Exception {\n PolyspaceMetricsConfig.DescriptorImpl desc_metrics = new PolyspaceMetricsConfig.DescriptorImpl();\n\n FormValidation port_metrics_ok = desc_metrics.doCheckPolyspaceMetricsPort(\"1234\");\n assertEquals(FormValidation.Kind.OK, port_metrics_ok.kind);\n\n FormValidation port_metrics_ko = desc_metrics.doCheckPolyspaceMetricsPort(\"wrong-port\");\n assertEquals(FormValidation.Kind.ERROR, port_metrics_ko.kind);\n assertEquals(com.mathworks.polyspace.jenkins.config.Messages.portMustBeANumber(), port_metrics_ko.renderHtml());\n }", "@Test(expected = ConfigException.class)\n public void testConfigParsingInvalidPortValue() {\n PowerMock.replayAll();\n Map<String, String> sampleConfig = new HashMap<>();\n sampleConfig.put(XENON_NAME, \"xenon-sink-connector\");\n sampleConfig.put(XENON_HOST, \"f3\");\n //port value is invalid as value is to be at least 1024.\n sampleConfig.put(XENON_PORT, \"1022\");\n sampleConfig.put(XENON_BUFFER_CAPACITY, \"164\");\n sampleConfig.put(SCHEMA_VERSION, \"1\");\n sampleConfig.put(TOPICS, \"topicA,topicB\");\n sampleConfig.put(XENON_DATASET_NAME, \"temp\");\n sampleConfig.put(XENON_DATASET_SCHEMA, \"{Date:CHAR, Type:CHAR, SymbolID:CHAR, \"\n + \"SequenceID:CHAR, BuySell:CHAR, Volume:CHAR, Symbol:CHAR, \"\n + \"Durationms:CHAR, Attribute:CHAR}\");\n Map<String, Object> checkConfig = connector.config().parse(sampleConfig);\n PowerMock.verifyAll();\n }", "public boolean isValid()\n\t{\n\t\treturn isValidPort(getPort()) && isValidHostname(getHost()) && m_bUseInterface &&\n\t\t\t(m_endOfBlocking < System.currentTimeMillis());\n\t}", "public void testGetPort() {\n }", "public boolean isNetworkValid()\n\t{\n\t\t// TODO will need to implement this..\n\t\treturn true;\n\t}", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkProtocol() {\n\t\tboolean flag = oTest.checkProtocol();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn false;\r\n\t}", "private boolean checkHostAddressesFieldsChanged() {\n boolean changed = false;\n for (final Host host : getBrowser().getClusterHosts()) {\n final GuiComboBox cb = addressComboBoxHash.get(host);\n if (cb == null) {\n continue;\n }\n final String haSaved = savedHostAddresses.get(host);\n final Object value = cb.getValue();\n if (!Tools.areEqual(haSaved, value)) {\n changed = true;\n }\n cb.setBackground(null, haSaved, false);\n }\n /* port */\n final GuiComboBox pcb = portComboBox;\n if (pcb != null) {\n if (!Tools.areEqual(savedPort, pcb.getValue())) {\n changed = true;\n }\n pcb.setBackground(null,\n savedPort,\n false);\n }\n return changed;\n }", "public boolean verifyFields()\n\t{\n\t\t// check name first\n\t\tif (!validateUserName(username.getText()))\n\t\t\treturn false;\n\n\t\t// check address if name is valid\n\t\tif (!validateIP(address.getText()))\n\t\t{\n\t\t\tsetWarning(\"invalid address\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// only check port if name and address are okay\n\t\ttry\n\t\t{\n\t\t\tInteger.parseInt(port.getText());\n\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\tsetWarning(\"invalid port number\");\n\t\t\treturn false;\n\t\t}\n\n\t\tstatus.setTextFill(GREEN);\n\t\tstatus.setText(\"attempting connection\");\n\n\t\treturn true;\n\t}", "private void validate() throws DomainXmlPreParserException {\n if (serverConfigRef == null)\n throw new DomainXmlPreParserException(\n Strings.get(\"dxpp.serverNotFound\", instanceName));\n // 2. config-ref of server matches config-ref of cluster\n if (!serverConfigRef.equals(cluster.configRef))\n throw new DomainXmlPreParserException(\n Strings.get(\"dxpp.configrefnotmatch\", instanceName, cluster.name));\n\n if(!configNames.contains(serverConfigRef))\n throw new DomainXmlPreParserException(\n Strings.get(\"dxpp.confignotfound\", instanceName, serverConfigRef));\n\n\n\n valid = true;\n }", "private void initPortSettings() {\n\n\t\tList<PortSpecification> portSpecification = XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getPort().getPortSpecification();\n\n\t\tportDetails = new ArrayList<PortDetails>();\n\t\tports = new HashMap<String, Port>();\n\t\tPortTypeEnum pEnum = null;\n\t\tPortAlignmentEnum pAlignEnum = null;\n\n\t\tfor (PortSpecification p : portSpecification) {\n\t\t\tpAlignEnum = PortAlignmentEnum.fromValue(p.getPortAlignment().value());\n\t\t\tsetPortCount(pAlignEnum, p.getNumberOfPorts(), p.isChangePortCountDynamically());\n\t\t\tfor(PortInfo portInfo :p.getPort()){\n\t\t\t\tString portTerminal = portInfo.getPortTerminal();\n\t\t\t\tpEnum = PortTypeEnum.fromValue(portInfo.getTypeOfPort().value());\n\t\t\t\t\n\t\t\t\tPort port = new Port(portInfo.getLabelOfPort(),\n\t\t\t\t\t\tportTerminal, this, getNumberOfPortsForAlignment(pAlignEnum), pEnum\n\t\t\t\t\t\t\t\t, portInfo.getSequenceOfPort(), p.isAllowMultipleLinks(), p.isLinkMandatory(), pAlignEnum);\n\t\t\t\tlogger.trace(\"Adding portTerminal {}\", portTerminal);\n\t\t\t\t\n\t\t\t\tports.put(portTerminal, port);\n\t\t\t}\n\t\t\tPortDetails pd = new PortDetails(ports, pAlignEnum, p.getNumberOfPorts(), p.isChangePortCountDynamically(), p.isAllowMultipleLinks(), p.isLinkMandatory());\n\t\t\tportDetails.add(pd);\n\t\t}\n\t\t\n\t}", "public boolean validPort(int port) {\n if (port >= 0 && port <= 65535) {\n return true;\n } else return false;\n }", "@Test\n public void testNoMoreEnabledPortCase5() throws Exception {\n Port port1 = new DefaultPort(dev1, p1, false);\n Port port2 = new DefaultPort(dev1, p2, false);\n Port port3 = new DefaultPort(dev1, p3, false);\n Port port4 = new DefaultPort(dev1, p4, false);\n Port port5 = new DefaultPort(dev1, p5, true);\n List<Port> ports = Lists.newArrayList(port1, port2, port3, port4, port5);\n\n expect(deviceService.getPorts(anyObject(DeviceId.class))).andReturn(ports).anyTimes();\n replay(deviceService);\n assertTrue(rrp.noMoreEnabledPort(devId1, v10));\n assertTrue(rrp.noMoreEnabledPort(devId1, v20));\n assertFalse(rrp.noMoreEnabledPort(devId1, vInt));\n }", "static void test1 (int port) throws Exception {\n server = new ServerSocket (port);\n if (port == 0) {\n port = server.getLocalPort();\n }\n // try Ipv6 only\n c1 = new Socket (\"::1\", port);\n s1 = server.accept ();\n simpleDataExchange (c1, s1);\n s1.close ();\n c1.close();\n // try with both IPv4 and Ipv6\n c1 = new Socket (\"127.0.0.1\", port);\n c2 = new Socket (\"::1\", port);\n s1 = server.accept();\n s2 = server.accept();\n s1peer = s1.getInetAddress();\n s2peer = s2.getInetAddress();\n if (s1peer instanceof Inet6Address) {\n t_assert ((s2peer instanceof Inet4Address));\n simpleDataExchange (c2, s1);\n simpleDataExchange (c1, s2);\n } else {\n t_assert ((s2peer instanceof Inet6Address));\n simpleDataExchange (c1, s1);\n simpleDataExchange (c2, s2);\n }\n c1.close();\n c2.close();\n s1.close();\n s2.close();\n server.close ();\n System.out.println (\"Test1: OK\");\n }", "@Test\n public void pollFailures() {\n addServerRule(SERVERS.PORT_0, new TestRule().always().drop());\n addServerRule(SERVERS.PORT_1, new TestRule().always().drop());\n addServerRule(SERVERS.PORT_2, new TestRule().always().drop());\n\n Set<String> expectedResult = new HashSet<>();\n expectedResult.add(getEndpoint(SERVERS.PORT_0));\n expectedResult.add(getEndpoint(SERVERS.PORT_1));\n expectedResult.add(getEndpoint(SERVERS.PORT_2));\n\n assertThat(failureDetector.poll(layout, corfuRuntime).getChangedNodes())\n .isEqualTo(expectedResult);\n\n /*\n * Restarting the server SERVERS.PORT_0. Pings should work normally now.\n * This is also to demonstrate that we no longer receive the failed\n * nodes' status in the result map for SERVERS.PORT_0.\n */\n\n clearServerRules(SERVERS.PORT_0);\n // Has only SERVERS.PORT_1 & SERVERS.PORT_2\n expectedResult.remove(getEndpoint(SERVERS.PORT_0));\n\n assertThat(failureDetector.poll(layout, corfuRuntime).getChangedNodes())\n .isEqualTo(expectedResult);\n\n }", "public void addPorts(){\n\t\t\n\t}", "public static int getFreeAvaliablePort(List<GroupServer> groups) {\n int port = AvailablePortFinder.getNextAvailable(); //1\n boolean find = true;\n while (find) {\n find = false;\n Iterator<GroupServer> iterator = groups.iterator();\n while (iterator.hasNext() && !find) {\n GroupServer g = iterator.next();\n if (g.getPort() == port) {\n find = true;\n }\n }\n if (find) {\n port = AvailablePortFinder.getNextAvailable(port);//2\n }\n }\n return port;\n }", "@Test\n void bindToPort()\n {\n objectUnderTest\n .bind(ProxyAdapter.class).to(SimpleApplicationService.class)\n\n .start();\n\n //Assert\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class)\n .getPortList()\n .stream()\n .filter( element -> SimpleApplicationService.class.equals(element.getClass()) )\n .findFirst();\n\n assertTrue(result.isPresent());\n }", "@Test\n public void testNoMoreEnabledPortCase4() throws Exception {\n Port port1 = new DefaultPort(dev1, p1, false);\n Port port2 = new DefaultPort(dev1, p2, false);\n Port port3 = new DefaultPort(dev1, p3, false);\n Port port4 = new DefaultPort(dev1, p4, true);\n Port port5 = new DefaultPort(dev1, p5, true);\n List<Port> ports = Lists.newArrayList(port1, port2, port3, port4, port5);\n\n expect(deviceService.getPorts(anyObject(DeviceId.class))).andReturn(ports).anyTimes();\n replay(deviceService);\n assertTrue(rrp.noMoreEnabledPort(devId1, v10));\n assertTrue(rrp.noMoreEnabledPort(devId1, v20));\n assertFalse(rrp.noMoreEnabledPort(devId1, vInt));\n }", "public boolean validateStorageProviderConnection(String ipAddress, Integer portNumber, String interfaceType);", "private void installRule(PacketContext context, PortNumber portNumber) {\n //\n // We don't support (yet) buffer IDs in the Flow Service so\n // packet out first.\n //\n Ethernet inPkt = context.inPacket().parsed();\n TrafficSelector.Builder selectorBuilder = DefaultTrafficSelector.builder();\n\n // If PacketOutOnly or ARP packet than forward directly to output port\n if (packetOutOnly || inPkt.getEtherType() == Ethernet.TYPE_ARP) {\n packetOut(context, portNumber);\n return;\n }\n\n //\n // If matchDstMacOnly\n // Create flows matching dstMac only\n // Else\n // Create flows with default matching and include configured fields\n //\n if (matchDstMacOnly) {\n selectorBuilder.matchEthDst(inPkt.getDestinationMAC());\n } else {\n selectorBuilder.matchInPort(context.inPacket().receivedFrom().port())\n .matchEthSrc(inPkt.getSourceMAC())\n .matchEthDst(inPkt.getDestinationMAC());\n\n // If configured Match Vlan ID\n if (matchVlanId && inPkt.getVlanID() != Ethernet.VLAN_UNTAGGED) {\n selectorBuilder.matchVlanId(VlanId.vlanId(inPkt.getVlanID()));\n }\n\n //\n // If configured and EtherType is IPv4 - Match IPv4 and\n // TCP/UDP/ICMP fields\n //\n if (matchIpv4Address && inPkt.getEtherType() == Ethernet.TYPE_IPV4) {\n IPv4 ipv4Packet = (IPv4) inPkt.getPayload();\n byte ipv4Protocol = ipv4Packet.getProtocol();\n Ip4Prefix matchIp4SrcPrefix =\n Ip4Prefix.valueOf(ipv4Packet.getSourceAddress(),\n Ip4Prefix.MAX_MASK_LENGTH);\n Ip4Prefix matchIp4DstPrefix =\n Ip4Prefix.valueOf(ipv4Packet.getDestinationAddress(),\n Ip4Prefix.MAX_MASK_LENGTH);\n selectorBuilder.matchEthType(Ethernet.TYPE_IPV4)\n .matchIPSrc(matchIp4SrcPrefix)\n .matchIPDst(matchIp4DstPrefix);\n\n if (matchIpv4Dscp) {\n byte dscp = ipv4Packet.getDscp();\n byte ecn = ipv4Packet.getEcn();\n selectorBuilder.matchIPDscp(dscp).matchIPEcn(ecn);\n }\n\n if (matchTcpUdpPorts && ipv4Protocol == IPv4.PROTOCOL_TCP) {\n TCP tcpPacket = (TCP) ipv4Packet.getPayload();\n selectorBuilder.matchIPProtocol(ipv4Protocol)\n .matchTcpSrc(TpPort.tpPort(tcpPacket.getSourcePort()))\n .matchTcpDst(TpPort.tpPort(tcpPacket.getDestinationPort()));\n }\n if (matchTcpUdpPorts && ipv4Protocol == IPv4.PROTOCOL_UDP) {\n UDP udpPacket = (UDP) ipv4Packet.getPayload();\n selectorBuilder.matchIPProtocol(ipv4Protocol)\n .matchUdpSrc(TpPort.tpPort(udpPacket.getSourcePort()))\n .matchUdpDst(TpPort.tpPort(udpPacket.getDestinationPort()));\n }\n if (matchIcmpFields && ipv4Protocol == IPv4.PROTOCOL_ICMP) {\n ICMP icmpPacket = (ICMP) ipv4Packet.getPayload();\n selectorBuilder.matchIPProtocol(ipv4Protocol)\n .matchIcmpType(icmpPacket.getIcmpType())\n .matchIcmpCode(icmpPacket.getIcmpCode());\n }\n }\n\n //\n // If configured and EtherType is IPv6 - Match IPv6 and\n // TCP/UDP/ICMP fields\n //\n if (matchIpv6Address && inPkt.getEtherType() == Ethernet.TYPE_IPV6) {\n IPv6 ipv6Packet = (IPv6) inPkt.getPayload();\n byte ipv6NextHeader = ipv6Packet.getNextHeader();\n Ip6Prefix matchIp6SrcPrefix =\n Ip6Prefix.valueOf(ipv6Packet.getSourceAddress(),\n Ip6Prefix.MAX_MASK_LENGTH);\n Ip6Prefix matchIp6DstPrefix =\n Ip6Prefix.valueOf(ipv6Packet.getDestinationAddress(),\n Ip6Prefix.MAX_MASK_LENGTH);\n selectorBuilder.matchEthType(Ethernet.TYPE_IPV6)\n .matchIPv6Src(matchIp6SrcPrefix)\n .matchIPv6Dst(matchIp6DstPrefix);\n\n if (matchIpv6FlowLabel) {\n selectorBuilder.matchIPv6FlowLabel(ipv6Packet.getFlowLabel());\n }\n\n if (matchTcpUdpPorts && ipv6NextHeader == IPv6.PROTOCOL_TCP) {\n TCP tcpPacket = (TCP) ipv6Packet.getPayload();\n selectorBuilder.matchIPProtocol(ipv6NextHeader)\n .matchTcpSrc(TpPort.tpPort(tcpPacket.getSourcePort()))\n .matchTcpDst(TpPort.tpPort(tcpPacket.getDestinationPort()));\n }\n if (matchTcpUdpPorts && ipv6NextHeader == IPv6.PROTOCOL_UDP) {\n UDP udpPacket = (UDP) ipv6Packet.getPayload();\n selectorBuilder.matchIPProtocol(ipv6NextHeader)\n .matchUdpSrc(TpPort.tpPort(udpPacket.getSourcePort()))\n .matchUdpDst(TpPort.tpPort(udpPacket.getDestinationPort()));\n }\n if (matchIcmpFields && ipv6NextHeader == IPv6.PROTOCOL_ICMP6) {\n ICMP6 icmp6Packet = (ICMP6) ipv6Packet.getPayload();\n selectorBuilder.matchIPProtocol(ipv6NextHeader)\n .matchIcmpv6Type(icmp6Packet.getIcmpType())\n .matchIcmpv6Code(icmp6Packet.getIcmpCode());\n }\n }\n }\n TrafficTreatment treatment = DefaultTrafficTreatment.builder()\n .setOutput(portNumber)\n .build();\n\n ForwardingObjective forwardingObjective = DefaultForwardingObjective.builder()\n .withSelector(selectorBuilder.build())\n .withTreatment(treatment)\n .withPriority(flowPriority)\n .withFlag(ForwardingObjective.Flag.VERSATILE)\n .fromApp(appId)\n .makeTemporary(flowTimeout)\n .add();\n\n flowObjectiveService.forward(context.inPacket().receivedFrom().deviceId(),\n forwardingObjective);\n\n //\n // If packetOutOfppTable\n // Send packet back to the OpenFlow pipeline to match installed flow\n // Else\n // Send packet direction on the appropriate port\n //\n if (packetOutOfppTable) {\n packetOut(context, PortNumber.TABLE);\n } else {\n packetOut(context, portNumber);\n }\n }", "public static void main (String[] args){\n\n Scanner stdin = new Scanner(System.in);\n int[] userSelect = new int[3];\n int portStart, portEnd;\n boolean validChoice = false;\n char choice;\n CustomScan cs = new CustomScan();\n\n do {\n System.out.println(\"Enter the IP address you would like to scan: \");\n } while (!cs.setIP(stdin.nextLine()));\n\n\n while (!validChoice) {\n System.out.println(\"Select option:\");\n System.out.println(\" 1 - Enter a range of ports to scan (i.e. 23-35)\");\n System.out.println(\" 2 - Enter a list of ports to scan (i.e. 22, 23, 34, 16)\");\n userSelect[1] = stdin.nextInt();\n\n if (userSelect[1] == 1) {\n validChoice = true;\n do {\n System.out.println(\"Enter lowest port value: \");\n portStart = stdin.nextInt();\n System.out.println(\"Enter highest port value: \");\n portEnd = stdin.nextInt();\n\n if (portStart > portEnd) {\n System.out.println(\"Invalid port range given.\");\n System.out.println(\"Please enter lowest port first.\");\n validChoice = false;\n }\n else if (portStart < 0 || portEnd > 65535) {\n System.out.println(\"Invalid port range given.\");\n System.out.println(\"Valid ports are 0 to 65535.\");\n validChoice = false;\n }\n } while (!cs.setStartPort(portStart) || !cs.setEndPort(portEnd));\n\n// System.out.println(\"Start Port: \" + cs.getStartPort());\n// System.out.println(\"End Port: \" + cs.getEndPort());\n if(validChoice) {\n cs.buildStack(true);\n }\n\n } else if (userSelect[1] == 2) {\n validChoice = true;\n cs.buildStack(false);\n\n } else {\n System.out.println(\"Invalid option, please try again\");\n validChoice = false;\n }\n\n if(validChoice) {\n try {\n System.out.println(\" Done entering ports? (Y/N)\");\n choice = stdin.next().charAt(0);\n if (choice == 'y' || choice == 'Y') {\n validChoice = true;\n } else if (choice == 'n' || choice == 'N') {\n validChoice = false;\n }\n } catch (Exception ex) {\n System.out.println(\"Invalid choice\");\n validChoice = false;\n }\n }\n }\n cs.printPorts();\n cs.getOpenPorts();\n cs.printOpenPorts(false);\n\n }", "public static boolean isUDPPortFreeToUse(int port) {\n if (port < MIN_PORT_NUMBER || port > MAX_PORT_NUMBER) {\n throw new IllegalArgumentException(\"Invalid start port: \" + port);\n }\n\n try (DatagramSocket ds = new DatagramSocket(port)) {\n ds.setReuseAddress(true);\n return true;\n } catch (IOException e) {\n // Do nothing\n }\n return false;\n }", "@Test\n void conditionalBindToPort()\n {\n objectUnderTest\n .conditionalBind(() -> false, ProxyAdapter.class).to(SimpleApplicationService.class)\n .start();\n\n //Assert that no binding has been performed\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class);\n\n assertTrue(result.getPortList().isEmpty());\n }", "public static boolean isPortAvailable(int port) {\r\n\t if (port < MIN_PORT_NUMBER || port > MAX_PORT_NUMBER) {\r\n\t throw new IllegalArgumentException(\"Port out of range: \" + port);\r\n\t }\r\n\r\n\t ServerSocket ss = null;\r\n\t DatagramSocket ds = null;\r\n\t try {\r\n\t ss = new ServerSocket(port);\r\n\t ss.setReuseAddress(true);\r\n\t ds = new DatagramSocket(port);\r\n\t ds.setReuseAddress(true);\r\n\t return true;\r\n\t } catch (IOException e) {}\r\n\t finally {\r\n\t if (ds != null){\r\n\t \tds.close();\r\n\t }\r\n\r\n\t if (ss != null) {\r\n\t try {\r\n\t ss.close();\r\n\t } catch (IOException e) {}\r\n\t }\r\n\t }\r\n\t return false;\r\n\t}", "private static boolean isLocalUdpPortFree(int port) {\r\n \tboolean res = false;\r\n \ttry {\r\n \t\tDatagramConnection conn = NetworkRessourceManager.createDatagramConnection();\r\n \t\tconn.open(port);\r\n conn.close();\r\n \t\tres = true;\r\n \t} catch(IOException e) {\r\n \t\tres = false;\r\n \t}\r\n \treturn res;\r\n }", "public void createRandomPorts() {\n\t\t\n\t\tList<String> types = Arrays.asList(new String[] {\"wood\", \"ore\", \"wheat\", \"sheep\", \"brick\", null, null, null, null});\n\t\tCollections.shuffle(types);\n\t\t\n\t\tports[0] = new Port(types.get(0), -3, 2, \"NE\", 2, \"NE\", \"E\");\n\t\tports[1] = new Port(types.get(1), 3, -3, \"SW\", 3, \"SW\", \"W\");\n\t\tports[2] = new Port(types.get(2), 2, 1, \"NW\", 3, \"W\", \"NW\");\n\t\tports[3] = new Port(types.get(3), 0, 3, \"N\", 3, \"NW\", \"NE\");\n\t\tports[4] = new Port(types.get(4), 1, -3, \"S\", 2, \"SE\", \"SW\");\n\t\tports[5] = new Port(types.get(5), -1, -2, \"S\", 2, \"SE\", \"SW\");\n\t\tports[6] = new Port(types.get(6), 3, -1, \"NW\", 2, \"W\", \"NW\");\n\t\tports[7] = new Port(types.get(7), -2, 3, \"NE\", 2, \"NE\", \"E\");\n\t\tports[8] = new Port(types.get(8), -3, 0, \"SE\", 3, \"E\", \"SE\");\n\t}", "@Test\n\tpublic void testNetworkCreationValid() {\n\t\tassertEquals(N_TESTNODES, testNet.nodeCount());\n\t\tfor (int i = 0; i < testNodes.length; i++) {\n\t\t\tassertTrue(testNet.nodes().contains(testNodes[i]));\n\t\t\tassertEquals(i, testNodes[i].getSimulationId());\n\t\t}\n\n\t\t// Test that link insertion works.\n\t\tfinal int N_LINKS = N_TESTNODES * (N_TESTNODES - 1) / 2;\n\t\tfor (INodeImpl node : testNodes) {\n\n\t\t\tfor (INodeImpl neighbour : testNodes) {\n\n\t\t\t\tif (node != neighbour && !node.isNeighbour(neighbour)) {\n\t\t\t\t\ttestNet.createLink(node, neighbour, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tassertEquals(N_LINKS, testNet.linkCount());\n\n\t\tfor (INodeImpl node : testNodes) {\n\n\t\t\tfor (INodeImpl neighbour : testNodes) {\n\n\t\t\t\tif (node != neighbour) {\n\t\t\t\t\tassertTrue(node.isNeighbour(neighbour));\n\t\t\t\t\tassertTrue(neighbour.isNeighbour(node));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void checkIfCorrect(List<IService> services, int expected) {\n\t\tfor (IService service : services) {\n\t\t\tMembershipService ms = (MembershipService) service;\n\t\t\tAssert.assertTrue(ms.getMembers().size() == expected);\n\t\t}\n\t}", "public boolean hasPort() {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"hasPort()\");\n Via via=(Via)sipHeader;\n return via.hasPort();\n }", "public void testParsePortNumber() {\n int portNumber = PortParser.parsePortNumber(PARAMETERS);\n assertEquals(\"portNumber\", PORT, portNumber);\n }", "@Test\n public void testChangePort() {\n \tForm form = new Form();\n \tform.param(\"newPort\", \"2121\");\n \t\n \tResponse connect = target.path(\"myressource/port\").request().post(Entity.form(form));\n \tassertEquals(230,connect.getStatus());\n }", "@Test\n public void testConnectToInvalidService()\n throws IOException\n {\n final boolean availability = ConnectionChecker.checkServiceAvailability(\"localhost\", 65534, 3000);\n\n assertFalse(availability);\n }", "@Test\n void invalidBindToPortAdapter()\n {\n var drivingAdapter = objectUnderTest\n .bind(ProxyAdapter.class);\n\n //Act /Assert\n assertThrows(PortConventionViolation.class, () -> drivingAdapter.to(SimpleApplicationServiceAdapter.class));\n }", "public static boolean isTCPPortFreeToUse(int port) {\n if (port < MIN_PORT_NUMBER || port > MAX_PORT_NUMBER) {\n throw new IllegalArgumentException(\"Invalid start port: \" + port);\n }\n\n try (ServerSocket ss = new ServerSocket(port)) {\n ss.setReuseAddress(true);\n return true;\n } catch (IOException e) {\n // Do nothing\n }\n return false;\n }", "@Test(expected=IllegalStateException.class)\n public void portBeforeInitialization() {\n port();\n fail(\"cannot get the port value now, Jadler hasn't been initialized yet\");\n }", "protected void addMissingPortSpecs(Map<Integer, LoadBalancerListenerInfo> lbSourcePorts,\n List<Integer> targetSourcePorts, List<LoadBalancerTargetPortSpec> completePortSpecs) {\n for (Integer lbSourcePort : lbSourcePorts.keySet()) {\n if (!targetSourcePorts.contains(lbSourcePort)) {\n LoadBalancerListenerInfo listener = lbSourcePorts.get(lbSourcePort);\n completePortSpecs\n .add(new LoadBalancerTargetPortSpec(listener.getTargetPort(), getSourcePort(listener)));\n }\n }\n }", "private boolean areBridged(Host source, Host destination) throws ConfigException {\n\n //If the locations is not the same we don't even check vlan or subnets\n if (Collections.disjoint(source.locations(), destination.locations())) {\n return false;\n }\n\n if (!source.vlan().equals(VlanId.NONE) && !destination.vlan().equals(VlanId.NONE)\n && !source.vlan().equals(destination.vlan())) {\n return false;\n }\n\n InterfaceConfig interfaceCfgH1 = networkConfigNib.getConfig(source.location(), InterfaceConfig.class);\n InterfaceConfig interfaceCfgH2 = networkConfigNib.getConfig(destination.location(), InterfaceConfig.class);\n if (interfaceCfgH1 != null && interfaceCfgH2 != null) {\n\n //following can be optimized but for clarity is left as is\n Interface intfH1 = interfaceCfgH1.getInterfaces().stream().findFirst().get();\n Interface intfH2 = interfaceCfgH2.getInterfaces().stream().findFirst().get();\n\n if (source.vlan().equals(VlanId.NONE) && !destination.vlan().equals(VlanId.NONE)) {\n return intfH1.vlanUntagged().equals(destination.vlan()) ||\n intfH1.vlanNative().equals(destination.vlan());\n }\n\n if (!source.vlan().equals(VlanId.NONE) && destination.vlan().equals(VlanId.NONE)) {\n return intfH2.vlanUntagged().equals(source.vlan()) ||\n intfH2.vlanNative().equals(source.vlan());\n }\n\n if (!intfH1.vlanNative().equals(intfH2.vlanNative())) {\n return false;\n }\n\n if (!intfH1.vlanUntagged().equals(intfH2.vlanUntagged())) {\n return false;\n }\n\n List<InterfaceIpAddress> intersection = new ArrayList<>(intfH1.ipAddressesList());\n intersection.retainAll(intfH2.ipAddressesList());\n if (intersection.size() == 0) {\n return false;\n }\n }\n return true;\n }", "public void testSetPort() {\n }", "private boolean isValidConnectors() {\n\n\t\tint countBoardCardInConnectors = 0;\n\n\t\tfor (CardModel cardModel : boardModel.getCards()) {\n\t\t\tif (connectors.contains(cardModel)) {\n\t\t\t\tcountBoardCardInConnectors++;\n\t\t\t}\n\t\t}\n\n\t\treturn (countBoardCardInConnectors == 2);\n\t}", "private void verifyPacketOut(Ethernet expected, ConnectPoint outPort,\n OutboundPacket actual) {\n assertArrayEquals(expected.serialize(), actual.data().array());\n assertEquals(1, actual.treatment().immediate().size());\n assertEquals(outPort.deviceId(), actual.sendThrough());\n Instruction instruction = actual.treatment().immediate().get(0);\n assertTrue(instruction instanceof OutputInstruction);\n assertEquals(outPort.port(), ((OutputInstruction) instruction).port());\n }", "public boolean isValid() {\n return (m_Port != 0);\n }", "private void checkAddress() {\n\t\t// if \"Set Address\" has not been performed then give the message to set\n\t\t// it first\n\t\tif (null == oscPort) {\n\t\t\tshowError(\"Please set an address first\");\n\t\t}\n\t}", "public static boolean isPortFreeToUse(int port) {\n return isUDPPortFreeToUse(port) && isTCPPortFreeToUse(port);\n }", "public boolean isOpen(int port)\n {\n try(DatagramSocket connection = new DatagramSocket(port, getInetAddress()))\n {\n addOpenPort(port);\n return true;\n }\n catch(IOException ioe)\n {\n return false;\n }\n }", "private boolean correctValues() {\n try {\n //TODO: check COM ports\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n return true;\n }", "private void expectBound(\n DelegatingSSLSocketFactory.SSLChannelMode channelMode,\n DelegatingSSLSocketFactory.SSLChannelMode finalMode)\n throws Throwable {\n assertThat(bindSocketFactory(channelMode))\n .describedAs(\"Channel mode of socket factory created with mode %s\",\n channelMode)\n .isEqualTo(finalMode);\n }", "protected void configurePorts() {\n\t\tremoveInputs();\n\t\tremoveOutputs();\n\n\t\t// FIXME: Replace with your input and output port definitions\n\n\t\t// Hard coded input port, expecting a single String\n\t\t//File name for the Input tables\n\t\taddInput(FIRST_INPUT, 0, true, null, String.class);\n\n\t\t\t\t\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_STD_OUTPUT, 0);\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_ERROR, 0);\n\t\taddOutput(VO_TABLE, 0);\n\n\t}", "public static String[] commonPortsListNames(){\n String[] portNames = {\n \"File Transfer Protocol (FTP) Data Transfer\"\n ,\"File Transfer Protocol (FTP) Command Control\"\n ,\"Secure Shell (SSH) Secure Login\"\n ,\"Telnet remote login service, unencrypted text messages\"\n ,\"Simple Mail Transfer Protocol (SMTP) E-mail routing\"\n ,\"Domain Name System (DNS) service\"\n ,\"Hypertext Transfer Protocol (HTTP) used in World Wide Web\"\n ,\"Protocol standard for a NetBIOS service on a TCP/UDP transport: Concepts and methods\"\n ,\"HTTP Secure (HTTPS) HTTP over TLS/SSL\"\n ,\"MS Networking access\"\n ,\"Microsoft SQL Server database management system (MSSQL) server\"\n ,\"Microsoft SQL Server database management system (MSSQL) monitor\"\n ,\"MySQL database system\"\n ,\"Microsoft Terminal Server (RDP) officially registered as Windows Based Terminal (WBT)\"\n ,\" Alternative port for HTTP\"};\n return portNames;\n }", "public boolean isProtocolValid(String prot) {\n for (int i = 0; i < protocols.length; i++) {\n if (protocols[i].equals(prot)) {\n return true;\n }\n }\n // No match has been found\n return false;\n }", "private AvailablePortFinder() {\n // Do nothing\n }", "boolean addPortMapping(PortMappingInfo portMappingInfo) throws NotDiscoverUpnpGatewayException, UpnpException;", "public static void CheckIfParametersAreValid(String args[]) {\n\t\tif (args.length != 4) {\n\t\t\tSystem.err.printf(\"usage: %s server_name port\\n\", args[1]);\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tIP = args[0];\n\t\tPORT = Integer.parseInt(args[1]);\n\t\tBUFFER_SIZE = Integer.parseInt(args[2]);\n\t\tMSG_RATE = Integer.parseInt(args[3]);\n\n\t\t//Validating Ip - Splitting the ip in 4 numbers because they are dividied by \". \" when we get from input\n\t\tString[] ipSeparated = args[0].split(\"\\\\.\");\n\n\t\tif(ipSeparated.length<4 ){\n\t\t\tSystem.out.println(\"Invalid IP format.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tif (ipSeparated.length == 4) {\n\n\t\t\tfor (int i = 0; i < ipSeparated.length; i++) {\n\t\t\t\tif (Integer.valueOf(ipSeparated[i]) < 0 || Integer.valueOf(ipSeparated[i]) > 255 ) {//if ip is not complete i get error\n\t\t\t\t\tSystem.out.println(\"Invalid IP format.\");\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}else {\n\t\t\t\t\tIP = args[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Validating Port - The Port number has to be between 0 adn 65535\n\t\tif (Integer.parseInt(args[1])>= 0 && Integer.parseInt(args[1]) < 65535) {\n\t\t\tPORT = Integer.parseInt((args[1]));\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Invalid PORT Number.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t//Validating Buffer - The Buffer Size ahs to be between 0 and 2048\n\t\tif (Integer.parseInt(args[2]) > 0 || Integer.parseInt(args[2]) < 2048) {\n\t\t\tBUFFER_SIZE = Integer.parseInt((args[2]));\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"Invalid Buffer Size.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t//Checking the parameter order of the deserved place for message rate\n\t\tif (Integer.parseInt(args[3]) >= 0) {\n\t\t\tMSG_RATE = Integer.parseInt(args[3]);\n\t\t} else {\n\t\t\tSystem.out.println(\"Message RATE Invalid.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t}", "private void verifyNodeList(CyNetwork cyNetwork) {\n\t\tint nodeCount = cyNetwork.getNodeCount();\n\t\tassertEquals(12, nodeCount);\n\n\t\t// This HashMap contains all expected nodes.\n\t\t// But node identifier is now a auto-generated md5hex digest; \n\t\t// so it's easier to test here by using biopax.rdfid values instead)\n\t\tMap<String, String> nodeMap = new HashMap<String, String>();\n\t\tnodeMap.put(\"physicalEntityParticipant44\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant31\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant9\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant17\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant22\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant26\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant38\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant99\", \"\");\n\t\t\n\t\t// These represent interaction nodes\n\t\tnodeMap.put(\"catalysis43\", \"\");\n\t\tnodeMap.put(\"biochemicalReaction6\", \"\");\n\t\tnodeMap.put(\"biochemicalReaction37\", \"\");\n\t\tnodeMap.put(\"catalysis5\", \"\");\n\n\t\t// We don't know the order of nodes; so use nodeMap for look up.\n\t\tIterator nodeIterator = cyNetwork.nodesIterator();\n\n\t\twhile (nodeIterator.hasNext()) {\n\t\t\tCyNode node = (CyNode) nodeIterator.next();\n\t\t\tString id = node.getIdentifier();\n\t\t\tString uri = Cytoscape.getNodeAttributes()\n\t .getStringAttribute(id, MapBioPaxToCytoscape.BIOPAX_RDF_ID);\n\t\t\t// Test a specific node label\n\t\t\tif (uri.endsWith(\"physicalEntityParticipant99\")) {\n\t\t\t\tString label = Cytoscape.getNodeAttributes()\n\t\t\t\t .getStringAttribute(id, BioPaxVisualStyleUtil.BIOPAX_NODE_LABEL);\n\t\t\t\tassertEquals(\"Mg2+\", label);\n\t\t\t}\n\n\t\t\tfor(String key : new HashSet<String>(nodeMap.keySet())) {\n\t\t\t\tif(uri.contains(key)) {\n\t\t\t\t\tnodeMap.put(key, \"found!\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Verify that we found all expected node identifiers.\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String key : nodeMap.keySet()) {\n\t\t\tif (nodeMap.get(key).isEmpty())\n\t\t\t\tsb.append(key).append(\",\");\n\t\t}\n\t\tif(sb.length() > 0)\n\t\t\tfail(\"Network does not contain: \" + sb.toString());\n\t}", "private boolean valid_C4(SchedulingPlan plan) {\n for (int i = 0; i < sockets; i++) {\n if (!valid_C4_socket(plan, i)) {\n return false;\n }\n }\n return true;\n }", "public void searchPorts() {\r\n try {\r\n Enumeration pList = CommPortIdentifier.getPortIdentifiers();\r\n System.out.println(\"Porta =: \" + pList.hasMoreElements());\r\n while (pList.hasMoreElements()) {\r\n portas = (CommPortIdentifier) pList.nextElement();\r\n if (portas.getPortType() == CommPortIdentifier.PORT_SERIAL) {\r\n System.out.println(\"Serial USB Port: \" + portas.getName());\r\n } else if (portas.getPortType() == CommPortIdentifier.PORT_PARALLEL) {\r\n System.out.println(\"Parallel Port: \" + portas.getName());\r\n } else {\r\n System.out.println(\"Unknown Port: \" + portas.getName());\r\n }\r\n portaCOM = portas.getName();\r\n }\r\n System.out.println(\"Porta escolhida =\" + portaCOM);\r\n } catch (Exception e) {\r\n System.out.println(\"*****Erro ao escolher a porta******\");\r\n }\r\n }", "public static boolean isGlobalConnectionUsed(Path fileName, globalType globalType, int dotNetNumber, int globalNumber) {\n boolean isAddress = false;\n //TODO Create option for DotNet only connection used so that a list of used connection list can be created\n try {\n Document doc = getDocument(fileName);\n NodeList dotNetNodeList = doc.getElementsByTagName(\"commsController\");\n for (int dotNetCount = 0; dotNetCount < dotNetNodeList.getLength(); dotNetCount++) {\n Node dotNetNode = dotNetNodeList.item(dotNetCount);\n if (dotNetNode.getNodeType() == Node.ELEMENT_NODE) {\n Element eElement = (Element) dotNetNode;\n if (dotNetNumber == Integer.parseInt(eElement.getAttribute(\"address\"))) {\n // System.out.println(Integer.parseInt( eElement.getAttribute( \"address\" ) ));\n NodeList globalTypeNodeList = dotNetNode.getChildNodes();\n\n for (int globalTypeCount = 0; globalTypeCount < globalTypeNodeList.getLength(); globalTypeCount++) {\n if (globalTypeNodeList.item(globalTypeCount).getNodeName().equals(globalType.name())) {\n\n NodeList globalNodeList = globalTypeNodeList.item(globalTypeCount).getChildNodes();\n\n for (int globalCount = 0; globalCount < globalNodeList.getLength(); globalCount++) {\n\n if (globalNodeList.item(globalCount).getNodeName().equals(globalType.typeName)) {\n String no = \"null\";\n NodeList globalConNoList = globalNodeList.item(globalCount).getChildNodes();\n for (int glocalConNoCount = 0; glocalConNoCount < globalConNoList.getLength(); glocalConNoCount++) {\n if (globalConNoList.item(glocalConNoCount).getNodeName().contains(\"wideConnectionNumber\")) {\n no = globalConNoList.item(glocalConNoCount).getTextContent();\n }\n }\n if (!(no.contains(\"null\"))) {\n int gNumber = Integer.parseInt(no);\n if (globalNumber == gNumber) {\n isAddress = true;\n break;\n }\n }\n }\n }\n }\n\n\n }\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return isAddress;\n }" ]
[ "0.6470775", "0.5901975", "0.5901975", "0.58537865", "0.57470816", "0.5741594", "0.56630665", "0.5612841", "0.55172014", "0.5506351", "0.54873306", "0.54798496", "0.5465567", "0.5437468", "0.54334944", "0.5327741", "0.53127146", "0.5312001", "0.5302293", "0.5293535", "0.5287656", "0.52838224", "0.52748317", "0.52660775", "0.52566195", "0.5248314", "0.5244655", "0.52431476", "0.5242978", "0.52352136", "0.5233472", "0.523346", "0.52267545", "0.52178496", "0.5213658", "0.5196364", "0.5196254", "0.5189705", "0.5184221", "0.51799685", "0.51798683", "0.51789933", "0.51692444", "0.5169103", "0.5158419", "0.5136852", "0.51343113", "0.51322746", "0.51196045", "0.5112599", "0.5098448", "0.5075665", "0.5066169", "0.50634205", "0.5062304", "0.506173", "0.5040941", "0.5028324", "0.502494", "0.5011695", "0.5011316", "0.50058913", "0.49945867", "0.4992542", "0.49883974", "0.49788797", "0.49778426", "0.49717975", "0.4969511", "0.4968079", "0.49676943", "0.4965476", "0.49644607", "0.49631077", "0.49312896", "0.4930839", "0.49233347", "0.49224582", "0.49201578", "0.49191192", "0.49156246", "0.49067777", "0.4905462", "0.4905384", "0.489963", "0.4892792", "0.4885157", "0.48737618", "0.48706242", "0.4867212", "0.48662442", "0.48644325", "0.48621815", "0.48608527", "0.48448694", "0.484159", "0.48356292", "0.48284364", "0.48244587", "0.48241797" ]
0.69236946
0
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_edit_note, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Complete the maxSubsetSum function below.
static int maxSubsetSum(int[] arr) { int n = arr.length; int[] dp = new int[n]; dp[0] = arr[0]; dp[1] = Math.max(arr[0], arr[1]); for (int i = 2; i < n; ++i) { dp[i] = Math.max(dp[i - 2], Math.max(dp[i - 2] + arr[i], Math.max(dp[i - 1], arr[i]))); } return dp[n - 1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int MaxSubarraySum(int[] a) {\n\t\t\n\t\tint max_so_for =Integer.MIN_VALUE;\n\t\tint max_ending_here = 0;;\n\t\t\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tmax_ending_here = max_ending_here + a[i];\n\t\t\t\n\t\t\tif(max_so_for < max_ending_here )\n\t\t\t\tmax_so_for = max_ending_here;\n\t\t\tif(max_ending_here < 0)\n\t\t\t\tmax_ending_here = 0;\n\t\t}\n\t\t\n\t\treturn max_so_for;\n\t}", "private static int maxSubSumN2(int[] a) {\n int maxSum = 0;\n\n for (int first = 0; first < a.length; first++) {\n int thisSum = 0;\n for (int i = first; i < a.length; i++) {\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n }\n }\n }\n\n return maxSum;\n }", "public int maxSubArraySum(int[] nums) {\n int maxSoFar = 0;\n int maxEndingHere = 0;\n\n for (int i = 0; i < nums.length; i++) {\n maxEndingHere = maxEndingHere + nums[i];\n if (maxEndingHere > maxSoFar)\n maxSoFar = maxEndingHere;\n if (maxEndingHere < 0)\n maxEndingHere = 0;\n }\n return maxSoFar;\n }", "private static int maxSubSumN(int[] a) {\n int maxSum = 0;\n int thisSum = 0;\n\n for (int i = 0; i < a.length; i++) {\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n } else if (thisSum < 0) {\n thisSum = 0;\n }\n }\n\n return maxSum;\n }", "public int maxSubArray(int[] nums) {\n if (nums.length == 0) return 0;\n int maxSum = nums[0];\n int sum = maxSum;\n for (int i = 1; i < nums.length; i++) {\n sum += nums[i];\n if (nums[i] > sum) {\n sum = nums[i];\n }\n if (sum > maxSum) {\n maxSum = sum;\n }\n }\n return maxSum;\n\n }", "private static int LargestSubArraySum(int[] array) {\n\t\tint maximumSum=0;\n\t\tfor(int i=0; i< array.length; i++) {\n\t\t\tfor(int j=i; j < array.length; j++) {\n\t\t\t\t\n\t\t\t\tint sum=0;\n\t\t\t\tfor(int k=i; k<= j; k++) \n\t\t\t\t\tsum += array[k];\n\t\t\t\t\n\t\t\t\tmaximumSum=Math.max(maximumSum, sum);\n\t\t\t} \n\t\t}\n\t\treturn maximumSum;\n\t}", "public static long maximumSubarraySum_bf(int[] nums, int k) {\n int len = nums.length;\n\n long ans = 0;\n for (int i = 0; i <= len - k; i++) {\n long sum = 0;\n Set<Integer> set = new HashSet<>();\n for (int j = 0; j < k; j++) {\n if (set.contains(nums[i + j])) {\n sum = 0;\n break;\n }\n\n set.add(nums[i + j]);\n sum += nums[i + j];\n }\n\n ans = Math.max(ans, sum);\n }\n\n return ans;\n }", "int maxSubarraySum(int arr[], int n){\n \n // Your code here\n int max = Integer.MIN_VALUE, curr = 0; \n \n for (int i = 0; i < n; i++) { \n curr = curr + arr[i]; \n if (max < curr) \n max = curr; \n if (curr < 0) \n curr = 0; \n } \n return max;\n }", "static int maxSubArraySum(int a[], int size)\n {\n int Cur_Max = a[0];\n int Prev_Max = a[0];\n \n for (int i = 1; i < size; i++)\n {\n //we want to know if the summition is increassing or not\n Prev_Max = Math.max(a[i], Prev_Max+a[i]);\n //Take Decision to change the value of the largest sum or not\n Cur_Max = Math.max(Cur_Max, Prev_Max);\n }\n return Cur_Max;\n }", "int maxSubarraySum(int arr[], int n){\n \n // Your code here\n int cursum = arr[0];\n int osum = arr[0];\n \n for(int i=1;i<n;i++){\n if(cursum>=0){\n cursum+=arr[i];\n }else{\n cursum=arr[i];\n }\n if(cursum>osum){\n osum=cursum;\n }\n }\n return osum;\n \n }", "public static int maxSubArrayO1(int[] nums) {\n int maxSum=nums[0];\n int sum=nums[0];\n for(int i=1;i<nums.length;i++){\n sum=sum+nums[i];\n sum=Math.max(sum,nums[i]);\n maxSum= Math.max(sum,maxSum);\n }\n return maxSum;\n }", "public int maxSubArray(int[] nums) {\n int maxValue = Integer.MIN_VALUE;\n int currentSum = 0;\n for(int i = 0; i < nums.length;i++){\n currentSum = Math.max(currentSum + nums[i],nums[i]);\n maxValue = Math.max(maxValue,currentSum);\n }\n return maxValue;\n }", "public static int maxSubArraySum(int a[]) {\n\t\tint max_so_far = a[0];\n\t\tint curr_max = a[0];\n\n\t\tfor (int i = 1; i < a.length; i++) {\n\t\t\tcurr_max = Math.max(a[i], curr_max + a[i]);\n\t\t\tmax_so_far = Math.max(max_so_far, curr_max);\n\t\t}\n\t\treturn max_so_far;\n\t}", "private static int maximumSubarray(int[] array) {\n\t\tint max = array[0];\n for (int i = 0; i < array.length; i++)\n {\n int sum = 0;\n for (int j = i; j < array.length; j++)\n {\n sum += array[j];\n if (sum > max)\n max = sum;\n }\n }\n return max; \n\t}", "public int maxSumSubmatrix(int[][] matrix, int target) {\n int row = matrix.length;\n if(row==0)return 0;\n int col = matrix[0].length;\n int m = Math.min(row,col);\n int n = Math.max(row,col);\n //indicating sum up in every row or every column\n boolean colIsBig = col>row;\n int res = Integer.MIN_VALUE;\n for(int i = 0;i<m;i++){\n int[] array = new int[n];\n // sum from row j to row i\n for(int j = i;j>=0;j--){\n int val = 0;\n TreeSet<Integer> set = new TreeSet<Integer>();\n set.add(0);\n //traverse every column/row and sum up\n for(int k = 0;k<n;k++){\n array[k]=array[k]+(colIsBig?matrix[j][k]:matrix[k][j]);\n val = val + array[k];\n //use TreeMap to binary search previous sum to get possible result \n Integer subres = set.ceiling(val-target);\n if(null!=subres){\n res=Math.max(res,val-subres);\n }\n set.add(val);\n }\n }\n }\n return res;\n}", "public static int[] maxSumInSubArray(int array[]) {\n int maxSoFar = array[0];\n int maxEndingHere = array[0];\n int startIndex = 0;\n int endIndex = 0;\n int j = 1;\n for (; j < array.length; j++) {\n int val = array[j];\n if (val >= val + maxEndingHere) {\n maxEndingHere = val;\n startIndex = j;\n } else {\n maxEndingHere += val;\n }\n if (maxSoFar < maxEndingHere) {\n maxSoFar = maxEndingHere;\n endIndex = j;\n }\n }\n return Arrays.copyOfRange(array, startIndex, endIndex + 1);// Make copyofRange to copy new max subsequence array\n }", "public static int maxSubArray(int[] nums) {\n int[] max_subarray= new int[nums.length];\n int max_sum=0;\n max_subarray[0]=nums[0];\n for (int i=1;i<nums.length;i++){\n max_subarray[i]=Math.max(max_subarray[i-1]+nums[i],nums[i]);\n max_sum=Math.max(max_subarray[i],max_sum);\n }\n System.out.println(Arrays.toString(max_subarray));\n return max_sum;\n }", "public static long maximumSubarraySum(int[] nums, int k) {\n int len = nums.length;\n\n long ans = 0;\n\n Map<Integer, Integer> map = new HashMap<>();\n long sum = 0;\n for (int i = 0, j = 0; j <= len; j++) {\n if (j - i == k) {\n if (map.size() == k) {\n ans = Math.max(ans, sum);\n }\n\n int cnt = map.getOrDefault(nums[i], 0);\n if (cnt > 1) {\n map.put(nums[i], cnt - 1);\n } else {\n map.remove(nums[i]);\n }\n sum -= nums[i];\n i++;\n }\n\n if (j == len) {\n break;\n }\n\n map.put(nums[j], map.getOrDefault(nums[j], 0) + 1);\n sum += nums[j];\n }\n\n return ans;\n }", "public static int maxSubsum(int[] arr) {\n int minInArray = 0;\n int maxInArray = 0;\n int minSoFar = minInArray;\n int maxSoFar = maxInArray;\n int sum = 0;\n\n for (int i = 0; i < arr.length; i++) {\n sum += arr[i];\n minSoFar += arr[i];\n maxSoFar += arr[i];\n\n if (minSoFar > 0) {\n minSoFar = 0;\n }\n\n if (maxSoFar < 0) {\n maxSoFar = 0;\n }\n\n if (minInArray > minSoFar) {\n minInArray = minSoFar;\n }\n\n if (maxInArray < maxSoFar) {\n maxInArray = maxSoFar;\n }\n }\n\n return Math.max(sum - minInArray, maxInArray);\n }", "private static int maxSubArrayGolden(int[] nums) {\n if (nums == null || nums.length == 0) {\n return 0;\n }\n // in case the result is negative.\n int max = Integer.MIN_VALUE;\n int sum = 0;\n for (int num : nums) {\n sum += num;\n max = Math.max(sum, max);\n sum = Math.max(sum, 0);\n }\n return max;\n }", "int maxSubarraySum(int arr[], int n)\r\n {\r\n int maxSoFar = Integer.MIN_VALUE;\r\n int currMax = 0;\r\n for(int i = 0; i < n; i++) {\r\n currMax = Math.max(arr[i], currMax+arr[i]);\r\n maxSoFar = Math.max(currMax, maxSoFar);\r\n }\r\n return maxSoFar;\r\n }", "private static int maxSubSumN3(int[] a) {\n int maxSum = 0;\n\n for (int first = 0; first < a.length; first++) {\n for (int last = first; last < a.length; last++) {\n int thisSum = 0;\n\n for (int i = first; i <= last; i++)\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n }\n }\n }\n\n return maxSum;\n }", "public static void maxSubArray(Integer[] arr){\n\n int maxSum = arr[0]; // start with smallest number\n int i =0;\n int j =1;\n\n while (j< arr.length){\n if((maxSum + arr[j] > maxSum) ){\n maxSum = arr[j];\n i++;\n j++;\n }\n\n }\n\n }", "public static int maxSumOfAdjancentElementsSubArray( int[] array ) {\n\t\tassertThat( array ).isNotNull();\n\n\t\tint arrLength = array.length;\n\n\t\tif( arrLength == 0 )\n\t\t\treturn 0;\n\t\tif( arrLength == 1 )\n\t\t\treturn array[0];\n\n\t\tint maximumSum = array[0];\n\t\tfor( int i = 1; i < arrLength; i++ ) {\n\n\t\t\tarray[i] = Math.max( array[i - 1] + array[i], array[i] );\n\t\t\tmaximumSum = maximumSum > array[i] ? maximumSum : array[i];\n\t\t}\n\n\t\treturn maximumSum;\n\t}", "public static int kadaneMaxSumPrintRange(int[] nums) {\n if(nums == null || nums.length == 0) return -1;\n\n int maxSoFar = 0, maxEndingHere = 0, maxStartIdx = 0, maxEndIdx = 0, start = 0;\n for(int i = 0; i < nums.length; i++) {\n maxEndingHere += nums[i];\n\n if(maxEndingHere < 0) {\n maxEndingHere = 0;\n start = i + 1;\n } else if(maxSoFar < maxEndingHere) {\n maxSoFar = maxEndingHere;\n maxStartIdx = start;\n maxEndIdx = i;\n }\n }\n\n System.out.format(\"kadane maxSubarray start at %d, end at %d\\n\", maxStartIdx, maxEndIdx);\n System.out.println(\"kadane the maxsum is \" + maxSoFar);\n return maxSoFar;\n }", "public int maxSubArray2(int[] nums) {\n int res = nums[0];\n int sum = nums[0];\n for (int i = 1; i < nums.length; i++) {\n sum = Math.max(nums[i], sum + nums[i]);\n res = Math.max(res, sum);\n }\n return res;\n }", "public static int maxSubArray1(int[] nums) {\n if (nums == null || nums.length == 0) return 0;\n int sum = 0;\n int max = nums[0];\n for (int i = 0; i < nums.length; i++) {\n sum = 0;\n for (int j = i; j < nums.length; j++) {\n sum += nums[j];\n if (max < sum) {\n max = sum;\n }\n }\n }\n System.out.println(max);\n return max;\n }", "public int maxSubArray(int[] nums) {\n if (nums == null || nums.length == 0) return 0;\n int max = Integer.MIN_VALUE, min = 0;\n int sum = 0;\n for (int i = 0; i < nums.length; i++){\n sum += nums[i];\n max = Math.max(max, sum - min);\n min = Math.min(min, sum);\n }\n return max;\n }", "static void maxSubArraySum1(int a[], int size)\n {\n int max_so_far = Integer.MIN_VALUE,\n max_ending_here = 0,start = 0,\n end = 0, s = 0;\n\n for (int i = 0; i < size; i++)\n {\n max_ending_here += a[i];\n\n if (max_so_far < max_ending_here)\n {\n max_so_far = max_ending_here;\n start = s;\n end = i;\n }\n\n if (max_ending_here < 0)\n {\n max_ending_here = 0;\n s = i + 1;\n }\n }\n System.out.println(\"Maximum contiguous sum is \" + max_so_far);\n System.out.println(\"Starting index \" + start);\n System.out.println(\"Ending index \" + end);\n }", "public static int maxSubsetSumNoAdjacent(int[] array) {\n\t\tint[] solution = array.clone();\n\t\t\n\t\t//edge cases\n\t\tif(array.length ==0){\n\t\t\treturn 0;\n\t\t}else if(array.length==1){\n\t\t\treturn array[0];\n\t\t}\n\t\t//base case\t\t\n\t\tsolution[1] = Math.max(array[0], array[1]);\n\t\t//Dynamic programming implemntation\n\t\tfor(int i=2; i< array.length; i++){\n\t\t\tsolution[i] = Math.max((solution[i-2] + array[i]), solution[i-1]);\n\t\t\t\n\t\t}\n return solution[array.length-1];\n }", "public static int maximumSubArray(int arr[])\n\t{\n\t\tint sum=arr[0];\n\t\tint maxSum = arr[0];\n\t\tint n = arr.length;\n\t\tfor(int i=1;i<n;i++)\n\t\t{\n\t\t\tsum = Math.max(sum+arr[i], arr[i]);\n\t\t\t\n\t\t\tmaxSum = Math.max(maxSum, sum);\n\t\t}\n\t\t\n\t\treturn maxSum;\n\t}", "private static int getHighestSum(List<? extends ISubsetSum> list, int n, int sum) {\n\t\tboolean subset[][] = new boolean[sum + 1][n + 1];\n\n\t\t// primeira coluna toda true, pois se considera que com qualquer\n\t\t// conjunto se pode obter uma somatoria de 0.\n\t\tfor (int i = 0; i <= n; i++)\n\t\t\tsubset[0][i] = true;\n\n\t\t// nenhuma somatoria é possível com nenhum elemento.\n\t\tfor (int i = 1; i <= sum; i++)\n\t\t\tsubset[i][0] = false;\n\n\t\t// Vai verificando se com aqueles elementos se obtem a sum iterada.\n\t\tfor (int i = 1; i <= sum; i++) {\n\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\tsubset[i][j] = subset[i][j - 1];\n\t\t\t\tif (i >= list.get(j - 1).getValue()) {\n\t\t\t\t\tsubset[i][j] = subset[i][j] || subset[i - list.get(j - 1).getValue()][j - 1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// itera sobre a ultima row de tras para frente até achar um valor true\n\t\t// e retorna a maior somatoria, tal que somatoria <= sum.\n\t\tint maxSum = 0;\n\t\tfor (int i = sum; i > 0; i--) {\n\t\t\tif (subset[i][n] == true) {\n\t\t\t\tmaxSum = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn maxSum;\n\n\t}", "private static double getTimeForMaxSubSumOf(int[] list) {\n long start = System.currentTimeMillis();\n maxSubSumN(list);\n long stop = System.currentTimeMillis();\n return (stop - start) / 1000.0;\n }", "private int FindMaxSum(int[] arr, int length) {\r\n\t\t\r\n\t\tint incl = arr[0];\r\n\t\tint excl = 0;\r\n\t\tint excl_new = 0;\r\n\t\t\r\n\t\tfor(int i = 1;i<arr.length;i++)\r\n\t\t{\r\n\t\t\texcl_new = (incl > excl) ? incl : excl;\r\n\t\t\t \r\n /* current max including i */\r\n incl = excl + arr[i];\r\n excl = excl_new;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn excl>incl?excl:incl;\r\n\t}", "static int maxSum()\n {\n // Find array sum and i*arr[i] with no rotation\n int arrSum = 0; // Stores sum of arr[i]\n int currVal = 0; // Stores sum of i*arr[i]\n for (int i=0; i<arr.length; i++)\n {\n arrSum = arrSum + arr[i];\n currVal = currVal+(i*arr[i]);\n }\n\n // Initialize result as 0 rotation sum\n int maxVal = currVal;\n\n // Try all rotations one by one and find\n // the maximum rotation sum.\n for (int j=1; j<arr.length; j++)\n {\n currVal = currVal + arrSum-arr.length*arr[arr.length-j];\n if (currVal > maxVal)\n maxVal = currVal;\n }\n\n // Return result\n return maxVal;\n }", "public static int maxSumSubSequence(int[] d) {\n\t\tint[] sum = new int[d.length];\n\t\tfor (int i = 0; i < d.length; i++) {\n\t\t\tsum[i] = d[i];\n\t\t}\n\t\tfor (int i = 1; i < d.length; i++) {\n\t\t\tfor (int j = 0; j < i; j++) {\n\t\t\t\tif (d[j] < d[i] && sum[i] < sum[j] + d[i]) {\n\t\t\t\t\tsum[i] = sum[j] + d[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint max = Integer.MIN_VALUE;\n\t\tfor (int i = 0; i < sum.length; i++) {\n\t\t\tmax = Math.max(max, sum[i]);\n\t\t}\n\t\treturn max;\n\t}", "public int maxSubArray(int[] nums) {\n int[] dp = new int[nums.length];\n dp[0] = nums[0];\n int res = nums[0];\n for (int i = 1; i < nums.length; i++) {\n dp[i] = nums[i] + (dp[i - 1] < 0 ? 0 : dp[i - 1]);\n res = Math.max(res, dp[i]);\n }\n return res;\n }", "public static int maxProductSubarray(int[] nums){\n int[] max= new int[nums.length];\n int[] min= new int[nums.length];\n int result=nums[0];\n max[0]=nums[0];min[0]=nums[0];\n for(int i=1;i<nums.length;i++) {\n if (nums[i] >= 0) {\n max[i] = Math.max(max[i - 1] * nums[i], nums[i]);\n min[i] = Math.min(min[i - 1] * nums[i], nums[i]);\n }\n //when the current number is negative ,the max number will be given\n //by multiplying current value with the min value so far\n //and the min will be obtained by applying with the most maximum value obtained\n //so far\n else {\n max[i] = Math.max(min[i - 1] * nums[i], nums[i]);\n min[i] = Math.min(max[i - 1] * nums[i], nums[i]);\n }\n result=Math.max(result,max[i]);\n }\n return result;\n }", "public int maxSubArray(int[] nums) {\n int maxNow = Integer.MIN_VALUE, maxEnd = 0;\n for (int i = 0; i < nums.length; i++) {\n maxEnd = maxEnd + nums[i];\n if (maxNow < maxEnd) {\n maxNow = maxEnd;\n }\n if (maxEnd < 0) {\n maxEnd = 0;\n }\n }\n return maxNow;\n\n }", "public static int maxSum(int[] a, int k) \n {\n PriorityQueue<Integer> pq = new PriorityQueue<>(); \n for (int x : a) \n pq.add(x); \n \n // Do k negations by removing a minimum element k times \n while (k-- > 0) \n { \n // Retrieve and remove min element \n int temp = pq.poll(); \n \n // Modify the minimum element and add back \n // to priority queue \n temp *= -1; \n pq.add(temp); \n } \n \n // Compute sum of all elements in priority queue. \n int sum = 0; \n for (int x : pq) \n sum += x; \n return sum; \n }", "public static int maxSumPrintRange(int[] nums) {\n if(nums == null || nums.length == 0) return -1;\n\n int maxEndingHere = nums[0], maxSoFar = nums[0], maxStartIdx = 0, maxEndIdx = 0, start = 0;\n for(int i = 1; i < nums.length; i++) {\n if(nums[i] > maxEndingHere + nums[i]) {\n maxEndingHere = nums[i];\n start = i;\n } else {\n maxEndingHere = maxEndingHere + nums[i];\n }\n\n if(maxEndingHere > maxSoFar) {\n maxSoFar = maxEndingHere;\n maxStartIdx = start;\n maxEndIdx = i;\n }\n }\n\n System.out.format(\"maxSubarray start at %d, end at %d\\n\", maxStartIdx, maxEndIdx);\n System.out.println(\"the maxsum is \" + maxSoFar);\n return maxSoFar;\n }", "public static int maxSub(int[] A) {\n int maxNow = A[0];\n int maxAll = A[0];\n int size = A.length;\n for (int i = 1; i < size; i++) {\n maxNow = Math.max(A[i], maxNow + A[i]);\n// System.out.println(\"i = \" + i + \": max now:\" + maxNow);\n maxAll = Math.max(maxAll, maxNow);\n// System.out.println(\"i = \" + i + \": max all:\" + maxAll);\n }\n return maxAll;\n }", "public static int kadaneMaxSum(int[] nums) {\n if(nums == null || nums.length == 0) return -1;\n\n int maxSoFar = 0, maxEndingHere = 0;\n for(int i = 0; i < nums.length; i++) {\n maxEndingHere += nums[i];\n\n if(maxEndingHere < 0) {\n maxEndingHere = 0;\n } else if(maxSoFar < maxEndingHere) {\n maxSoFar = maxEndingHere;\n }\n }\n\n System.out.println(\"kadane the maxsum is \" + maxSoFar);\n return maxSoFar;\n }", "public static int maxSubsetSumNoAdjacent( int[] array ) {\n\t\tassertThat( array ).isNotNull();\n\n\t\tif( array.length == 0 )\n\t\t\treturn 0;\n\t\tif( array.length == 1 )\n\t\t\treturn array[0];\n\n\t\tarray[1] = array[0] > array[1] ? array[0] : array[1];\n\n\t\tfor( int i = 2; i < array.length; i++ ) {\n\t\t\tint prevIndexSum = array[i - 1];\n\t\t\tint currentIdxSum = array[i - 2] + array[i];\n\n\t\t\tarray[i] = prevIndexSum > currentIdxSum ? prevIndexSum : currentIdxSum;\n\t\t}\n\n\t\treturn array[array.length - 1];\n\t}", "public int maxSubArrayLen(int[] nums, int k) {\n if(nums == null || nums.length == 0) {\n return 0;\n }\n int maxLength = 0;\n int[] sums = new int[nums.length];\n sums[0] = nums[0];\n HashMap<Integer, Integer> map = new HashMap<>();\n map.put(sums[0], 0);\n for(int i = 1; i < nums.length; i++) {\n sums[i] = sums[i - 1] + nums[i];\n map.put(sums[i], i);\n if(sums[i] == k && i + 1 > maxLength) {\n maxLength = i + 1;\n }\n Integer index = map.get(sums[i] - k);\n if(index == null) {\n continue;\n }\n int length = i - index; // length = i - (index + 1) + 1 = i - index\n if(length > maxLength) {\n maxLength = length; \n }\n }\n return maxLength;\n }", "public static void main(String[] args) {\n MaximumSubarray subarray = new MaximumSubarray();\n int[] data = {-2,1,-3,4,-1,2,1,-5,4};\n System.out.println(subarray.maxSubArray(data));\n }", "private static int maxSum(int arr[]) {\n int sum = 0;\n Arrays.sort(arr);\n\n // Subtracting a1, a2, a3,....., a(n/2)-1,\n // an/2 twice and adding a(n/2)+1, a(n/2)+2,\n // a(n/2)+3,....., an - 1, an twice.\n for (int i = 0; i < arr.length / 2; i++) {\n sum -= (2 * arr[i]);\n sum += (2 * arr[arr.length - i - 1]);\n }\n\n return sum;\n }", "public int maxSubArray3(int[] nums) {\n int length = nums.length;\n //dp[i]表示数组开始索引为i的子数组的和\n int[] dp = new int[length];\n int max = nums[0] - 1;\n for (int i = 0; i < length; i++) {\n for (int j = i; j < length; j++) {\n int sum = dp[i] + nums[j];\n dp[i] = sum;\n if (max < sum) {\n max = sum;\n }\n }\n }\n return max;\n }", "public int maxSubArray(int[] A) {\n if(A==null||A.length==0)\n return 0;\n int maxSub = A[0];\n int sum=A[0];\n for(int i=1;i<A.length;i++){\n if(sum<0)\n sum=0;\n sum+=A[i];\n maxSub=Math.max(maxSub,sum); \n }\n return maxSub;\n }", "public static int maxSumContiniousSubArray(int[] data) {\n\t\tint[] sums = new int[data.length];\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tsum += data[i];\n\t\t\tsum = Math.max(0, sum);\n\t\t\tsums[i] = sum;\n\t\t}\n\t\treturn Arrays.stream(sums).max().getAsInt();\n\t}", "public int maxDiffSubArrays(int[] nums) {\n int[] leftMins = new int[nums.length];\n int[] leftMaxs = new int[nums.length];\n int[] rightMins = new int[nums.length];\n int[] rightMaxs = new int[nums.length];\n leftMins[0] = nums[0];\n leftMaxs[0] = nums[0];\n rightMins[nums.length-1] = nums[nums.length-1];\n rightMaxs[nums.length-1] = nums[nums.length-1];\n int leftSum = nums[0], rightSum = nums[nums.length-1];\n int leftMin=0, leftMax=0, rightMin=0, rightMax=0;\n for (int i=1;i < nums.length;i++) {\n leftMin = Math.min(leftMin, leftSum);\n leftMax = Math.max(leftMax, leftSum);\n leftSum += nums[i];\n leftMins[i] = Math.min(leftMins[i-1], leftSum-leftMax);\n leftMaxs[i] = Math.max(leftMaxs[i-1], leftSum-leftMin);\n }\n\n for (int i=nums.length-2;i>=0;i--) {\n rightMin = Math.min(rightMin, rightSum);\n rightMax = Math.max(rightMax, rightSum);\n rightSum += nums[i];\n rightMins[i] = Math.min(rightMins[i+1], rightSum-rightMax);\n rightMaxs[i] = Math.max(rightMaxs[i+1], rightSum-rightMin);\n }\n int result = Integer.MIN_VALUE;\n for (int i=0;i < nums.length-1;i++) {\n result = Math.max(result, Math.max(Math.abs(rightMaxs[i+1]-leftMins[i])\n ,Math.abs(leftMaxs[i]-rightMins[i+1])));\n }\n return result;\n }", "static int findMaxSum(Node node){\n Res res = new Res();\n res.value = Integer.MIN_VALUE;\n findmaxUtil(node,res);\n return res.value;\n }", "public static int findMaxSumSubArray(int k, int[] arr) {\n int windowSum = 0, maxSum = Integer.MIN_VALUE;\n int windowStart = 0;\n for (int windowEnd = 0; windowEnd < arr.length; windowEnd++) {\n windowSum += arr[windowEnd]; // add the next element\n // slide the window, we don't need to slide if we've not hit the required window size of 'k'\n if (windowEnd >= k - 1) {\n maxSum = Math.max(maxSum, windowSum);\n windowSum -= arr[windowStart]; // subtract the element going out\n windowStart++; // slide the window ahead\n }\n }\n return maxSum;\n }", "public static int maxSubArrayLen(int[] nums, int k) {\n Map<Integer, Integer> map = new HashMap<>();\n int sum = 0, maxLen = 0;\n for (int i = 0; i < nums.length; i++) {\n sum += nums[i];\n\n if (!map.containsKey(sum)) {\n map.put(sum, i);\n }\n\n if (sum == k) {\n maxLen = i + 1;\n } else {\n int diff = sum - k;\n if (map.containsKey(diff)) {\n maxLen = Math.max(maxLen, i - map.get(diff));\n }\n }\n }\n return maxLen;\n }", "private static int maxScore(int[] coins, int coinsCount, int startIndex,\n Map<Integer,Map<Integer,Integer>> map, int totalSum){\n int maxScore = 0;\n if(coinsCount==1) maxScore = coins[startIndex];\n else{\n int c1 = map.get(coinsCount-1).getOrDefault(startIndex+1,-1)==-1?\n maxScore(coins,coinsCount-1,startIndex+1,map,\n totalSum-coins[startIndex]):\n map.get(coinsCount-1).get(startIndex+1);\n map.get(coinsCount-1).put(startIndex+1,c1);\n int c2 = map.get(coinsCount-1).getOrDefault(startIndex,-1)==-1?\n maxScore(coins,coinsCount-1,startIndex,map,\n totalSum-coins[coinsCount+startIndex-1]):\n map.get(coinsCount-1).get(startIndex);\n map.get(coinsCount-1).put(startIndex,c2);\n maxScore = Math.max(totalSum-c1,totalSum-c2);\n } return maxScore;\n }", "public static int maxSubArray(int[] nums) {\n //write your code here\n \tint leg = nums.length;\n \n \t\n \tint big = 0; //checking if numbers are big?\n \tint fin = 0; //final print number\n \t//int num = 0;\n \tfor (int i =0; i < leg; i ++) {\n \t\t//big = big + nums[i];\n \t\t//if (big < 0 ) {\n \t\t//\tbig = 0;\n \t\t//} else if (big > 0) {\n \t\t//\tbig += nums[i];\n \t\t//\tbig = fin;\n \t\t//}\n \t\t//num = num + nums[i];\n \t\tbig += nums[i]; // and num[i] to the big\n \t\t//if (big > fin) {\n \t\t//\tfin = big; \n \t\t//}\n \t\tif (fin < big) { //check if final is bigger than the big\n \t\t\tfin = big; //fin should be = to big\n \t\t} //else {\n \t\t\t//fin = big;\n \t\telse if (big < 0) { //if big is less than 0, like negative number\n \t\t\tbig = 0; //make big = to 0 \n \t\t} \n \t\n \t}\n\t\treturn fin;\n \t\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint query = input.nextInt();\n\t\t\n\t\tfor(int i=0;i<query;i++)\n\t\t{\n\t\t\tint n=input.nextInt();\n\t\t\tint m=input.nextInt();\n\t\t\tint[] array=new int[n];\n\t\t\tfor(int j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tarray[j]=input.nextInt();\n\t\t\t}\n\t\t\tSystem.out.println(maxSubArraySum(subsets(array),m));\n\t\t\t\n\t\t}\n\t\t\n\t}", "public static double maxSubsequenceSum(double[] a) {\r\n\t\tdouble[] s = new double[a.length];\r\n\t\tdouble max = s[0] = a[0];\r\n\t\tfor (int i = 1; i < a.length; i++) {\r\n\t\t\ts[i] = s[i - 1] < 0 ? a[i] : s[i - 1] + a[i];\r\n\t\t\tmax = Math.max(max, s[i]);\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "public int maxSumSubmatrix(int[][] matrix, int k) {\n int res=Integer.MIN_VALUE; \n int rows=matrix.length, cols=matrix[0].length; \n int[][] areas=new int[rows][cols];\n for(int i=0; i<rows; i++){\n for(int j=0; j<cols; j++){\n int area=matrix[i][j];\n if(i>0) area+=areas[i-1][j];\n if(j>0) area+=areas[i][j-1];\n if(i>0 && j>0) area-=areas[i-1][j-1];\n areas[i][j]=area;\n }\n }\n \n for(int r1=0; r1<rows; r1++){\n for(int r2=r1; r2<rows; r2++){\n TreeSet<Integer> set=new TreeSet<Integer>();\n set.add(0);\n for(int c=0; c<cols; c++){\n int sec=areas[r2][c];\n if(r1>0) sec-= areas[r1-1][c];\n Integer ceiling=set.ceiling(sec-k);\n if(ceiling!=null)\n res=Math.max(res, sec-ceiling);\n set.add(sec);\n }\n }\n }\n return res;\n }", "static int[] maxSubarray(int[] arr) {\n\n if(arr == null || arr.length == 0)\n return new int[0];\n\n int sum = arr[0];\n int subArrayMax = Integer.MIN_VALUE;\n for(int i=1; i<arr.length; i++) {\n\n if(sum <= 0) {\n sum = 0;\n }\n\n sum+= arr[i];\n\n if(sum > subArrayMax) {\n subArrayMax = sum;\n }\n }\n\n subArrayMax = Math.max(subArrayMax, sum);\n\n Arrays.sort(arr);\n\n int subSeqMax = 0;\n if(arr[arr.length-1] < 0) {\n subSeqMax = arr[arr.length-1];\n } else {\n for(int a : arr){\n subSeqMax+= a < 0 ? 0 : a;\n }\n }\n\n return new int[]{subArrayMax, subSeqMax};\n }", "public static void main(String[] args) {\n\t\tint[] nums = {-2,1,-3,4,-1,2,1,-5,4} ;\n\t\t\n\t\tSolution_Maximum_Subarray_53 s = new Solution_Maximum_Subarray_53() ;\n\t\tint ans = s.maxSubArray(nums) ;\n\t\t\n\t\tSystem.out.println(\"ans: \" + ans) ;\n\t}", "public int maxSubArray(final List<Integer> A) {\n int n = A.size();\n int ans = A.get(0),curr = A.get(0);\n \n for(int i=1;i<n;i++){\n curr = Math.max(A.get(i),A.get(i)+curr);\n ans = Math.max(curr,ans);\n }\n return ans;\n }", "public static int maxSub0(int[] A) {\n int maxNow = 0;\n int maxAll = 0;\n int size = A.length;\n for (int i = 0; i < size; i++) {\n maxNow = Math.max(0, maxNow + A[i]);\n maxAll = Math.max(maxAll, maxNow);\n }\n return maxAll;\n }", "public List<Integer> largestDivisibleSubsetA(int[] nums) {\r\n List<Integer> lstSubset = new ArrayList<>();\r\n if (nums == null || nums.length == 0) return lstSubset;\r\n if (nums.length == 1) {\r\n lstSubset.add(nums[0]);\r\n return lstSubset;\r\n }\r\n \r\n int n = nums.length;\r\n int i;\r\n int nMaxLen = 0;\r\n int baseNum = 0;\r\n int facted = 0;\r\n int newNum = 0;\r\n boolean bExist = false;\r\n Set<Integer> setNum = new HashSet<Integer>();\r\n \r\n Arrays.sort(nums);\r\n \r\n for (i=0; i<n; i++) setNum.add(nums[i]);\r\n \r\n for (i=0; i<n-1; i++) {\r\n List<Integer> lstSubTmp = new ArrayList<Integer>();\r\n baseNum = nums[i];\r\n \r\n lstSubTmp.add(baseNum);\r\n bExist = false;\r\n facted = 2; \r\n newNum = baseNum*facted;\r\n \r\n while (newNum <= nums[n-1]) {\r\n if (setNum.contains(newNum)) {\r\n lstSubTmp.add(newNum);\r\n baseNum = newNum;\r\n bExist = true;\r\n } else {\r\n bExist = false;\r\n }\r\n \r\n if (bExist == true) {\r\n facted = 2;\r\n } else {\r\n facted++;\r\n }\r\n \r\n newNum = baseNum*facted;\r\n }\r\n \r\n if (nMaxLen < lstSubTmp.size()) {\r\n nMaxLen = Math.max(nMaxLen, lstSubTmp.size());\r\n lstSubset = new ArrayList<Integer>(lstSubTmp);\r\n }\r\n }\r\n \r\n return lstSubset;\r\n }", "public static void main(String[] args) {\n int[] arr1 = { -10, 2, 2, -3, 14, -5, -23, 3, 7, -21};\n// for( int i = 0;i<K;i++){\n// arr[i] = sc.nextInt();\n// }\n int[] nums = getMaxSum(arr1);\n System.out.print(nums[0]);\n System.out.print(\" \");\n System.out.print(nums[1]);\n System.out.print(\" \");\n System.out.print(nums[2]);\n System.out.println();\n }", "static\nint\nfindMaxSum(\nint\n[]arr, \nint\nn) \n\n{ \n\n\n// Array to store prefix sum. \n\nint\n[]preSum = \nnew\nint\n[n]; \n\n\n// Array to store suffix sum. \n\nint\n[]suffSum = \nnew\nint\n[n]; \n\n\n// Variable to store maximum sum. \n\nint\nans = \nint\n.MinValue; \n\n\n// Calculate prefix sum. \n\npreSum[0] = arr[0]; \n\nfor\n(\nint\ni = 1; i < n; i++) \n\npreSum[i] = preSum[i - 1] + arr[i]; \n\n\n// Calculate suffix sum and compare \n\n// it with prefix sum. Update ans \n\n// accordingly. \n\nsuffSum[n - 1] = arr[n - 1]; \n\n\nif\n(preSum[n - 1] == suffSum[n - 1]) \n\nans = Math.Max(ans, preSum[n - 1]); \n\n\nfor\n(\nint\ni = n - 2; i >= 0; i--) \n\n{ \n\nsuffSum[i] = suffSum[i + 1] + arr[i]; \n\n\nif\n(suffSum[i] == preSum[i]) \n\nans = Math.Max(ans, preSum[i]); \n\n} \n\n\nreturn\nans; \n\n}", "static void miniMaxSum(int[] arr) {\n long minSum=0,maxSum=0;\n int temp=0;\n for(int k=0; k<arr.length-1; k++) {\n for(int i=0; i <arr.length-k-1;i++) {\n if(arr[i]>arr[i+1] ) {\n temp=arr[i];\n arr[i]=arr[i+1];\n arr[i+1]=temp;\n }\n }\n }\n for(int i=1;i<arr.length;i++){\n minSum+=arr[i-1];\n maxSum+=arr[i];\n }\n System.out.print(minSum+\" \"+maxSum);\n\n }", "public static void main(String[] args) {\n int[] array_1 = { 2, 1, 5, 1, 3, 2 };\n int k_1 = 3;\n\n int[] array_2 = { 2, 3, 4, 1, 5 };\n int k_2 = 2;\n\n// System.out.println(findMaxSumSubArray(array_1, k_1));\n// System.out.println(findMaxSumSubArray(array_2, k_2));\n\n int[] array3 = { 2, 1, 5, 2, 3, 2 };\n System.out.println(findMinSubArray(7, array3));\n }", "public static int maxSum(int[] nums) {\n if(nums == null || nums.length == 0) return -1;\n\n int maxEndingHere = nums[0], maxSoFar = nums[0];\n for(int i = 1; i < nums.length; i++) {\n maxEndingHere = Math.max(maxEndingHere + nums[i], nums[i]);\n maxSoFar = Math.max(maxSoFar, maxEndingHere);\n }\n\n return maxSoFar;\n }", "private static int maxMoney(int[] coins,int coinsCount,int startIndex){\n int maxScore = 0;\n if(coinsCount==1) maxScore = coins[startIndex];\n else{\n maxScore = Math.max(coins[startIndex]+sum(coins,coinsCount-1, startIndex+1)-maxMoney(coins,coinsCount-1, startIndex+1),\n coins[coinsCount+startIndex-1]+sum(coins,coinsCount-1,startIndex)-maxMoney(coins,coinsCount-1,startIndex));\n }return maxScore;\n }", "int maxSum(int[] arr){\n\t\tint sum=0;\n\t\tint arrayMin = findMin(arr);\n\t\tfor (int i=0; i<arr.length; i++) {\n\t\t\tif (arr[i] != arrayMin) {\n\t\t\t\tsum += arr[i];\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "public int maxSubarraySumCircular(int[] A) {\n int total = 0, maxSum = -30000, curMax = 0, minSum = 30000, curMin = 0;\n for (int a :\n A) {\n curMax = Math.max(curMax + a, a);\n maxSum = Math.max(maxSum, curMax);\n curMin = Math.min(curMin + a, a);\n minSum = Math.min(minSum, curMin);\n total += a;\n }\n return maxSum > 0 ? Math.max(maxSum, total - minSum) : maxSum;\n }", "public static int max() {\r\n\r\n\t\tint[] arr1 = ArrayMethods.get5();\r\n\t\tint[] arr2 = ArrayMethods.get5();\r\n\r\n\t\tint sum1 = 0;\r\n\t\tint sum2 = 0;\r\n\r\n\t\tint max = 0;\r\n\r\n\t\tfor (int num : arr1) {\r\n\t\t\tsum1 += num;\r\n\t\t}\r\n\t\tfor (int num : arr2) {\r\n\t\t\tsum2 += num;\r\n\t\t}\r\n\r\n\t\tif (sum1 > sum2) {\r\n\r\n\t\t\tmax = sum1;\r\n\r\n\t\t} else if (sum1 == sum2) {\r\n\r\n\t\t\tmax = sum1;\r\n\r\n\t\t} else {\r\n\r\n\t\t\tmax = sum2;\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "public static int jKadaneAlgo(int A[], int n)\n\t{\n\t\t // initialize variables as first value in array\n\t\t int currentMax=A[0]; \n\t\t int maxSubarray=A[0]; \n\t\t for(int i=1; i<n; i++) \n\t\t { \n\t\t\t //compare the first element of array with the sum of first element of array and the iterating value of array\n\t\t\t currentMax=Math.max(A[i],(currentMax+A[i])); \n\t\t\t //keep updating the maxSubarray with highest value by comparing currentMax and maxSubArray\n\t\t\t maxSubarray=Math.max(maxSubarray,currentMax); \n\t\t }\n\t\t return maxSubarray;\n\t}", "public int maxSubArray(int[] nums) {\n return helper(nums, 0, nums.length - 1);\n }", "static int[] maxSubarray(int[] arr) {\n int n=arr.length;\n int t[]=new int[n];\n for(int i=0;i<arr.length;i++)\n {\n t[i]=arr[i];\n if(i==0)\n {\n\n }\n else\n {\n if(arr[i-1]<0)\n {\n\n }\n else\n {\n arr[i]+=arr[i-1];\n }\n\n }\n }\n Arrays.sort(arr);\n int res[]=new int[2];\n res[0]=arr[n-1];\n res[1]=0;\n Arrays.sort(t);\n int sum=0;\n for(int i=(n-1);i>-1;i--)\n {\n if( t[i]<0)\n {\n \n if(i==(n-1))\n {\n res[1]=t[n-1];\n break;\n\n }\n \n }\n else\n {\n if(t[i]>0)\n {\n res[1]+=t[i];\n //System.out.println(t[i]);\n\n\n }\n else\n {\n break;\n }\n }\n }\n System.out.println(\"Sub array sum is: \"+res[0]+\"\\n\"+\"Subsequence of array: \"+res[1]);\n //res[1]=-112;\n return res;\n }", "public static int maxSubArrayWithZeroSum(int[] arr) {\r\n\t\tMap<Integer, Integer> sumToIndexMap = new HashMap<>();\r\n\r\n\t\tint sum = 0;\r\n\t\tsumToIndexMap.put(0, -1);\r\n\t\tint max = Integer.MIN_VALUE;\r\n\r\n\t\tfor (int index = 0; index < arr.length; index++) {\r\n\r\n\t\t\tif (arr[index] == 0) {\r\n\t\t\t\tmax = Integer.max(max, 1);\r\n\t\t\t}\r\n\r\n\t\t\tsum = sum + arr[index];\r\n\t\t\tif (sumToIndexMap.containsKey(sum)) {\r\n\r\n\t\t\t\tint prevSumIndex = sumToIndexMap.get(sum);\r\n\t\t\t\tmax = Integer.max(max, index - prevSumIndex);\r\n\t\t\t} else {\r\n\t\t\t\tsumToIndexMap.put(sum, index);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn max;\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tint arr[] = {8,2,3,5,7,9,10};\r\n\t\tmaxSum(arr);\r\n\t}", "static void longestSubWithMaxSum(int arr[], int N)\n{\n \n // Stores the largest element\n // of the array\n int Max = Arrays.stream(arr).max().getAsInt();\n System.out.println(\"MAX \"+Max);\n System.out.println(\"ARR \"+Arrays.toString(arr));\n \n // If Max is less than 0\n if (Max < 0)\n {\n System.out.println(\"HERE \"+Max);\n // Print the largest element\n // of the array\n System.out.print(Max);\n return;\n }\n \n // Traverse the array\n for(int i = 0; i < N; i++)\n {\n \n // If arr[i] is greater\n // than or equal to 0\n if (arr[i] >= 0)\n {\n \n // Print elements of\n // the subsequence\n System.out.print(arr[i] + \" \");\n }\n }\n}", "public static void main(String[] args) {\n\t\tint[] array1 = {-8, 5, 7, -2, 10};\n\t\tint[] array2 = {23, 5, -9, 45, 1};\n\t\tint[] array3 = {2, -14, 9, -5};\n\t\tSystem.out.println(\"max sub array sum of array1 = \"\n\t\t\t+ maxSubArraySum(array1));\n\t\tSystem.out.println(\"max sub array sum of array2 = \"\n\t\t\t+ maxSubArraySum(array2));\n\t\tSystem.out.println(\"max sub array sum of array3 = \"\n\t\t\t+ maxSubArraySum(array3));\n\t}", "@Test\n\tpublic void when_provided_maximum_size_list_with_all_elements_that_can_be_added_then_return_sum_in_allowable_amount_of_time() {\n\t\tfinal int[] elements = Fixture.initializeRandomList(MAX_NUM_ELEMENTS, MIN_ELEMENT_SIZE, 5);\n\t\tfinal int elementSum = IntStream.of(elements).sum();\n\t\tfinal long startTime = System.currentTimeMillis();\n\n\t\tfinal int result = Knapsack.getOptimalWeight(elementSum, elements);\n\n\t\tassertThat(result, is(elementSum));\n\t\tassertThat(System.currentTimeMillis() - startTime < Fixture.MAX_ALLOWABLE_CALCULATION_TIME, is(true));\n\t}", "public int maxSubArray_improve(int[] nums) {\n if (nums==null || nums.length==0)\n return 0;\n int len = nums.length, res = nums[0];\n int cur = nums[0];\n for (int i = 1; i<len; i++) {\n if (cur<0)\n cur = nums[i];\n else\n cur += nums[i];\n res = Math.max(cur, res);\n }\n return res;\n }", "public kd kadenMaxSum(Integer [] arr){\n \n kd max = new kd();\n kd max_cur = new kd();\n kd result = new kd();\n \n for( int i =0; i<arr.length; i++ ){\n \n if(max_cur.sum < 0){\n max_cur.sum = arr[i];\n max_cur.i = i;\n max_cur.j = i;\n } else {\n max_cur.sum += arr[i];\n max_cur.j = i;\n }\n \n if(max_cur.sum>max.sum){\n max= max_cur;\n }\n System.out.println(\"Current max_cur \"+ max_cur.sum + \" max_cur.i \"+ max_cur.i + \" max_cur.j \"+ max_cur.j);\n System.out.println(\"Current max \"+ max.sum + \" max.i \"+ max.i + \" max.j \"+ max.j);\n }\n System.out.println(\"Max \"+ max.sum + \" max.i \"+ max.i + \" max.j \"+ max.j);\n result = max;\n \n return result;\n }", "private static void findMaxSumMatrix(int[][] matrix) {\n int maxSum = Integer.MIN_VALUE;\n int row = 0;\n int col = 0;\n for (int rows = 0; rows <matrix.length - 2; rows++) {\n for (int column = 0; column <matrix[rows].length - 2; column++) {\n int currentItem = matrix[rows][column];\n int neighborItem = matrix[rows][column + 1];\n int nextNeighborItem = matrix[rows][column + 2];\n\n int currentDownNeighborItem = matrix[rows + 1][column];\n int downNeighborItem = matrix[rows + 1][column + 1];\n int nextDownNeighborItem = matrix[rows + 1][column + 2];\n\n int lastItem = matrix[rows + 2][column];\n int lastNeighborItem = matrix[rows + 2][column + 1];\n int nextLastNeighborItem = matrix[rows + 2][column + 2];\n\n int sum = getSum(currentItem, neighborItem, nextNeighborItem, currentDownNeighborItem, downNeighborItem, nextDownNeighborItem, lastItem, lastNeighborItem, nextLastNeighborItem);\n\n if(maxSum <=sum){\n maxSum = sum;\n row = rows;\n col = column;\n }\n }\n }\n System.out.println(\"Sum = \" + maxSum);\n System.out.printf(\"%s %s %s\\n\",matrix[row][col], matrix[row][col + 1],matrix[row][col + 2]);\n System.out.printf(\"%s %s %s\\n\",matrix[row + 1][col],matrix[row + 1][col + 1], matrix[row + 1][col + 2]);\n System.out.printf(\"%s %s %s\",matrix[row + 2][col], matrix[row + 2][col + 1], matrix[row + 2][col + 2]);\n }", "public int maxSumSubmatrix(int[][] matrix, int k) {\n int res=Integer.MIN_VALUE; \n int rows=matrix.length, cols=matrix[0].length; \n int[][] areas=new int[rows][cols];\n for(int i=0; i<rows; i++){\n for(int j=0; j<cols; j++){\n int area=matrix[i][j];\n if(i>0) area+=areas[i-1][j];\n if(j>0) area+=areas[i][j-1];\n if(i>0 && j>0) area-=areas[i-1][j-1];\n areas[i][j]=area;\n }\n }\n \n for(int r1=0; r1<rows; r1++){\n for(int c1=0; c1<cols; c1++){\n for(int r2=r1; r2<rows; r2++){\n for(int c2=c1; c2<cols; c2++){\n int sec=areas[r2][c2];\n if(r1>0) sec-=areas[r1-1][c2];\n if(c1>0) sec-=areas[r2][c1-1];\n if(r1>0 && c1>0) sec+= areas[r1-1][c1-1];\n if(sec<=k) res=Math.max(sec, res);\n }\n }\n }\n }\n return res;\n }", "Integer getMaximumResults();", "public static void main(String[] args) {\n int[] input = {-1};\n ArrayMaxSub arrayMaxSub = new ArrayMaxSub();\n int ret = arrayMaxSub.maxSubArray(input);\n System.out.println(\"ret : \" + ret);\n }", "static int countOfSubsetsOfSum(int[] arr,int sum){\n int n = arr.length;\n int[][] dp = new int[n + 1][sum + 1];\n\n for (int j = 0;j<=sum; j++){\n dp[0][j] = 0;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = 1;\n }\n\n for (int i=1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }", "public int getMaxCombinationsInRegion();", "public static void main(String[] args) {\n\t\tLargest_Divisible_Subset largestSubset = new Largest_Divisible_Subset();\n\t\t//int[] nums = { 2, 3, 8, 9, 27 };\n\t\tint[] nums = { 1, 3, 9, 18, 90, 180, 360, 720, 54, 108, 540 }; // [1,3,9,18,90,180,360,720]\n\t\t//List<Integer> ans = largestSubset.largestDivisibleSubset(nums);\n\t\tList<Integer> ans = largestSubset.largestDivisibleSubset_DFS(nums);\n\t\tfor (Integer i : ans) {\n\t\t\tSystem.out.print(i + \" \");\n\t\t}\n\n\t}", "public static int circularArrayMaxSubarraySum(int[] arr) {\n\t\tint ceNotWrapping = kadane(arr);\n\n\t\t// Case 2 : CE are wrapping\n\t\tint totalSum = 0;\n\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\ttotalSum += arr[i];\n\t\t\tarr[i] = -arr[i];\n\t\t}\n\n\t\tint nonContributingElementSum = kadane(arr);\n\n\t\tint ceWrapping = totalSum + nonContributingElementSum;\n\n\t\treturn Math.max(ceNotWrapping, ceWrapping);\n\n\t}", "static void miniMaxSum(int[] arr) {\n int min=arr[0];\n int max=0;\n long maxsum=0,minsum=0;\n for(int i:arr)\n {\n if(i<min)\n {\n min=i;\n }\n if(i>max)\n {\n max=i;\n }\n }\n for(int i:arr)\n {\n if(i==max)\n {\n max=0;\n continue;\n }\n else\n {\n minsum+=i;\n }\n }\n for(int i:arr)\n {\n if(i==min)\n {\n min=0;\n continue;\n }\n else\n {\n maxsum+=i;\n }\n }\n System.out.println(minsum+\" \"+maxsum);\n }", "public static int maxSubArray1(int[] nums) {\n if (nums.length == 1) {\n return nums[0];\n }\n\n int max = nums[0], maxSubArrayPre = nums[0];\n\n for (int i = 1; i < nums.length; i++) {\n int temp = maxSubArrayPre + nums[i];\n // Kadane algorithms\n maxSubArrayPre = Math.max(temp, nums[i]);\n if (maxSubArrayPre > max) {\n max = maxSubArrayPre;\n }\n }\n\n return max;\n }", "public static void main(String[] args) {\n \tint nums[] = {-2,1,-3,4,-1,2,1,-5,4};\n \tSystem.out.println(\"Final maximum contiguous number is \" + maxSubArray(nums));\n }", "public int maxSubArray(int[] nums) {\n\t\tint max;\n\n\t\tif (nums.length == 0)\n\t\t\tmax = 0;\n\t\telse {\n\t\t\tmax = nums[0];\n\n\t\t\tint curMax = nums[0];\n\t\t\tfor (int idxEnd = 1; idxEnd < nums.length; idxEnd++) {\n\t\t\t\tint curr = nums[idxEnd];\n\t\t\t\tcurMax = curMax + curr;\n\t\t\t\tif (curr > curMax) {\n\t\t\t\t\tcurMax = curr;\n\t\t\t\t}\n\n\t\t\t\tif (curMax > max) {\n\t\t\t\t\tmax = curMax;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(max);\n\t\treturn max;\n\t}", "static void miniMaxSum(int[] arr) {\n\t\tlong max = Long.MIN_VALUE;\n\t\tlong min = Long.MAX_VALUE;\n\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tlong compareMax = sum(i, arr);\n\t\t\tlong compareMin = sum(i, arr);\n\n\t\t\tif (max < compareMax)\n\t\t\t\tmax = compareMax;\n\t\t\tif (min > compareMin)\n\t\t\t\tmin = compareMin;\n\n\t\t}\n\t\tSystem.out.print(min);\n\t\tSystem.out.print(\" \");\n\t\tSystem.out.print(max);\n\t}", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int arr[][] = new int[6][6];\n for(int i=0; i < 6; i++){\n for(int j=0; j < 6; j++){\n arr[i][j] = in.nextInt();\n }\n }\n int ans=maxSum(arr);\n System.out.printf(\"%d\",ans);\n }", "public int getMaxTotalCost();", "private int maxIndex(int[] sums) {\n\t\tint index = 0;\n\t\tint max = 0;\n\t\tfor(int i = 0; i < sums.length-1; i++) {\n\t\t\tif(sums[i] > max) {\n\t\t\t\tmax = sums[i];\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}", "public static int getMaxSum(int[] arr) {\n int maxSum = 0;\n int sum = 0;\n for (int i : arr) {\n sum += i;\n if (maxSum < sum) maxSum = sum;\n else if (sum < 0) sum = 0;\n }\n return maxSum;\n }" ]
[ "0.70561427", "0.7048909", "0.7035349", "0.70063555", "0.68916816", "0.68700415", "0.6806787", "0.6803358", "0.6777564", "0.6765908", "0.6752209", "0.67241985", "0.66849566", "0.6654772", "0.66496634", "0.6593403", "0.65729064", "0.6567019", "0.6562096", "0.65568286", "0.6552806", "0.65463954", "0.65290886", "0.6527954", "0.6491561", "0.64742863", "0.6458524", "0.64484864", "0.64467937", "0.64467853", "0.6408374", "0.63510525", "0.63450474", "0.6318881", "0.6311303", "0.6240936", "0.6232115", "0.62169325", "0.6212167", "0.61716247", "0.61587834", "0.61377424", "0.61328346", "0.61260164", "0.61012197", "0.6098718", "0.6091664", "0.6091522", "0.6077729", "0.60612726", "0.60524714", "0.60495716", "0.6045517", "0.6044109", "0.6030794", "0.6016142", "0.6011437", "0.60060525", "0.59952646", "0.59941506", "0.59679246", "0.59596866", "0.5957626", "0.5949654", "0.59385985", "0.59045535", "0.59022325", "0.589129", "0.58857715", "0.58762574", "0.5870883", "0.58706355", "0.58692414", "0.58616316", "0.58495754", "0.58412856", "0.5833476", "0.58283496", "0.58278567", "0.580487", "0.5804789", "0.5796106", "0.578663", "0.5785155", "0.5782348", "0.5772228", "0.5765332", "0.5763984", "0.5762009", "0.5760445", "0.57482815", "0.5743393", "0.5709379", "0.57035357", "0.57001716", "0.56904936", "0.56885797", "0.5681117", "0.5677011", "0.5668517" ]
0.78714776
0
TODO: Return the communication channel to the service.
@Override public IBinder onBind(Intent intent) { throw new UnsupportedOperationException("Not yet implemented"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Channel channel() {\n return channel;\n }", "public IChannel getChannel() {\n\t\treturn message.getChannel();\n\t}", "SocketChannel getChannel();", "EzyChannel getChannel();", "public Channel getChannel()\n {\n return channel;\n }", "java.lang.String getChannel();", "protected Channel getChannel()\n {\n return mChannel;\n }", "@Override\n public int getChannel()\n {\n return channel;\n }", "public SocketChannel getChannel() {\n return channel;\n }", "public Channel getChannel()\n\t{\n\t\treturn channel;\n\t}", "public Channel getChannel() {\n return channel;\n }", "private ManagedChannel getManagedChannel() {\n return ManagedChannelBuilder.forAddress(\"localhost\", mGrpcPortNum)\n .usePlaintext()\n .build();\n }", "public Channel getChannel() {\r\n\t\treturn channel;\r\n\t}", "public int GetChannel();", "public ChannelManager getChannelManager() {\n return channelMgr;\n }", "public String getChannel() {\r\n return channel;\r\n }", "public String getChannel() {\n return channel;\n }", "public Channel getChannel() throws ConnectException\n {\n return getChannel(null);\n }", "public Object getCommunicationChannel()\r\n\t\t\tthrows PersistenceMechanismException {\n\t\treturn null;\r\n\t}", "public Channel channel()\r\n/* 36: */ {\r\n/* 37: 68 */ return this.channel;\r\n/* 38: */ }", "public String getChannel() {\r\n\t\treturn this.channel;\r\n\t}", "private SocketChannel getChannel(){\n if ( key == null ) {\n return getSocket().getChannel();\n } else {\n return (SocketChannel)key.channel();\n }\n }", "public String getChannel() {\n\t\treturn channel;\n\t}", "public String getChannel() {\n\t\treturn channel;\n\t}", "public int getChannel() {\n return channel;\n }", "public interface Channel\r\n{\r\n /**\r\n * Get a duplex connection for this channel. This method must be called for each request-response message exchange.\r\n * @param msgProps message specific properties\r\n * @param xmlOptions XML formatting options\r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n DuplexConnection getDuplex(MessageProperties msgProps, XmlOptions xmlOptions) throws IOException, \r\n WsConfigurationException;\r\n \r\n /**\r\n * Get a send-only connection for this channel. This method must be called for each message to be sent without a\r\n * response.\r\n * @param msgProps message specific properties\r\n * @param xmlOptions XML formatting options\r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n OutConnection getOutbound(MessageProperties msgProps, XmlOptions xmlOptions) throws IOException, \r\n WsConfigurationException;\r\n \r\n /**\r\n * Get a receive-only connection for this channel. This method must be called for each message to be received, and\r\n * will wait for a message to be available before returning.\r\n * \r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n InConnection getInbound() throws IOException, WsConfigurationException;\r\n \r\n /**\r\n * Close the channel. Implementations should disconnect and free any resources allocated to the channel.\r\n * @throws IOException on I/O error\r\n */\r\n void close() throws IOException;\r\n}", "public int getChannel() {\r\n\t\treturn channel;\r\n\t}", "public Byte getChannel() {\n return channel;\n }", "public SocketChannel getChannel() { return null; }", "public ChannelFuture getChannelFuture() {\n return channelFuture;\n }", "public interface ChannelsService {\n\n /**\n * Gets the Facebook data-ref to create send to messenger button.\n *\n * @param callback Callback with the result.\n */\n void createFbOptInState(@Nullable Callback<ComapiResult<String>> callback);\n }", "private static ManagedChannel getManagedChannel(int port) {\n return ManagedChannelBuilder.forAddress(\"localhost\", port)\n .usePlaintext(true)\n .build();\n }", "protected SocketChannel getSocket() {\n\t\treturn channel;\n\t}", "public interface MessagingService {\n\n /**\n * Checks whether message receivers are registered for this channel.\n * \n * @param ccid the channel id\n * @return <code>true</code> if there are message receivers on this channel,\n * <code>false</code> if not.\n */\n boolean hasMessageReceiver(String ccid);\n\n /**\n * Passes the message to the registered message receiver.\n * \n * @param ccid the channel to pass the message on\n * @param serializedMessage the message to send (serialized SMRF message)\n */\n void passMessageToReceiver(String ccid, byte[] serializedMessage);\n\n /**\n * Check whether the messaging component is responsible to send messages on\n * this channel.<br>\n * \n * In scenarios with only one messaging component, this will always return\n * <code>true</code>. In scenarios in which channels are assigned to several\n * messaging components, only the component that the channel was assigned\n * to, returns <code>true</code>.\n * \n * @param ccid\n * the channel ID or cluster controller ID, respectively.\n * @return <code>true</code> if the messaging component is responsible for\n * forwarding messages on this channel, <code>false</code>\n * otherwise.\n */\n boolean isAssignedForChannel(String ccid);\n\n /**\n * Check whether the messaging component was responsible before but the\n * channel has been assigned to a new messaging component in the mean time.\n * \n * @param ccid the channel id\n * @return <code>true</code> if the messaging component was responsible\n * before but isn't any more, <code>false</code> if it either never\n * was responsible or still is responsible.\n */\n boolean hasChannelAssignmentMoved(String ccid);\n}", "org.apache.drill.exec.proto.UserBitShared.RpcChannel getChannel();", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n }\n }", "public final int getChannel() {\n return device.getChannel();\n }", "public String getChannelName()\r\n\t{\r\n\t\treturn this.sChannelName;\r\n\t}", "public ChannelLogger getChannelLogger() {\n return this.channelLogger;\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n }\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\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 channel_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public NotificationsChannel getChannel(String channelId) throws Exception;", "java.lang.String getChannelName();", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\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 channel_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public TextChannel getSupportChannel() { return supportChannel; }", "public ChannelLocator getChannelLocator();", "com.google.protobuf.ByteString\n getChannelBytes();", "private SmartCardChannel getChannel() throws UsbDeviceException, NotAvailableUSBDeviceException{\n\t\tif(this.channel != null){\n\t\t\treturn this.channel;\n\t\t}\n\t\tif(getUsbInterface() != null){\n\t\t\tif (!getUsbDeviceConnection().claimInterface(getUsbInterface(), true)) {\n\t\t\t\tthrow new NotAvailableUSBDeviceException(\"Imposible acceder al interfaz del dispositivo USB\"); //$NON-NLS-1$\n\t\t\t}\n\t\t\tthis.channel = new SmartCardChannel(getUsbDeviceConnection(), getUsbInterface());\n\t\t\treturn this.channel;\n\t\t}\n\t\tthrow new UsbDeviceException(\"usbInterface cannot be NULL\"); //$NON-NLS-1$\n\t}", "public String getChannel() {\n if(this.isRFC2812())\n return this.getNumericArg(1);\n else\n return this.getNumericArg(0);\n }", "@PreAuthorize(\"hasRole('superman')\")\n\tpublic abstract Channel getChannel(String name);", "public interface Channels {\n \n public void createChannel();\n\n}", "public int getChannelId( ) {\r\n return channelId;\r\n }", "public String getChannelId()\n {\n return channelId;\n }", "public Channel method_4090() {\n return null;\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\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 channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n\tpublic int getChannel() {\n\t\treturn super.getDeviceID();\n\t}", "public interface ChannelServiceI {\r\n Channel createChannel(Channel channel);\r\n\r\n int updateChannelUser(int id);\r\n\r\n int minusChannelUser(int id);\r\n\r\n List<Channel> getChannelPage(Channel channel);\r\n\r\n int count();\r\n\r\n Channel getChannel(String channelToken);\r\n\r\n List<Channel> getUserChannel(Channel channel);\r\n\r\n int deleteUser(Integer id);\r\n\r\n List<Channel> getUserChannelTotal(Channel channel);\r\n\r\n int updateChannel(Channel channel);\r\n}", "protected Channel connect() {\n\t\t\tif (channel == null) {\n\t\t\t\tinit();\n\t\t\t}\n\t\t\tSystem.out.println(\"channel === \"+channel);\n\t\t\tif (channel.isDone() && channel.isSuccess())\n\t\t\t\treturn channel.channel();\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"Not able to establish connection to server\");\n\t\t}", "public abstract ManagedChannelBuilder<?> delegate();", "public io.grpc.channelz.v1.Channel getChannel(int index) {\n if (channelBuilder_ == null) {\n return channel_.get(index);\n } else {\n return channelBuilder_.getMessage(index);\n }\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "java.lang.String getChannelToken();", "java.lang.String getChannelToken();", "public String getChannelId()\r\n\t{\r\n\t\treturn this.sChannelId;\r\n\t}", "String getServerConnectionChannelName();", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\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 channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Bean\n\tpublic DirectChannel requestChooserOutputChannel() {\n\t\treturn MessageChannels.direct().get();\n\t}", "public ManagedChannelBuilder<?> delegate() {\n return this.delegateBuilder;\n }", "@Override\n public ScheduledExecutorService getSchedExecService() {\n return channelExecutor;\n }", "@objid (\"1bb2731c-131f-497d-9749-1f4f1e705acb\")\n Link getChannel();", "private ManagedChannel emulatedPubSubChannel() {\n if (!useEmulator) {\n throw new RuntimeException(\"You shouldn't be calling this when using the real \"\n + \"(non-emulator) implementation\");\n }\n String hostport = System.getenv(\"PUBSUB_EMULATOR_HOST\");\n return ManagedChannelBuilder.forTarget(hostport).usePlaintext().build();\n }", "public String getChannelId() {\n return channelId;\n }", "public Channel method_4112() {\n return null;\n }", "public Channel method_4121() {\n return null;\n }", "public SodiumChannel getSodiumChannel() {\n\t\t\treturn sodiumChannel;\n\t\t}", "public interface ChannelManager {\n int createChannel(String channel, long ttlInSeconds);\n int publishToChannel(String channel, String msg);\n}", "public interface ChannelConnection {\n public Channel getChannel();\n public Connector getConnector();\n}", "public io.grpc.channelz.v1.Channel getChannel(int index) {\n return channel_.get(index);\n }", "public ChannelType getChannelType() {\n return type;\n }", "@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, WsClientMessage msg) throws Exception {\n\t}", "public interface ChatPlayerService extends PlayerService, Chatter\n{\n /**\n * Sets the player's ChatTarget focus.\n * \n * @param focus The new ChatTarget to focus\n */\n void setFocus( ChatTarget focus );\n \n /**\n * Gets the player's current focus.\n * \n * @return The channel the player has focused\n */\n ChatTarget getFocus();\n \n /**\n * Gets the player's BaseComponent name.\n * \n * @return The player's BaseComponent name.\n */\n BaseComponent getComponentName();\n \n /**\n * Gets the ChatManagerImpl.\n * \n * @return The ChatManagerImpl instance\n */\n ChatManager getChatManager();\n \n /**\n * Gets the PrivateMessageTarget from the last inbound PM.\n * \n * @return The PrivateMessageTarget from the last PM received\n */\n PrivateMessageTarget getLastInboundWhisperTarget();\n \n /**\n * Sets the most recent inbound PM's PrivateMessageTarget.\n * \n * @param lastInboundWhisperTarget The new target.\n * @return This ChatPlayerService object.\n */\n ChatPlayerService setLastInboundWhisperTarget( PrivateMessageTarget lastInboundWhisperTarget );\n \n /**\n * Gets a formatted message to show all of the channels the\n * player is currently in.\n * \n * @return A formatted message showing the channels the player is in.\n */\n BaseComponent[] getChannelsJoinedMessage();\n}", "public String getSubChannel() {\r\n\t\treturn this.subChannel;\r\n\t}", "public String getChannelId() {\n\t\treturn channelId;\n\t}", "public ReadableByteChannel getByteChannel() throws IOException {\n InputStream source = getInputStream();\n \n if(source != null) {\n return Channels.newChannel(source);\n }\n return null;\n }", "public DmaChannel getChannelAt(int i);", "public interface MessageInputChannel extends\r\n Channel<MessageInput, MessageInputChannelAPI>, OneDimensional, MessageCallback {\r\n\r\n}", "public int getChannelType( ) {\r\n return 1;\r\n }", "public interface IRemoteMessageService {\n\n void unsubscribeToMessage(UnSubscribeToMessage cmd);\n\n /**\n * Sets a message element to a specified value\n */\n void setElementValue(SetElementValue cmd);\n\n void zeroizeElement(ZeroizeElement cmd);\n\n /**\n * Notifies service to send message updates to the specified ip address\n */\n SubscriptionDetails subscribeToMessage(SubscribeToMessage cmd);\n\n Set<? extends DataType> getAvailablePhysicalTypes();\n\n boolean startRecording(RecordCommand cmd);\n\n InetSocketAddress getRecorderSocketAddress();\n\n InetSocketAddress getMsgUpdateSocketAddress();\n\n void stopRecording();\n\n void terminateService();\n\n void reset();\n\n void setupRecorder(IMessageEntryFactory factory);\n\n public Map<String, Throwable> getCancelledSubscriptions();\n}", "@Test\n\tpublic void testChannel() {\n\t\tString requestXml =\n\t\t\t\t\"<FahrenheitToCelsius xmlns=\\\"http://www.w3schools.com/webservices/\\\">\" +\n\t\t\t\t\" <Fahrenheit>55</Fahrenheit>\" +\n\t\t\t\t\"</FahrenheitToCelsius>\";\n\n\t\t// Create the Message object\n\t\tMessage<String> message = MessageBuilder.withPayload(requestXml).build();\n\n\t\t// Send the Message to the handler's input channel\n\t\t//MessageChannel channel = channelResolver.resolveChannelName(\"fahrenheitChannel\");\n\t\tchannel.send(message);\n\t}", "public Message getMessageWizardChannel() {\n\t\tMessage temp = null;\n\t\t\n\t\ttry {\n\t\t\t//se ia mesajul din buffer\n\t\t\ttemp = bufferWizardChannel.take();\t\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn temp;\n\t\t\n\t}", "public MessageChannel getGameChannel() {\r\n\t\treturn gameChannel;\r\n\t}", "public Message getMessageWizardChannel() {\n\t\tMessage msg1=null;\n\t\ttry{\n\t\t\tmsg1=chann1.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn msg1;\n\t}", "void start(Channel channel, Object msg);", "@Override\n\tpublic String getChannelId()\n\t{\n\t\treturn null;\n\t}", "public String getChannelCode() {\n return channelCode;\n }", "byte[] getChannelCommand() throws IOException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n baos.write(rgbCommand(r, g, b));\n baos.write(wwcwCommand(ww, cw));\n return baos.toByteArray();\n }", "java.lang.String getChannelId();", "protected Channel createChannel() throws IOException, TimeoutException, NoSuchAlgorithmException {\n LOGGER.debug(\"Creating channel\");\n Channel channel = connectionProducer.getConnection(config).createChannel();\n LOGGER.debug(\"Created channel\");\n return channel;\n }", "public org.apache.axis.types.UnsignedInt getChannel() {\n return channel;\n }", "public interface SendService {\n\n public void sendMessage(RemotingCommand remotingCommand, long timeout);\n}" ]
[ "0.7437254", "0.73157257", "0.7183302", "0.7135984", "0.7129005", "0.71285546", "0.7090409", "0.7070889", "0.7067624", "0.7038997", "0.6988283", "0.6917885", "0.68884337", "0.67946744", "0.67914945", "0.67852235", "0.677885", "0.674656", "0.67354923", "0.6681876", "0.66714543", "0.6667951", "0.6658963", "0.6658963", "0.6637923", "0.65924364", "0.6589948", "0.65803987", "0.65801334", "0.656291", "0.6394705", "0.6370899", "0.6364142", "0.6360486", "0.63541204", "0.63400555", "0.6295168", "0.62838054", "0.6278035", "0.6249136", "0.62438136", "0.62114525", "0.6202571", "0.6174055", "0.6163322", "0.61605746", "0.6151532", "0.614542", "0.6134949", "0.61321455", "0.60943747", "0.6087775", "0.60815173", "0.60634476", "0.6059933", "0.60573", "0.6053354", "0.6047734", "0.60389555", "0.6030655", "0.6022905", "0.60092485", "0.6005142", "0.6005142", "0.60051006", "0.60014427", "0.6001328", "0.5996678", "0.59943444", "0.59914345", "0.59837997", "0.5970838", "0.59568334", "0.5928881", "0.5895364", "0.58861846", "0.58624125", "0.5857131", "0.58528924", "0.581504", "0.581163", "0.58108175", "0.58004445", "0.57914156", "0.57894915", "0.578917", "0.5776858", "0.57738584", "0.576785", "0.57609695", "0.5759547", "0.5758005", "0.57573795", "0.5743325", "0.5738268", "0.5733163", "0.57316715", "0.5726644", "0.5715349", "0.57023185", "0.5701523" ]
0.0
-1
the previous command executed
public CommandManager() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPrevCommandString() {\n if (this.history.size() == 0) {\n return \"\";\n }\n\n if (this.currIndex <= 0) {\n return this.history.get(0);\n }\n\n this.currIndex -= 1;\n return this.history.get(this.currIndex);\n }", "public static void previous() {\n\t\tsendMessage(PREVIOUS_COMMAND);\n\t}", "public void prev()\n {\n if (mHistoryIdx == 0) {\n return;\n }\n\n mCommandList.get(--mHistoryIdx).undo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }", "public String getLastCommand() {\n return lastCommand;\n }", "public void previous();", "boolean undoLastCommand() throws Exception;", "public Command getCurrentCommand();", "public void undo() {\n setExecuted(false);\n }", "final Commands getLastCommand() {\n\t\t// retornamos el ultimo comando enviado\n\t\treturn this.lastCommand;\n\t}", "public static int getLastCommandOrigin() {\n\n return m_iLastCommandOrigin;\n\n }", "public void undo() {\n\t\tif (lastCommand != null) {\n\t\t\tlastCommand.undo();\n\t\t\tlastCommand = null;\n\t\t}\n\t}", "@FXML\n private void handlePreviousCommandTextPrevious() {\n commandBox.selectPreviousCommandTextPrevious();\n }", "public void undoLast() {\t\t\n\t\tCommand command = undoStack.pop();\n\t\tcommand.undo();\n\t}", "Object previous();", "public void undo() {\n if (!history.isEmpty()) {\n Command c = history.get(0);\n c.undo();\n history.remove(0);\n future.add(0, c);\n }\n }", "boolean previousStep();", "@Override\r\n\tpublic String prev() {\n\t\tString pre;\r\n\r\n\t\tpre = p.getPrev();\r\n\r\n\t\tif (pre != null) {\r\n\t\t\tthisPrevious = true;\r\n\t\t\tinput(pre);\r\n\t\t}\r\n\t\treturn pre;\r\n\t}", "boolean redoLastCommand() throws Exception;", "public String getNextCommandString() {\n if (this.history.size() == 0) {\n return \"\";\n }\n\n if ((this.currIndex + 1) >= this.history.size()) {\n this.currIndex = this.history.size();\n return \"\";\n }\n\n this.currIndex += 1;\n return this.history.get(this.currIndex);\n }", "public DrawingCommand getLastCommand() {\r\n\t\tint i = this.commands.size() - 1;\r\n\t\tif (i >= 0) {\r\n\t\t\treturn this.commands.get(this.commands.size() - 1);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\n\tpublic String nextCommand() {\n\t\treturn null;\n\t}", "private Token previous() {\n return tokens.get(current-1);\n }", "public void prev();", "private void prevHistoryEntry()\n {\n if (this.historyPos > 0) {\n this.historyPos--;\n this.textInput.setText(this.history.get(this.historyPos));\n this.textInput.setSelection(this.history.get(this.historyPos).length());\n }\n }", "java.lang.String getCurrentrun();", "public void skipToPrevious() {\n try {\n mSessionBinder.previous(mContext.getPackageName(), mCbStub);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling previous.\", e);\n }\n }", "public void previous() {\n if (highlight.getMatchCount() > 0) {\n Point point = highlight.getPreviousMatch(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n return;\n }\n Point point = file.getPreviousModifiedPoint(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n }", "@Override\n\tpublic Menu previousMenu() {\n\t\treturn prevMenu;\n\t}", "public void previous()\n {\n if (size != 0)\n {\n current = current.previous();\n }\n\n }", "@FXML\n private void handlePreviousCommandTextNext() {\n commandBox.selectPreviousCommandTextNext();\n }", "Message getPreviousMessage();", "String getPrevious();", "public void undo() {\n\t\t\r\n\t}", "@ActionTrigger(action=\"KEY-PRVREC\", function=KeyFunction.PREVIOUS_RECORD)\n\t\tpublic void spriden_PreviousRecord()\n\t\t{\n\t\t\t\n\t\t\t\tpreviousRecord();\n\t\t\t\t// \n\t\t\t\t\n\t\t\t\ttry { \n\t\t\t\t\tMessageServices.setMessageLevel(OracleMessagesLevel.decodeMessageLevel(5));\n\t\t\t\t// \n\t\t\t\tnextBlock();\n\t\t\t\tnextBlock();\n\t\t\t\texecuteQuery();\n\t\t\t\tnextBlock();\n\t\t\t\texecuteQuery();\n\t\t\t\tnextBlock();\n\t\t\t\texecuteQuery();\n\t\t\t\tpreviousBlock();\n\t\t\t\tpreviousBlock();\n\t\t\t\tpreviousBlock();\n\t\t\t\tpreviousBlock();\n\t\t\t\t// \n\t\t\t\t\n\t\t\t\t} finally {\n\t\t\t\t\t\t\t\n\t\t\t\t\tMessageServices.setMessageLevel(OracleMessagesLevel.decodeMessageLevel(0));\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t}", "private void previous() {\n Timeline currentTimeline = simpleExoPlayerView.getPlayer().getCurrentTimeline();\n if (currentTimeline.isEmpty()) {\n return;\n }\n int currentWindowIndex = simpleExoPlayerView.getPlayer().getCurrentWindowIndex();\n\n Timeline.Window currentWindow = currentTimeline.getWindow(currentWindowIndex, new Timeline.Window());\n if (currentWindowIndex > 0 && (player.getCurrentPosition() <= MAX_POSITION_FOR_SEEK_TO_PREVIOUS\n || (currentWindow.isDynamic && !currentWindow.isSeekable))) {\n player.seekTo(currentWindowIndex - 1, C.TIME_UNSET);\n } else {\n player.seekTo(0);\n }\n }", "public synchronized void undo(){\n int index_of_last_operation = instructions.size() - 1;\n if (index_of_last_operation >= 0){\n instructions.remove(index_of_last_operation);\n }\n }", "@Override\n public CommandState getCommandState() {\n return executedDelegateCmdClone != null\n ? executedDelegateCmdClone.getCommandState()\n : super.getCommandState();\n }", "public void previous() {\n if (hasPrevious()) {\n setPosition(position - 1);\n }\n }", "String getCurrentLine();", "@Field(0) \n\tpublic Pointer<uvc_processing_unit > prev() {\n\t\treturn this.io.getPointerField(this, 0);\n\t}", "public void outputPrev() {\n --this.currentIndex;\n this.currentChName = this.operOutHeaders.get(this.currentIndex);\n }", "public String getUndoInformation() {\n return previousActionUndoString;\n }", "@Override\r\n public void undo() {\n\r\n }", "public ExtremeEntry previous() {\n\n\t\tsetLastReturned(getLastReturned().getPrevious());\n//\t\tnextIndex--;\n\t\tcheckForComodification();\n\t\treturn getLastReturned();\n\t}", "private int previousSong() {\n if (playListAdapter != null) {\n playListAdapter.clickPreviousNext(1);\n }\n serviceBound = false;\n player.stopMedia();\n if (currentSong > 0) {\n currentSong--;\n }\n return currentSong;\n }", "public String getOriginalCommand() {\n return command;\n }", "public void back() {\n //noinspection ResultOfMethodCallIgnored\n previous();\n }", "int getCommand();", "public void setLastCommand(String lastCommand) {\n this.lastCommand = lastCommand;\n }", "public String getCommandReturned() {\n return commandReturned;\n }", "@Override\n public void undo() {\n\n }", "@Override\n public void undo() {\n\n }", "public DockableState getPreviousState() {\n\t\treturn previousState;\n\t}", "public void undo() {\n }", "public void prev() {\n\t\tsynchronized (this) {\n\t\t\tint pos = getPreShuffledPos();\n\t\t\tif (pos > 0) {\n\t\t\t\tmPlayPos = mPlayOrder[pos - 1];\n\t\t\t} else {\n\t\t\t\tmPlayPos = mPlayOrder[mPlayListLen - 1];\n\t\t\t}\n\t\t\tstop(false);\n\t\t\tprepareAndPlayCurrent();\n\t\t}\n\t}", "private void replayNextOp() {\n\t\topNum++;\n\t\tif (opNum > ops.length) {\n\t\t\topNum = -1;\n\t\t\tupdate();\n\t\t} else if (!getExited()) {\n\t\t\tjavax.swing.SwingUtilities.invokeLater(doReplayNextOp);\n\t\t}\n\t}", "@Override\n\tpublic void undo()\n\t{\n\t}", "public String undo() {\n/* 145 */ return undo(0, false);\n/* */ }", "public void inputPrev() {\n --this.currentIndex;\n this.currentUnit = getUnit(this.currentIndex);\n this.currentChName = this.currentUnit.chName;\n }", "public State getPreviousState()\r\n\t{\r\n\t\treturn previousState;\r\n\t}", "@Override\n\tpublic void undo() {\n\t\t\n\t}", "@Override\n\tpublic void undo() {\n\t\t\n\t}", "@Override\n\tpublic void undo() {\n\t\t\n\t}", "public void previousChannel() {\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.PREVIOUS_CHANNEL));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.PREVIOUS_CHANNEL) {\n isSwitchingPrevious = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n };\n }", "protected String getPreviousActivityName() {\n try {\n Bundle bundle = getIntent().getExtras();\n if (bundle.getString(\"classFrom\") == null) {\n return \"\";\n } else {\n return bundle.getString(\"classFrom\");\n }\n } catch (Exception e) {\n // TODO: handle exception\n return \"\";\n }\n }", "public String getCommand() {\n\t\tString[] lines = commandLine.getText().split(\"\\n\");\n\t\treturn lines[commandLine.getLineCount() - 2];\n\t}", "public String getPreviousToken() {\n return previousToken;\n }", "@Basic\n\tpublic String getPrevMove() {\n\t\treturn prev_move;\n\t}", "SolutionChange getPreviousChange();", "public String getNextCommand() {\n System.out.println(\"Left, Right, Advance <n>, Quit , Help: \");\n return scanner.nextLine();\n }", "public boolean hasPrevious()\n {\n // TODO: implement this method\n return false;\n }", "@Override\r\n\tpublic void undo() {\n\t\tfor (int i = 0; i < command.length; i++) {\r\n\t\t\tcommand[i].undo();\r\n\t\t}\r\n\t}", "public T previous()\n {\n // TODO: implement this method\n return null;\n }", "public void preExecution() throws CommandListenerException;", "String getPrevMoves() {\n return this.prevMoves;\n }", "public String redo() {\n/* 173 */ return redo(0, false);\n/* */ }", "java.lang.String getCommand();", "public E previousStep() {\r\n\t\tthis.current = this.values[Math.max(this.current.ordinal() - 1, 0)];\r\n\t\treturn this.current;\r\n\t}", "public String getUnprocessedCommand() {\n if (currentIndex == 0) {\n // Not necessary but saves initialising a redundant string object\n return command;\n }\n if (isComplete()) {\n /* If there's no remaining command, return an empty string. This allows us to use the String\n * pool and avoid StringIndexOutOfBoundsExceptions. */\n return \"\";\n }\n return command.substring(currentIndex);\n }", "public String getOriginalInput() {\n\t\treturn commandString;\n\t}", "@Override\n public int previousIndex()\n {\n return idx-1;\n }", "private void storeViewState()\n\t{\n\t\tCommand lastCmd = project.getLastCommand();\n\t\tif (lastCmd != null)\n\t\t{\n\t\t\tlastCmd.setOptionalState(view.toJSONString(lastCmd.getProjectState()));\n\t\t}\n\t}", "public int previousIndex() {\r\n \treturn index - 1; \r\n }", "public static HystrixCommandKey getCurrentThreadExecutingCommand() {\n if (currentCommand == null) {\n // statics do \"interesting\" things across classloaders apparently so this can somehow be null ... \n return null;\n }\n return currentCommand.get().peek();\n }", "String getCommand();", "K previous();", "private void previous() {\n if (position > 0) {\n Player.getInstance().stop();\n\n // Set a new position:w\n --position;\n\n ibSkipNextTrack.setImageDrawable(getResources()\n .getDrawable(R.drawable.ic_skip_next_track_on));\n\n try {\n Player.getInstance().play(tracks.get(position));\n } catch (IOException playerException) {\n playerException.printStackTrace();\n }\n\n setImageDrawable(ibPlayOrPauseTrack, R.drawable.ic_pause_track);\n setCover(Player.getInstance().getCover(tracks.get(position), this));\n\n tvTrack.setText(tracks.get(position).getName());\n tvTrackEndTime.setText(playerUtils.toMinutes(Player.getInstance().getTrackEndTime()));\n }\n\n if (position == 0) {\n setImageDrawable(ibSkipPreviousTrack, R.drawable.ic_skip_previous_track_off);\n }\n }", "public IEvent getPreviousEvent();", "public ArrayList<String> getCommandHistory() {\r\n return commandHistory;\r\n }", "public Position2D getPreviousPosition()\n {\n return previousPosition;\n }", "@Override\r\n\t\tpublic E previous() {\n\t\t\tcaret = caret.prev();\r\n\t\t\tif (caret == null)\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\tnextIndex--;\r\n\t\t\treturn caret.n.data[caret.idx];\r\n\t\t}", "public static void undo () {\r\n\t\tCommand cmd = undoCommands.pop();\r\n\t\tcmd.undo();\r\n\t\tredoCommands.push(cmd);\r\n\t}", "public Move lastCommittedMove() {return lastCommittedMove; }", "private void previousButtonMouseClicked(java.awt.event.MouseEvent evt) {\n if(previousButton.isEnabled() == false || checkUpdateInventoryError() == true) return;\n recordChanged();\n current --;\n displayCurrentStock();\n }", "@Override\n public void updateHistory(Command c) {\n }", "public void executeLeftGame() {\r\n //COME BACK TO THIS\r\n }", "void undoPreviousAction() throws NothingToUndoException;", "public int previousIndex()\n {\n // TODO: implement this method\n return -1;\n }", "@Override\n\t/**\n\t * undo is irrelevant in this case\n\t */\n\tpublic Task[] undo() {\n\t\treturn null;\n\t}", "public synchronized void back ()\n\t// one move up\n\t{\n\t\tState = 1;\n\t\tgetinformation();\n\t\tgoback();\n\t\tshowinformation();\n\t\tcopy();\n\t}", "public void MovePrevious()\r\n {\r\n\r\n \t try{\r\n \t\t if(!rsTution.previous())rsTution.first();\r\n \t\t Display();\r\n\r\n\r\n \t }catch(SQLException sqle)\r\n \t {System.out.println(\"MovePrevious Error:\"+sqle);}\r\n }" ]
[ "0.71694934", "0.7014616", "0.68759745", "0.6472511", "0.64112926", "0.6402279", "0.63851905", "0.63094056", "0.6302164", "0.626227", "0.6254112", "0.6202121", "0.619334", "0.6182156", "0.6164179", "0.6160396", "0.611924", "0.6110499", "0.60732806", "0.60351026", "0.59838", "0.59734577", "0.5972701", "0.5962343", "0.58958966", "0.5894089", "0.588092", "0.5830325", "0.5816592", "0.5800254", "0.577945", "0.57572126", "0.57224184", "0.5706068", "0.5696295", "0.56912935", "0.5668876", "0.56626725", "0.5659768", "0.56526786", "0.56387115", "0.563844", "0.56381214", "0.56301135", "0.56284624", "0.5627057", "0.5624778", "0.56241655", "0.56218755", "0.5621368", "0.5615878", "0.5615878", "0.5609341", "0.56026703", "0.5593548", "0.5587928", "0.55873406", "0.55863607", "0.55827343", "0.5575865", "0.5568255", "0.5568255", "0.5568255", "0.55482906", "0.5545001", "0.55430824", "0.55343145", "0.55327713", "0.55313116", "0.55293494", "0.55223733", "0.5517256", "0.5516335", "0.5505009", "0.5502704", "0.54935527", "0.54890245", "0.54888284", "0.548439", "0.54818445", "0.5480862", "0.5476013", "0.5475872", "0.54719627", "0.54669297", "0.5463787", "0.54625493", "0.5454562", "0.5451112", "0.54480314", "0.5447733", "0.54461914", "0.5444633", "0.5444373", "0.54382414", "0.54342383", "0.54268825", "0.5424726", "0.5419953", "0.5417128", "0.5415316" ]
0.0
-1
empty constructor Executes the given command and stores it as our previous command.
public void executeCommand(Command c) { c.execute(); lastCommand = c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Command() {\n this.executed = false;\n }", "public Shell() {\n commandNumber = 0;\n prevPID = -1;\n command = \"\";\n }", "public AGameCommand(Command command) {\n this.game = Game.getInstance();\n this.command = command;\n }", "public Command() {\n this.arguments = new String[0];\n }", "public Command() {\n }", "public RedoCommand() {\n }", "public DrawCommand() {\n\t\tcommand = null;\n\t\targs1 = null;\n\t\targs2 = null;\n\t}", "private Query(String command) {\n\t\tthis.command = command;\n\t}", "public Command() {\r\n\t\t// If default, use a local one.\r\n\t\tmYCommandRegistry = LocalCommandRegistry.getGlobalRegistryStatic();\r\n\t}", "public Command()\r\n {\r\n this.aSecondWord = null;\r\n }", "private CommandBrocker() {}", "protected void setCommand(String command)\n {\n Command = command;\n }", "public void setCommand(String command) {\n this.command = command;\n }", "private Command() {\n initFields();\n }", "public void setCommand(String command)\n {\n this.command = command;\n }", "public void setCommand(String command) {\n _command = command;\n }", "public TodoCommand(String userInputCommand) {\n this.userInputCommand = userInputCommand;\n }", "public void setCommand(String command) {\n this.command = command;\n }", "public void setCommand(String command)\r\n\t{\r\n\t\tthis.command = command;\r\n\t}", "public CommandMAN() {\n super();\n }", "public CPRCommand()\r\n {\r\n }", "private Command createCommand(String command) {\n\t\tString[] tokens = command.split(\" \");\n\t\tswitch(tokens[0].toLowerCase()) {\n\t\tcase DRAW:\n\t\t\treturn createDrawCommand(command);\n\t\t\n\t\tcase SKIP:\n\t\t\treturn createSkipCommmand(command);\n\t\t\t\n\t\tcase SCALE:\n\t\t\treturn createScaleCommand(command);\n\t\t\t\n\t\tcase ROTATE:\n\t\t\treturn createRotateCommand(command);\n\t\t\t\n\t\tcase PUSH:\n\t\t\treturn createPushCommand();\n\t\t\t\n\t\tcase POP:\n\t\t\treturn createPopCommand();\n\t\t\t\n\t\tcase COLOR:\n\t\t\treturn createColorCommand(command);\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new IllegalArgumentException(\"Invalid command argument\");\n\t\t}\n\t}", "private CommandWord(String commandString)\n {\n this.commandString = commandString;\n }", "public DeleteCommand(String command) {\n super(command);\n }", "Command(String c, String id) {\n commandWord = c;\n pageId = id;\n\n pageValue = -1;\n }", "public CommandManager() {}", "public RemoteControl() {\n onCommands = new ArrayList<Command>(7); // concrete command.Command registers itself with the invoker\n offCommands = new ArrayList<Command>(7);\n\n Command noCommand = new NoCommand(); //Good programming practice to create dummy objects like this\n for (int i = 0;i < 7;i++) {\n onCommands.add(noCommand);\n }\n\n //Initialize the off command objects\n for (int i = 0;i < 7;i++) {\n offCommands.add(noCommand);\n }\n\n undoCommand = noCommand;\n }", "Command(String command, int parameterCount) {\n this.command = command;\n this.parameterCount = parameterCount;\n }", "public Command(Paint paint) {\n\t\tcmdPaint = new Paint(paint);\n\t\tcmdPath = null;\n\t\tcmdPoint = null;\n\t}", "public SystemCommandRequest(String command)\r\n\t{\r\n\t\tsetCommand(command);\r\n\t}", "public ExitCommand() {\n }", "public void executeNewCommand(Command cmd)\n {\n if (mHistoryIdx < mCommandList.size()) {\n if (clobber) {\n /* Overwrite (well, remove) history past this point */\n while (mHistoryIdx < mCommandList.size()) {\n mCommandList.remove(mCommandList.size() - 1);\n this.setChanged();\n this.notifyObservers(HISTORY_CLOBBERED);\n }\n } else {\n throw new RuntimeException(\n \"Cannot execute new command while not and the end of the \" +\n \"command list\");\n }\n }\n\n mCommandList.add(cmd);\n cmd.redo();\n mHistoryIdx++;\n this.setChanged();\n this.notifyObservers(cmd);\n }", "public void instantiateCommand() throws SystemException {\r\n\t\t// Check the definitation.\r\n\t\tdefinitionCheck();\r\n\t\t\r\n\t\t// Create the fresh instance.\r\n\t\tcommandInstance = new ReadWriteableAttributes();\r\n\t}", "@Override\n\tpublic void setCommand(String cmd) {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate AbstractCommand() {\n\t\t//\n\t}", "Command createCommand();", "protected void setCommand(CommandManager command) {\n\tthis.command = command;\n }", "protected VmCommand(Guid commandId) {\n super(commandId);\n }", "public ItemCommand() {\n }", "protected Command(String input, String[] data) {\n this.setInput(input);\n this.setData(data);\n }", "@Override\n\tpublic void setCommand(String command) {\n\t\tmodel.setCommand(command);\n\t}", "public AbstractCommand()\n {\n this.logger = new ConsoleLogger();\n }", "public ControlCommand() {\r\n\t\tthis(CommandType.NotSet);\r\n\t}", "@Override\n public Command build() {\n switch (CommandType.fromString(commandName.getEscapedAndStrippedValue())) {\n case ASSIGN:\n return new AssignmentCommand(commandArgs);\n case CAT:\n return new CatCommand(commandArgs);\n case ECHO:\n return new EchoCommand(commandArgs);\n case WC:\n return new WcCommand(commandArgs);\n case PWD:\n return new PwdCommand(commandArgs);\n case GREP:\n return new GrepCommand(commandArgs);\n case EXIT:\n return new ExitCommand(commandArgs);\n default:\n return new OtherCommand(commandName, commandArgs);\n }\n }", "public CLI(String inputCommand)\r\n\t{\r\n\t\t//lvl = new Level();\r\n\t\tthis.inputCommand = inputCommand;\r\n\t\tin = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t}", "public RedditCommand() {\n\t\tsuper();\n\t}", "public void setCommand(Command c) {\r\n\t\tcommand = c;\r\n\t}", "public Command (int id, String name) {\n if (commands[id] != null) {\n\n } else {\n commands[id] = this;\n this.name = name;\n System.out.println(\"[Command Initialization] Command \" + name + \" successfully initialized with id \"\n + id + \" and allowable arguments:\" /*allowable args will be printed here.*/);\n }\n }", "public MethodBuilder command(String command) {\n\t\tif (!command.endsWith(\";\")) {\n\t\t\tcommand += \";\";\n\t\t}\n\t\tcommands.add(command);\n\t\treturn this;\n\t}", "public void setCommand(int command)\n\t{\n\t\tthis.command = command;\n\t}", "public Outcome(String command) {\n\t\thasAction = false;\n\t\tcommands = new ArrayList<String> ();\n\t\tString[] temp = command.split(\" \");\n\t\tfor(String i : temp) {\n\t\t\tcheckHasAction(i);\n\t\t\tcommands.add(i);\n\t\t}\n\t}", "public Commands(final Main main) {\r\n this.main = main;\r\n main.getCommand(\"fly\").setExecutor(this);\r\n }", "public MessageCommand(IMessage message, String action, String arg) {\n\t\tthis.message = requireNonNull(message);\n\t\tthis.action = requireNonNull(action).toLowerCase();\n\t\tthis.arg = arg;\n\t}", "public AbstractCommandController(Class commandClass, String commandName)\r\n/* 21: */ {\r\n/* 22:75 */ setCommandClass(commandClass);\r\n/* 23:76 */ setCommandName(commandName);\r\n/* 24: */ }", "public AbstractCommandController(Class commandClass)\r\n/* 16: */ {\r\n/* 17:66 */ setCommandClass(commandClass);\r\n/* 18: */ }", "CommandTypes(String command) {\n this.command = command;\n }", "Command(String[] commandArgs) {\n this.commandArgs = commandArgs;\n assert this.commandArgs != null : \"Command with null arguments constructed\";\n }", "public NativeExecutable(String command) {\n this.command = command;\n }", "public InstantCommand() {\n\t\t//let's all laugh really hard at the style checker...\n\t\tm_toRun = () -> {};\n\t}", "public InvalidCommand() {\n this.errorMessage = EMPTY_STRING;\n }", "UnknownCommand(String bogusCommand)\n {\n this.bogusCommand = bogusCommand; \n }", "public CommandDetail() {\n this.commandType = CommandType.UNKNOWN;\n commandData = new HashMap<String, Object>();\n }", "protected Command asCommand(Object command) {\n\t\tif (command instanceof Command) {\n\t\t\treturn (Command) command;\n\t\t} else if (command instanceof CommandBuilder) {\n\t\t\treturn ((CommandBuilder) command).build();\n\t\t} else if (command instanceof Class<?>) {\n\t\t\treturn Commands.create((Class<?>) command).build();\n\t\t} else {\n\t\t\treturn CommandAdapters.createAdapter(command);\n\t\t}\n\t}", "public State execute(int command, State state);", "PSConsoleCommand(String cmdArgs)\n {\n super();\n m_cmdArgs = cmdArgs;\n }", "protected void init(String command){\n\t\tStringTokenizer st = new StringTokenizer(command);\n\t\t\n\t\tthis.numberOfTokens = st.countTokens() ;\n\t\tthis.tokens = new String[this.numberOfTokens];\n\t\t\n\t\tString currentToken;\n\t\tint tokenNumber = 0;\n\t\t\n\t\t/*inizialize the entire array or cannot concatenate strings\n\t\tin the while belowe: looks like null!Command nullArgument1 ...*/\n\t\t//for(int i = 0; i < this.numberOfTokens; i++) this.tokens[i] = \"\";\n\t\t\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tcurrentToken = st.nextToken();\n\t\t\t//System.out.println(\"token\"+tokenNumber+\": \"+currentToken);\n\t\t\t\n\t\t\tthis.tokens[tokenNumber] = currentToken;\n\t\t\tif(tokenNumber>1)\n\t\t\t\tmiscParam += \" \"+currentToken;\n\t\t\tif(tokenNumber>0 && !currentToken.startsWith(\"$\")) \n\t\t\t\tallParam += \" \"+currentToken;\n\t\t\t\n\t\t\ttokenNumber++;\n\t\t}\n\t\t/*this is just for remove the first <space> from the second param of the command*/\n\t\t//if(this.hasAllParam()) this.tokens[2] = this.tokens[2].substring(1);\n\t}", "public Action newAction(String command) {\n\t\tif (command == null)\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"No legal command string passed!\");\n\t\tif (super.containsKey(command))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\taction.putValue(Action.ACTION_COMMAND_KEY, command);\n\t\tsuper.put(command, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}", "public static void record (Command cmd) {\r\n\t\t// Since there is just one instance of each command instantiated\r\n\t\t// when we create the GUI, we would have only one undo state \r\n\t\t// available without the clone. We need to clone the command\r\n\t\t// to support multi-level undo.\r\n\t\tundoCommands.push((Command) cmd.clone());\r\n\t}", "public CommandParser(){\n setLanguage(\"ENGLISH\");\n commandTranslations = getPatterns(new String[] {TRANSLATION});\n commands = new ArrayList<>();\n addErrors();\n }", "public ExamineCommand(){\n\t\tthis.game = null;\n\t}", "public abstract void setCommand(String cmd);", "public Command(Paint paint, Point point) {\n\t\tcmdPaint = new Paint(paint);\n\t\tcmdPath = null;\n\t\tcmdPoint = new Point(point);\n\t}", "public Commands(){\n this.power = 0;\n this.direction = 0;\n this.started = false;\n this.runTime = new ElapsedTime();\n this.timeGoal = 0;\n }", "public Sandbox(String command) {\n\tchildStdin = null;\n\tchildStdout = null;\n\tchildStderr = null;\n\tthis.command = command;\n\tprocess = null;\n\tthis.trapStderr = true;\n\tisAlive = false;\t\n }", "protected PermissionsCommandBase(Guid commandId) {\n super(commandId);\n }", "public void executeCommand(Command command) {\n\t\tcommand.execute();\n\t\tundoStack.push(command);\n\t}", "public void addCommand(Command cmd) {\n cmd.setTask(this);\n commands.add(cmd);\n }", "public void setCommand(@NonNull Command<Boolean, String> command) {\n this.command = command;\n }", "private Command createRotateCommand(String command) {\n\t\tString[] tokens = command.split(\" \");\n\t\treturn new RotateCommand(Double.parseDouble(tokens[1]));\n\t}", "public void undoComamnd(Command command){\n undoStack.add(command);\n }", "public BadCommandException(String cmd){\n super(cmd);\n }", "private Command builder(Command command) {\n if (command.getArgCount() == 0) {\n return command; }\n else if (command.getClass().getName().equals(USER_COMMAND)) {\n return createUserCommand(command); }\n else if (command.getClass().getName().equals(LIST_START)) {\n return groupBuilder(new ListBody(), LIST_END); }\n else if (command.getClass().getName().equals(GROUP_START)) {\n command = this.commands.get(0);\n this.commands = this.commands.subList(1, this.commands.size());\n return groupBuilder(command, GROUP_END); }\n else if (this.commands.size() < command.getArgCount()) {\n return new Error(\"Not enough parameters for command \" + command.toString()); }\n else {\n for (int i = 0; i < command.getArgCount(); i++) {\n command.addParameter(getCommandTree());\n }\n return command;\n }\n }", "public InvalidCommandException() {\n super(EXCEPTION_INVALID_COMMAND_MESSAGE);\n }", "final public void setActionCommand(String command) {\n this.command = command;\n }", "protected VmPoolCommandBase(Guid commandId) {\n super(commandId);\n }", "public xCommandOnText(String command){ this.init(command); }", "public MailCommand() {\n this(\"\");\n }", "public AddCommand(Event event) {\n this.event = event;\n }", "private Command(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public CommandDirector() {\n\t\t//factory = ApplicationContextFactory.getInstance();\n\t\t//context = factory.getClassPathXmlApplicationContext();\n\t\t\n\t\t//commands.put(\"createEntry\", context.getBean(\"creationEntryCommand\", CreationEntryCommand.class));\n\t\t//commands.put(\"searchEntry\", context.getBean(\"searchingEntryCommand\", SearchingEntryCommand.class));\n\t\t\n\t\tcommands.put(\"createEntry\", new CreationEntryCommand());\n\t\tcommands.put(\"searchEntry\", new SearchingEntryCommand());\n\t\t\n\t}", "private Command parseCommand(String input) {\r\n\r\n String[] splittedInput = input.toUpperCase().split(\" \");\r\n String command = splittedInput[0];\r\n\r\n switch (command) {\r\n case \"PLACE\":\r\n return new PlaceCommand(input);\r\n case \"MOVE\":\r\n return new MoveCommand();\r\n case \"LEFT\":\r\n return new RotateLeftCommand();\r\n case \"RIGHT\":\r\n return new RotateRightCommand();\r\n case \"REPORT\":\r\n return new ReportCommand();\r\n default:\r\n return new IgnoreCommand();\r\n }\r\n }", "public FrameworkCommand(String input, ObjectType init) \n {\n commandString = input.toUpperCase();\n initiator = init;\n\n // todo: verb as first word?\n \n /* This is a crummy timestamp.. We'll hope to do better in subclasses \n using scheduler instances. */\n lTimestamp = System.currentTimeMillis() * 1000;\n }", "public Builder clearCommand() {\n bitField0_ = (bitField0_ & ~0x00000001);\n command_ = getDefaultInstance().getCommand();\n onChanged();\n return this;\n }", "@Test\n public void testConstructor() {\n interpreterInstance.interpret(\"cd \");\n Command testCommand = interpreterInstance.getCommand();\n List<String> testArguments = interpreterInstance.getArguments();\n assertEquals(\"driver.ChangeDirectory\", testCommand.getClass().getName());\n assertTrue(testArguments.isEmpty());\n }", "void setNewCommand() {\n myCanvas.removeCommand(myPauseCommand);\n myCanvas.removeCommand(myGoCommand);\n myCanvas.addCommand(myNewCommand);\n }", "private Command createSkipCommmand(String command) {\n\t\tString[] tokens = command.split(\" \");\n\t\treturn new SkipCommand(Double.parseDouble(tokens[1]));\n\t}", "public void execute(Command command) {\n\t\texecute(command.getLabel(), command);\n\t}", "public ToDoCommand(String fullCommand) throws NoDescriptionException {\n if (fullCommand.equals(\"todo\")) {\n throw new NoDescriptionException(\"The description of a todo cannot be empty.\");\n }\n String[] splitCommand = fullCommand.split(\" \", 2);\n String desc = splitCommand[1];\n taskToAdd = new ToDo(desc);\n }", "public Command parse(String fullCommand) throws InvalidInputException, UnknownException {\n checkDelimiters(fullCommand);\n String[] tokens = fullCommand.split(\"\\\\s+\");\n\n // If tokenized command returns an empty array (entered a string with only white spaces),\n // raise an exception\n if (tokens.length == 0) {\n throw new InvalidInputException(InvalidInputException.Type.EMPTY_STRING);\n }\n // If first token (command) is empty, there are empty spaces typed in at the front - so we remove it\n if (tokens[0].isEmpty()) {\n tokens = Arrays.copyOfRange(tokens, 1, tokens.length);\n // Check again to make sure it is not empty after removing first element\n if (tokens.length == 0) {\n throw new InvalidInputException(InvalidInputException.Type.EMPTY_STRING);\n }\n }\n\n HashMap<String, String> arguments = new HashMap<>();\n // Conver input command to lowercase to make it case insensitive\n String command = tokens[0].toLowerCase();\n arguments.put(\"command\", command);\n\n // Default key is \"payload\"\n String key = \"payload\";\n ArrayList<String> values = new ArrayList<>();\n for (int i = 1; i < tokens.length; ++i) {\n String token = tokens[i];\n // Check whether this token is a new key\n if (!token.isEmpty() && token.charAt(0) == '/') {\n // If it is, save current value into the map and start a new k-v pair\n arguments.put(key, String.join(DELIMITER, values));\n key = token.substring(1);\n values.clear();\n } else {\n // If not, append this token to the end of the value\n values.add(token);\n }\n }\n\n // Store the last k-v pair\n // Store even when `values` is empty, as that indicates an empty string\n arguments.put(key, String.join(DELIMITER, values));\n\n // Initialize a respective class from the command (by capitalize first character)\n String className = command + \"Command\";\n className = className.substring(0, 1).toUpperCase() + className.substring(1);\n className = Constants.COMMAND_CLASS_PREFIX + className;\n try {\n Class<?> cls = Class.forName(className);\n Constructor<?> constructor = cls.getDeclaredConstructor(Ui.class, Data.class, HashMap.class);\n Object obj = constructor.newInstance(ui, data, arguments);\n return (Command) obj;\n } catch (ClassNotFoundException classNotFoundException) {\n // *Command class cannot be found!\n throw new InvalidInputException(InvalidInputException.Type.UNKNOWN_COMMAND, classNotFoundException);\n } catch (Exception exception) {\n // Some other weird error occurred here (e.g. dev bugs)\n // We should NEVER reach this block, if we do, log under the highest level\n throw new UnknownException(exception);\n }\n }", "public ICommand translate(String command) throws IllegalArgumentException{\n ArrayList<String> parsedCommand = new ArrayList<String>(Arrays.asList(command.split(\"\\\\s+\")));\n if(parsedCommand.size() <= 0)\n throw new IllegalArgumentException(\"No command specified.\");\n command = parsedCommand.remove(0);\n\n // Analyze command\n switch(command){\n case \"move\":\n case \"mv\":\n case \"m\":\n if(parsedCommand.size() == 2)\n return translateMove(parsedCommand);\n else if(parsedCommand.size() == 3)\n return translateMoveMulti(parsedCommand);\n else throw new IllegalArgumentException(\"Invalid argument count of 'move' command.\");\n \n case \"next\":\n case \"n\":\n this.expectedArgumentCount(parsedCommand, 0);\n return new CommandNext(model.getRepository());\n\n case \"renew\":\n case \"rn\":\n this.expectedArgumentCount(parsedCommand, 0);\n return new CommandRenew(model.getRepository());\n\n case \"undo\":\n case \"u\":\n return new ControlCommand(\"undo\");\n\n case \"redo\":\n case \"rd\":\n case \"r\":\n return new ControlCommand(\"redo\");\n\n case \"quit\":\n case \"q\":\n return new ControlCommand(\"quit\");\n\n case \"help\":\n this.expectedArgumentCount(parsedCommand, 0);\n this.printHelp();\n return new ControlCommand(\"none\");\n\n case \"hint\":\n case \"h\":\n this.expectedArgumentCount(parsedCommand, 0);\n return new ControlCommand(\"hint\");\n\n case \"save\":\n this.expectedArgumentCount(parsedCommand, 1);\n return new ControlCommand(\"save\", new ArrayList<String>(){{add(parsedCommand.get(0));}});\n\n case \"load\":\n this.expectedArgumentCount(parsedCommand, 1);\n return new ControlCommand(\"load\", new ArrayList<String>(){{add(parsedCommand.get(0));}});\n\n default:\n throw new IllegalArgumentException(\"Ivalid command specified. See 'help' for more informations.\");\n }\n }", "public void initDefaultCommand() {\n \n }" ]
[ "0.7317299", "0.70593864", "0.698869", "0.69685256", "0.6939187", "0.68846583", "0.6846916", "0.67997307", "0.67426217", "0.66808635", "0.6576912", "0.6571747", "0.6570214", "0.656466", "0.6552408", "0.6551686", "0.6538336", "0.6519086", "0.65019673", "0.64111924", "0.64091665", "0.6389666", "0.6387817", "0.6370744", "0.6362911", "0.635396", "0.6341846", "0.6331836", "0.63086015", "0.6306626", "0.62754995", "0.62697214", "0.62276506", "0.6219218", "0.62164813", "0.6215755", "0.6170323", "0.6165951", "0.61632806", "0.6129001", "0.61267304", "0.6113227", "0.6105186", "0.60797536", "0.6078755", "0.6072833", "0.6053216", "0.60478944", "0.6045412", "0.60412323", "0.60313624", "0.603119", "0.60274976", "0.60179263", "0.6002527", "0.59997886", "0.5994756", "0.5987536", "0.5977664", "0.5970167", "0.5961087", "0.595987", "0.59507793", "0.5948801", "0.5941029", "0.59220684", "0.5911815", "0.5906805", "0.5903515", "0.5903051", "0.5894335", "0.58937687", "0.58865577", "0.58846647", "0.58785146", "0.58705693", "0.58616513", "0.5858116", "0.5857018", "0.58535624", "0.5851851", "0.5849746", "0.5847039", "0.58350855", "0.58302146", "0.5829002", "0.58258873", "0.58181334", "0.5812775", "0.5806022", "0.5805445", "0.5802187", "0.57995194", "0.5792985", "0.5788433", "0.57883817", "0.5787367", "0.5785706", "0.5782846", "0.5781468", "0.5780839" ]
0.0
-1
Checks if there is a previous command to undo.
public boolean isUndoAvailable() { return lastCommand != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean canUndo() {\r\n\t\treturn undoCommands.isEmpty();\r\n\t}", "public boolean canUndo() {\n/* 834 */ return !Utils.isNullOrEmpty(getNextUndoAction());\n/* */ }", "public boolean isUndoPossible() {\n return (roundsHistory.size() > 1);\n }", "public boolean undo(){\n\t\tif(!(undoStack.isEmpty())){\n\t\t\tSystem.out.println(\"Undoing one move...\");\n\t\t\tredoStack.push(undoStack.pop());\n\t\t\tthis.setState(undoStack.pop());\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Undo is not available\");\n\t\t\treturn false;\n\t\t}\n\t}", "boolean undoLastCommand() throws Exception;", "public boolean canUndo() {\n return statePointer > 0;\n }", "public boolean canUndo();", "public boolean canUndo();", "private boolean canUndo() {\n return !frozen && !past.isEmpty();\n }", "public boolean canUndo()\n {\n if (undoableChanges == null || undoableChanges.size() > 0)\n return true;\n else\n return false;\n }", "public boolean undo() {\n if(undoStack.peek()!=null) {\n DrawingChange change = undoStack.pop();\n drawingArray[change.x][change.y] = change.prevChar;\n redoStack.push(change);\n return true;\n }\n return false;\n }", "@Override\n public boolean isUndo() {\n return false;\n }", "public boolean isUndoAvailable() throws ProvisioningException {\n return StateHistoryUtils.isUndoAvailable(home, log);\n }", "@Override\n public boolean canUndo() {\n return false;\n }", "public boolean canUndo() {\n return this.isUndoable;\n }", "public boolean hasPrevious() {\n return position > 0;\n }", "@Override\n public boolean undo() {\n // nothing required to be done\n return false;\n }", "public static boolean isUndoOrRedo(String command) {\r\n\t\tassert command != null;\r\n\t\tcommandType = Logic.determineCommandType(command);\r\n\t\tswitch (commandType) {\r\n\t\tcase UNDO:\r\n\t\t\treturn true;\r\n\t\tcase REDO:\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean hasPrevious()\n {\n // TODO: implement this method\n return false;\n }", "@CheckReturnValue\n public boolean hasPrevious() {\n return offset > 0;\n }", "public boolean hasPrevious() {\n\t\tif(prevIndex > -1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean hasPrevious() {\n\t\t\t\treturn false;\r\n\t\t\t}", "public boolean isNextUndoEditPageAction() {\n/* 934 */ if (!this.mPdfViewCtrl.isUndoRedoEnabled()) {\n/* 935 */ return false;\n/* */ }\n/* */ \n/* 938 */ String info = null;\n/* */ try {\n/* 940 */ info = this.mPdfViewCtrl.getNextUndoInfo();\n/* 941 */ if (sDebug)\n/* 942 */ Log.d(TAG, \"next undo: \" + info); \n/* 943 */ return isEditPageAction(this.mContext, info);\n/* 944 */ } catch (Exception e) {\n/* 945 */ if (info == null || !info.equals(\"state not found\")) {\n/* 946 */ AnalyticsHandlerAdapter.getInstance().sendException(e, \"next undo info: \" + ((info == null) ? \"null\" : info));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 951 */ return false;\n/* */ } \n/* */ }", "public void undo() {\n\t\tif (lastCommand != null) {\n\t\t\tlastCommand.undo();\n\t\t\tlastCommand = null;\n\t\t}\n\t}", "public boolean isUndoable() {\n\t\treturn false;\n\t}", "boolean undoMove();", "public boolean hasPrevious() {\n\t\t\treturn previousPosition < vector.size();\n\t\t}", "@Override\r\n\t\tpublic boolean hasPrevious() {\n\t\t\treturn false;\r\n\t\t}", "boolean redoLastCommand() throws Exception;", "boolean hasPrevious();", "boolean hasPrevious();", "boolean hasPrevious();", "boolean hasPrevious();", "@Override\r\n public boolean hasPrevious() {\r\n if (previous.data == null) {\r\n return false;\r\n }\r\n return true;\r\n }", "protected boolean showCantUndo ()\n {\n return showConfirm(\"m.cant_undo\", \"t.cant_undo\");\n }", "public boolean hasPrevious() {\r\n \treturn index > 0; \r\n }", "public boolean hasPrevious() \n\t{\n\t\tboolean res = false;\n\t\tif(actual != null) {\n\n\t\t\tif(esUltimo && actual != null)\n\t\t\t\tres=true;\n\t\t\telse {\n\t\t\t\tres = actual.darAnterior() != null;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "public boolean hasPrev() {\n return cursor != null && ((Entry<T>) cursor).prev!= null && ((Entry) cursor).prev.prev != null;\n }", "void undoPreviousAction() throws NothingToUndoException;", "@Override\r\n public boolean hasPrevious() {\n return returned.prev != header;\r\n }", "@Override\n\tpublic void onUndoNotPossible() {\n\n\t}", "public void undo() {\n if (!history.isEmpty()) {\n Command c = history.get(0);\n c.undo();\n history.remove(0);\n future.add(0, c);\n }\n }", "private void checkMatch() {\r\n if ( undoStack.size() == 2 &&\r\n undoStack.get( 0 ).getNumber() ==\r\n undoStack.get( 1 ).getNumber() ) {\r\n pop();\r\n pop();\r\n }\r\n }", "public void undo() {\n\t\tif (currentPlayer.getUndos() > 0) {\n\t\t\tcurrentPlayer.updateUndos();\n\t\t\t//System.out.println(\"Current Player's Undos!\" + currentPlayer.getUndos());\n\t\t\tturnEnd = false;\n\t\t\tmadeMove = false;\n\t\t\tboard = cloneForUndo;\n\t\t\t//printBoard();\n\t\t}\n\t}", "public boolean undo(){\n\t\t\n\t\tif(this.grillaPrevia == null){\n\t\t\treturn false;\n\t\t}else{\n\t\t\tthis.grilla= (int[][])copyArray(this.grillaPrevia);\t\n\t\t\tthis.currentKeyX = this.currentKeyXPrevia;\n\t\t\tthis.currentKeyY = this.currentKeyYPrevia;\n\t\t\tthis.selected = this.selectedPrevia;\n\t\t\tthis.grillaPrevia = null;\n\t\t\tthis.acumulatedScore -= (2*SenkuPegs.getInstance().getPegs()[this.currentPegType].getScoreValue());\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}", "public void undo() throws CannotUndoException;", "public void undoLast() {\t\t\n\t\tCommand command = undoStack.pop();\n\t\tcommand.undo();\n\t}", "public boolean hasPrevious() {\r\n if (current - 1 <= 0) {\r\n current = elem.length - 1;\r\n }\r\n return elem[current - 1] != null;\r\n }", "public void undo() {\n\t\tif (doily.lines.size() > 0) {\n\t\t\tLine line = getLastLine();\n\t\t\tdoily.lines.remove(line);\n\t\t\tredoStack.push(line);\n\t\t\tredraw();\n\t\t}\n\t\telse {\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Undo Failed - Nothing to undo\", \n\t\t\t\t\t\"Undo\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}", "void processUndo() {\r\n boardManager.undo();\r\n }", "public void prev()\n {\n if (mHistoryIdx == 0) {\n return;\n }\n\n mCommandList.get(--mHistoryIdx).undo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }", "public static void undo () {\r\n\t\tCommand cmd = undoCommands.pop();\r\n\t\tcmd.undo();\r\n\t\tredoCommands.push(cmd);\r\n\t}", "private void cmdUndo() throws NoSystemException {\n \ttry {\n\t\t\tsystem().undoLastStatement();\n\t\t} catch (MSystemException e) {\n\t\t\tLog.error(e.getMessage());\n\t\t}\n }", "public boolean isUndoEnabled() {\n return undoEnabled;\n }", "private boolean checkMovePrevious(PositionTracker tracker) {\n\t\t \n\t\t if(tracker.getExactRow() == 0) { //initiate if statement\n\t\t\t if(tracker.getExactColumn() == 0) //initiate if statement\n\t\t\t\t return false; //returns the value false\n\t\t }\n\t\t \n\t\t return true; //returns the boolean value true\n\t }", "public void undo() {\n setExecuted(false);\n }", "@Override\n public boolean hasPrevious()\n {\n if(left == null)\n {\n return false;\n }\n else\n {\n return true;\n }\n }", "public void undo() {\n // only check the action can be undo or not\n if (!this.canUndo()) {\n throw new CannotUndoException();\n }\n }", "public boolean hasPrevious() throws UnsupportedOperationException {\n\t\t\tthrow new UnsupportedOperationException( \"hasPrevious() Not implemented.\" );\n\t\t}", "public boolean hasPrevious() {\n return getPage() > 0;\n }", "public void undo() {\n if (!undos.isEmpty()) {\n Command toUndo = undos.removeLast();\n redos.addLast(toUndo);\n toUndo.undo();\n } \n }", "public void onUndo() {\n game.undoLastTurn(player1);\n game.undoLastTurn(computer);\n if (player1.getRollCount() == 0 && computer.getRollCount() == 0) {\n setDefault(\"player\");\n setDefault(\"computer\");\n undoButton.setDisable(true);\n resetButton.setDisable(true);\n } else {\n updateFields(\"player\");\n updateFields(\"computer\");\n }\n }", "@Override\r\n\tpublic void undo() {\n\t\tfor (int i = 0; i < command.length; i++) {\r\n\t\t\tcommand[i].undo();\r\n\t\t}\r\n\t}", "@Override\n\t/**\n\t * @return isUndoAble\n\t * \t\t\ttells whether the function is undo able or not;\n\t */\n\tpublic boolean isUndoAble() {\n\t\treturn isUndoAble;\n\t}", "public boolean redo(){\n\t\tif(!(redoStack.isEmpty())){\n\t\t\tSystem.out.println(\"Redoing one move...\");\n\t\t\tundoStack.push(getState());\n\t\t\tthis.setState(redoStack.pop());\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Nothing to redo\");\n\t\t\treturn false;\n\t\t}\n\t}", "void undo() {\n Move rec = _history.get(_history.size() - 1);\n int to = rec.fromIndex();\n _directions.get(to).remove(_directions.get(to).size() - 1);\n if (rec.isJump()) {\n Move middle = Move.move(rec.col1(), rec.row1(),\n rec.col0(), rec.row0(), null);\n rec = rec.jumpTail();\n while (rec != null) {\n middle = Move.move(rec.col1(), rec.row1(),\n rec.col0(), rec.row0(), middle);\n rec = rec.jumpTail();\n }\n while (middle != null) {\n set(middle.fromIndex(), EMPTY);\n set(middle.toIndex(), _whoseMove.opposite());\n set(middle.jumpedCol(), middle.jumpedRow(), _whoseMove);\n middle = middle.jumpTail();\n }\n\n } else {\n int from = rec.toIndex();\n set(to, _whoseMove.opposite());\n set(from, EMPTY);\n\n _directions.get(from).remove(_directions.get(from).size() - 1);\n }\n\n _whoseMove = _whoseMove.opposite();\n _history.remove(_history.size() - 1);\n setChanged();\n notifyObservers();\n }", "public void undo() throws IllegalStateException{\n if (undoBoards.size() > 1){\n undoBoards.pop();\n return;\n }\n throw new IllegalStateException(\"No more moves to undo\");\n }", "public void undo() {\n }", "public boolean noUndoBoard() {\n\t\treturn (cloneForUndo == null);\n\t}", "public synchronized void undo(){\n int index_of_last_operation = instructions.size() - 1;\n if (index_of_last_operation >= 0){\n instructions.remove(index_of_last_operation);\n }\n }", "public void undoClick(){\n //For Two Player Games\n if (activity.getPlayerVsPlayer()) {\n undoAction();\n } else {\n //One Player games vs the computer\n computerIsMoving = true;\n for(int i=0;i<2;i++) {\n undoAction();\n }\n computerIsMoving = false;\n }\n }", "public boolean canRedo() {\n return statePointer < (mementos.size() - 1);\n }", "protected abstract void internalUndo();", "void undo() {\r\n if (_moveCount > 0) {\r\n undoPosition();\r\n }\r\n }", "public void undo() {\n\t\tif (undolist.empty())\n\t\t\treturn;\n\n\t\tIHexEditorCommand comm;\n\t\tcomm = undolist.pop();\n\t\tif (comm == null)\n\t\t\treturn;\n\t\tcomm.revoke();\n\t\tredolist.push(comm);\n\n\t\tupdateStatusPanel();\n\t\tcursor.update();\n\t\tupdateActions();\n\t}", "public static boolean canRedo() {\r\n\t\treturn redoCommands.isEmpty();\r\n\t}", "public String getNextUndoAction() {\n/* 850 */ String result = \"\";\n/* 851 */ if (!this.mPdfViewCtrl.isUndoRedoEnabled() || this.mPdfViewCtrl.getDoc() == null) {\n/* 852 */ return result;\n/* */ }\n/* */ \n/* 855 */ removeUnsafeUndoRedoInfo(true);\n/* 856 */ String info = null;\n/* 857 */ JSONObject jsonObj = null;\n/* */ try {\n/* 859 */ info = this.mPdfViewCtrl.getNextUndoInfo();\n/* 860 */ if (sDebug)\n/* 861 */ Log.d(TAG, \"next undo: \" + info); \n/* 862 */ jsonObj = new JSONObject(info);\n/* 863 */ if (jsonObj.has(\"Action\")) {\n/* 864 */ String action = jsonObj.getString(\"Action\");\n/* 865 */ if (this.mContext != null && !Utils.isNullOrEmpty(action) && isValidAction(this.mContext, action)) {\n/* 866 */ String strUndo = this.mContext.getResources().getString(R.string.undo);\n/* 867 */ result = strUndo + \": \" + action;\n/* */ } \n/* */ } \n/* 870 */ } catch (Exception e) {\n/* 871 */ if (info == null || !info.equals(\"state not found\")) {\n/* 872 */ AnalyticsHandlerAdapter.getInstance().sendException(e, \"next undo info: \" + ((info == null) ? \"null\" : info));\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 877 */ if (Utils.isNullOrEmpty(result) && jsonObj != null) {\n/* */ try {\n/* 879 */ if (jsonObj.has(\"label\")) {\n/* 880 */ String label = jsonObj.getString(\"label\");\n/* 881 */ if (!label.equals(\"initial\")) {\n/* 882 */ result = this.mContext.getResources().getString(R.string.undo) + \"...\";\n/* */ }\n/* */ } \n/* 885 */ } catch (Exception e) {\n/* 886 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }\n/* */ \n/* 890 */ return result;\n/* */ }", "public boolean canRedo() {\n/* 841 */ return !Utils.isNullOrEmpty(getNextRedoAction());\n/* */ }", "public void uiVerifyButtonUndoExist() {\n try {\n getLogger().info(\"Verify button Undo Todo exist.\");\n btnToDoUndo.getAttribute(\"class\");\n NXGReports.addStep(\"Verify button Undo Todo exist.\", LogAs.PASSED, null);\n } catch (Exception ex) {\n getLogger().info(ex);\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"verify button Undo Todo exist.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "public boolean redo() { \n if(redoStack.peek()!=null) {\n DrawingChange change = redoStack.pop();\n drawingArray[change.x][change.y] = change.newChar;\n undoStack.push(change);\n return true;\n }\n return false;\n }", "public boolean hasPreviousElement() {\n return false;\n }", "public boolean hasPreviousInSet() {\n return (hasPrevious() &&\n (indexOfCurrentElement - 1 >= firstIndexOfCurrentSet) &&\n (indexOfCurrentElement - 1 < firstIndexOfCurrentSet + quantity));\n }", "public boolean hasPreviousViewInSameRow(int position) {\n return mLayoutManager.hasPreviousViewInSameRow(position);\n }", "public boolean previous() {\n boolean result = true;\n try {\n element = iterator.previous();\n } catch(NoSuchElementException ex) {\n result = false;\n }\n return result;\n }", "void undo();", "public boolean undo() {\n if (points.size()==0) {\n return false;\n }\n points.undo();\n repaint();\n return true;\n }", "public void undo() {\n\t\t\r\n\t}", "@Override\n void undo() {\n assert false;\n }", "public static void previous() {\n\t\tsendMessage(PREVIOUS_COMMAND);\n\t}", "@Override\n\tpublic void undo()\n\t{\n\t}", "boolean hasLastAction();", "private static boolean PreviousSpace() {\n //FastTextList.TempNodeCursorUpdate();\n FastTextList.WrapperTempNodeSync();\n //System.out.println(FastTextList.WordWrapNode.nextN.getTextUnit().content);\n while (FastTextList.WordWrapNode.nextN.prevN.getTextUnit().getString().charAt(0) != 32\n || FastTextList.WordWrapNode.nextN.getTextUnit().getX() == STARTING_CURSOR_X){\n if (FastTextList.WordWrapNode.nextN.getTextUnit().getX() == STARTING_CURSOR_X){\n //System.out.println(\"the whole line!!\");\n return false;\n }\n if(FastTextList.WordWrapNode.nextN.prevN == FastTextList.Sentinel\n || FastTextList.WordWrapNode.nextN.prevN.getTextUnit().getString().equals(\"NewLine\")){\n return false;\n }\n\n FastTextList.WordWrapNode.nextN = FastTextList.WordWrapNode.nextN.prevN;\n //System.out.println(FastTextList.WordWrapNode.nextN.getTextUnit().getString());\n }\n /*\n System.out.println(\"got it! it is \" + FastTextList.WordWrapNode.nextN.getTextUnit().content );\n */\n return true;\n }", "@Override\n\tpublic void undo() {\n\t\t\n\t}", "@Override\n\tpublic void undo() {\n\t\t\n\t}", "@Override\n\tpublic void undo() {\n\t\t\n\t}", "boolean hasCommand();", "boolean hasCommand();", "@Override\r\n\tpublic boolean undoCommand() {\r\n\t\ttry {\r\n\t\t\tAddPackage adp = new AddPackage(parent, (Package) child);\r\n\t\t\treturn adp.doCommand();\r\n\t\t} catch (WrongParentException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static void undoButton(){\n\t\tundoMoveClass.undoButtonHelper(board);\n\t}", "public boolean hasPreviousSet() { \n return (firstIndexOfCurrentSet > firstIndex);\n }" ]
[ "0.7874784", "0.7803436", "0.77768934", "0.7649166", "0.7625825", "0.7468498", "0.73677254", "0.73677254", "0.7278807", "0.7264471", "0.7043469", "0.69472975", "0.6831273", "0.673548", "0.671096", "0.6698784", "0.66332465", "0.6589631", "0.6587455", "0.65823615", "0.65796417", "0.65543747", "0.65416133", "0.6516196", "0.65063226", "0.64890176", "0.64720434", "0.6463791", "0.6449131", "0.6435393", "0.6435393", "0.6435393", "0.6435393", "0.6422048", "0.6377485", "0.63552", "0.6344613", "0.6344438", "0.6321359", "0.6240416", "0.621456", "0.61977375", "0.6187347", "0.61335593", "0.6132628", "0.61212903", "0.6115448", "0.6099011", "0.60702217", "0.60680676", "0.6046969", "0.60461646", "0.60268414", "0.6021635", "0.6015811", "0.60149825", "0.59983367", "0.5949399", "0.59315777", "0.5930789", "0.5925988", "0.5919412", "0.5908891", "0.5903587", "0.58790994", "0.5860052", "0.58590347", "0.58483595", "0.5846495", "0.5819629", "0.5816938", "0.58099407", "0.57992274", "0.57934505", "0.5788734", "0.5787947", "0.57848483", "0.57817215", "0.5769606", "0.5764793", "0.57576394", "0.572916", "0.5728361", "0.5726199", "0.57249147", "0.5715983", "0.5709753", "0.5703314", "0.56839275", "0.56825894", "0.5681038", "0.5665871", "0.56657714", "0.56657714", "0.56657714", "0.5661852", "0.5661852", "0.56586367", "0.56554544", "0.56536454" ]
0.7792579
2
Undoes the previous command, and sets the previous command to null.
public void undo() { if (lastCommand != null) { lastCommand.undo(); lastCommand = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void undo() {\n if (!history.isEmpty()) {\n Command c = history.get(0);\n c.undo();\n history.remove(0);\n future.add(0, c);\n }\n }", "public void undoLast() {\t\t\n\t\tCommand command = undoStack.pop();\n\t\tcommand.undo();\n\t}", "public static void undo () {\r\n\t\tCommand cmd = undoCommands.pop();\r\n\t\tcmd.undo();\r\n\t\tredoCommands.push(cmd);\r\n\t}", "public void undo() {\r\n pop( true );\r\n announce( null );\r\n }", "public void undo() {\n setExecuted(false);\n }", "public synchronized void undo(){\n int index_of_last_operation = instructions.size() - 1;\n if (index_of_last_operation >= 0){\n instructions.remove(index_of_last_operation);\n }\n }", "@Override\n public void undo() {\n Memento temp = createMemento();\n memento.restore();\n memento = temp;\n }", "public void undo() {\n if (!undos.isEmpty()) {\n Command toUndo = undos.removeLast();\n redos.addLast(toUndo);\n toUndo.undo();\n } \n }", "public static void clearUndoCommands() {\r\n\t\tundoCommands.clear();\r\n\t}", "@Override\r\n\tpublic void undo() {\n\t\tfor (int i = 0; i < command.length; i++) {\r\n\t\t\tcommand[i].undo();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void undoCommand() {\n\t\tselectionModel.removeAllFromSelectionList();\n\t\tmodel.removeElement(device);\n\t}", "public void clearCommand(){\n up = false;\n left = false;\n right = false;\n }", "public void prev()\n {\n if (mHistoryIdx == 0) {\n return;\n }\n\n mCommandList.get(--mHistoryIdx).undo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }", "public void unset(){\n\t\tcurrentInst = -1;\n\t}", "@Override\r\n\tpublic void unexecute() {\n\t\t\r\n\t\tCollections.swap(model.getListOfShapes(), model.getListOfShapes().size()-1, i); \r\n\t\t\r\n\t\t/*if(print == true) {\r\n\t\t\t\r\n\t\t\tFrame.textArea.append(\"UNDO >>> Bring to back: \" + s +\"\\n\");\r\n\t\t}\r\n\t\t\r\n\t\tprint = true;*/\r\n\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void undo() {\n\t\tfor(SetValueCommand command : setCommands){\n\t\t\tcommand.undo();\n\t\t}\n\t\tif (layoutCommand != null){\n\t\t\tlayoutCommand.undo();\n\t\t}\n\t}", "public void undo() {\n\t\t\r\n\t}", "public void clearCommand() {\r\n _board = new Board();\r\n _playing = false;\r\n }", "public void undo() {\n\t\tif (undolist.empty())\n\t\t\treturn;\n\n\t\tIHexEditorCommand comm;\n\t\tcomm = undolist.pop();\n\t\tif (comm == null)\n\t\t\treturn;\n\t\tcomm.revoke();\n\t\tredolist.push(comm);\n\n\t\tupdateStatusPanel();\n\t\tcursor.update();\n\t\tupdateActions();\n\t}", "public final void undo() {\n\t\tthis.historyManager.undo();\n\t}", "public void undo() {\n }", "public void undo() {\n target.setCombatState( oldState );\n }", "boolean undoLastCommand() throws Exception;", "public UndoableCommand undo() {\n logger.info(String.format(\"----------------[UNDOING][%s]\", this));\n return new DeleteActivityCommand(null, activityAdded);\n }", "public void undo() {\n compositionManager.ungroup(group);\n }", "@Override\r\n public void clear() {\r\n super.clear();\r\n this.commandArgs = null;\r\n this.command = null;\r\n this.notifys = null;\r\n this.ctx = null;\r\n }", "public void redoUndoneCommand() {\r\n // TODO: Fix me!!!\r\n try {\r\n char c=redo.pop();\r\n //redo.push(c);\r\n if(c=='c'){\r\n super.rotateClockwise();\r\n }\r\n if(c=='r'){\r\n super.rotateCounterClockwise();\r\n }\r\n if(c=='m'){\r\n super.moveForward();\r\n }\r\n } catch (Exception e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void undo() {\n firePropertyChange(\"undo\", null, \"enable\");\n final Drawing removeMe = myDrawingArray.get(myDrawingArray.size() - 1);\n myDrawingArray.remove(removeMe);\n myUndoStack.push(removeMe);\n myCurrentShape = new Drawing(new Line2D.Double(), Color.WHITE, 0);\n if (myDrawingArray.isEmpty()) {\n firePropertyChange(\"stack\", null, EMPTY_STRING);\n }\n repaint();\n }", "private void cmdUndo() throws NoSystemException {\n \ttry {\n\t\t\tsystem().undoLastStatement();\n\t\t} catch (MSystemException e) {\n\t\t\tLog.error(e.getMessage());\n\t\t}\n }", "@Override\n\tpublic void undo() {\n\t\tlight.off();\n\t}", "public Builder clearCmd() {\n \n cmd_ = 0;\n onChanged();\n return this;\n }", "public void undoComamnd(Command command){\n undoStack.add(command);\n }", "public void clearCommandBuffer() {\n d_AdminCommandsBuffer.clear();\n }", "void undo() {\n Move rec = _history.get(_history.size() - 1);\n int to = rec.fromIndex();\n _directions.get(to).remove(_directions.get(to).size() - 1);\n if (rec.isJump()) {\n Move middle = Move.move(rec.col1(), rec.row1(),\n rec.col0(), rec.row0(), null);\n rec = rec.jumpTail();\n while (rec != null) {\n middle = Move.move(rec.col1(), rec.row1(),\n rec.col0(), rec.row0(), middle);\n rec = rec.jumpTail();\n }\n while (middle != null) {\n set(middle.fromIndex(), EMPTY);\n set(middle.toIndex(), _whoseMove.opposite());\n set(middle.jumpedCol(), middle.jumpedRow(), _whoseMove);\n middle = middle.jumpTail();\n }\n\n } else {\n int from = rec.toIndex();\n set(to, _whoseMove.opposite());\n set(from, EMPTY);\n\n _directions.get(from).remove(_directions.get(from).size() - 1);\n }\n\n _whoseMove = _whoseMove.opposite();\n _history.remove(_history.size() - 1);\n setChanged();\n notifyObservers();\n }", "@Override\r\n\tpublic E undo() {\n\t\treturn null;\r\n\t}", "public void unsetReset() {\n\t\twasReset=false;\n\t}", "public void clear() {\r\n myCommandLine.clear();\r\n inputPositionX.clear();\r\n inputPositionY.clear();\r\n creatureHomeX = creatureHomeY = 0;\r\n myModelTokenIndex = 0;\r\n commandHistory.getMenus().get(0).getItems().clear();\r\n continuing = false;\r\n if (myAnimation != null) {\r\n myAnimation.stop();\r\n }\r\n }", "void undoPreviousAction() throws NothingToUndoException;", "public void undo () {\n // The restores must be run in the reverse order they are added.\n for (int i = restores.size() - 1; i >= 0; --i) {\n restores.get(i).run();\n }\n restores.clear();\n }", "public void undoAll() {\r\n\t\tListIterator<Command> it = stack.listIterator(stack.size());\r\n\r\n\t\twhile (it.hasPrevious())\r\n\t\t\ttry {\r\n\t\t\t\tit.previous().undo();\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t}", "@Override\r\n\tpublic void unexecute() {\n\t\t\r\n\t}", "public DrawCommand() {\n\t\tcommand = null;\n\t\targs1 = null;\n\t\targs2 = null;\n\t}", "public void unExecute()\n\t{\n\t}", "public Builder clearCommand() {\n bitField0_ = (bitField0_ & ~0x00000004);\n command_ = 0;\n onChanged();\n return this;\n }", "@Override\n\tpublic void undo() {\n\t\tsecurity.off();\n\t}", "@Override\n\tpublic void undo()\n\t{\n\t}", "private void deletePrevMoves() {\n this.prevMoves = \"\";\n }", "@Override\n public void undo() {\n\n }", "@Override\n public void undo() {\n\n }", "public Builder clearCommand() {\n bitField0_ = (bitField0_ & ~0x00000001);\n command_ = getDefaultInstance().getCommand();\n onChanged();\n return this;\n }", "public void undo() {\n if (!canUndo()) {\n throw new VersionedAssignmentList.NoUndoableStateException();\n }\n currentStatePointer--;\n resetData(assignmentListStateList.get(currentStatePointer));\n }", "public void undo() {\n\t\tcmd = new UndoCommand(editor);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}", "void undo();", "public String undo() {\n/* 145 */ return undo(0, false);\n/* */ }", "@Override\n\tpublic void undo() {\n\t\t\n\t}", "@Override\n\tpublic void undo() {\n\t\t\n\t}", "@Override\n\tpublic void undo() {\n\t\t\n\t}", "public void undoMove() {\n field.undoMove();\n }", "@Override\n public void undo(History history) throws CommandExecutionException {\n try {\n transactionManager.deleteTransaction((Integer) history.getData(\"transactionId\"));\n history.setUndone(true);\n String oldMessage = history.getDisplayString();\n String newMessage = oldMessage + \" has been undone\";\n history.setDisplayString(newMessage);\n gateway.update(history, History.class);\n } catch (Exception e) {\n throw new CommandExecutionException(e);\n }\n }", "@Override\n\tpublic String Undo() {\n\t\treturn \"Apagando la licuadora..........\" + receiver.turnOff();\n\t}", "@Override\n public void undo()\n {\n story.setEstimate(oldEstimate);\n\n if (ready) {\n story.setReadinessToReady();\n }\n }", "public void undoEquation() {\n if (eqn == null) {\n EquationList eqn = null;\n } else {\n eqn = eqn.next;\n }\n }", "public void undo() {\n\t\tif (doily.lines.size() > 0) {\n\t\t\tLine line = getLastLine();\n\t\t\tdoily.lines.remove(line);\n\t\t\tredoStack.push(line);\n\t\t\tredraw();\n\t\t}\n\t\telse {\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Undo Failed - Nothing to undo\", \n\t\t\t\t\t\"Undo\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}", "public static void previous() {\n\t\tsendMessage(PREVIOUS_COMMAND);\n\t}", "public void unReset () {\n count = lastSave;\n }", "public Builder clearCommand() {\n if (commandBuilder_ == null) {\n if (responseCase_ == 2) {\n responseCase_ = 0;\n response_ = null;\n onChanged();\n }\n } else {\n if (responseCase_ == 2) {\n responseCase_ = 0;\n response_ = null;\n }\n commandBuilder_.clear();\n }\n return this;\n }", "public void undo() {\n\t\tif (currentPlayer.getUndos() > 0) {\n\t\t\tcurrentPlayer.updateUndos();\n\t\t\t//System.out.println(\"Current Player's Undos!\" + currentPlayer.getUndos());\n\t\t\tturnEnd = false;\n\t\t\tmadeMove = false;\n\t\t\tboard = cloneForUndo;\n\t\t\t//printBoard();\n\t\t}\n\t}", "public static void clearRedoCommands() {\r\n\t\tredoCommands.clear();\r\n\t}", "void clearUndo() {\r\n while (!listOfBoards.isEmpty()) {\r\n listOfMoves.pop();\r\n listOfBoards.pop();\r\n }\r\n }", "public void destory(){\n \n }", "protected abstract void internalUndo();", "public abstract void undo();", "private void setPauseCommand() {\n myCanvas.removeCommand(myNewCommand);\n myCanvas.removeCommand(myGoCommand);\n myCanvas.addCommand(myPauseCommand);\n }", "public void clear() {\r\n\t\t// Find the last Style commands\r\n\t\tColorCommand lastColorCommand = null;\r\n\t\tLineWidthCommand lastLineWidthCommand = null;\r\n\t\tfor (int i = 0; i < this.commands.size(); i++) {\r\n\t\t\tif (this.commands.get(i) instanceof ColorCommand) {\r\n\t\t\t\tlastColorCommand = (ColorCommand) this.commands.get(i);\r\n\t\t\t}\r\n\t\t\telse if (this.commands.get(i) instanceof LineWidthCommand) {\r\n\t\t\t\tlastLineWidthCommand = (LineWidthCommand) this.commands.get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Clear the canvas\r\n\t\tthis.commands.clear();\r\n\t\t\r\n\t\t// Add back last commands\r\n\t\tif (lastColorCommand != null) {\r\n\t\t\tthis.addDrawingCommand(lastColorCommand);\r\n\t\t}\r\n\t\tif (lastLineWidthCommand != null) {\r\n\t\t\tthis.addDrawingCommand(lastLineWidthCommand);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Notify\r\n\t\tthis.setChanged();\r\n\t\tthis.notifyObservers();\r\n\t}", "public void cancelOperation() {\n\n System.out.println(\"Sorry, a problem occurred, deposit money operation is unsuccessful\");\n System.out.println(\"Current information : \");\n while (!storage.isEmpty()) {\n Command command = storage.pop();\n command.undo();\n }\n }", "void undoPlay();", "void unsetCurrentrun();", "public void undoAll() {\n firePropertyChange(\"array\", null, EMPTY_STRING);\n myDrawingArray.clear();\n myUndoStack.clear();\n myCurrentShape = new Drawing(new Line2D.Double(), Color.WHITE, 0);\n repaint();\n }", "public void undo() {\n\t\tparent.requestChange(new ModelChangeRequest(this.getClass(), parent,\n\t\t\t\t\"create\") {\n\t\t\t@Override\n\t\t\tprotected void _execute() throws Exception {\n\t\t\t\teditor.selectPage((CompositeActor) parent);\n\t\t\t\tif (child instanceof NamedObj) {\n\t\t\t\t\tComponentUtility.setContainer(child, null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void undo() {\n\t\tif(committed){\n\t\t\treturn;\n\t\t}\n\t\tboolean [][] tempGrid = grid;\n\t\tgrid = backupGrid;\n\t\tbackupGrid = tempGrid;\n\n\t\tint [] tempWidths = widths;\n\t\twidths = backupWidths;\n\t\tbackupWidths = tempWidths;\n\n\t\tint [] tempHeights = heights;\n\t\theights = backupHeights;\n\t\tbackupHeights = tempHeights;\n\n\t\tint tempMaxColumnHeight = maxColumnHeight;\n\t\tmaxColumnHeight = backupMaxColumnHeight;\n\t\tbackupMaxColumnHeight = tempMaxColumnHeight;\n\n\t\tcommit();\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 }", "Completable unfollow(UnfollowCommand command) {\n return api.unfollow(command);\n }", "public Builder clearCommand() {\n command_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public static void redo () {\r\n\t\tCommand cmd = redoCommands.pop();\r\n\t\tcmd.redo();\r\n\t\tundoCommands.push(cmd);\r\n\t}", "public void reset() {\n this.state = null;\n }", "@Override\r\n public void undo() {\r\n if (newSource != null) {\r\n edge.setSource(oldSource);\r\n } else if (newTarget != null) {\r\n edge.setTarget(oldTarget);\r\n }\r\n }", "public void remove () { this.setAsDown(); n.remove(); }", "public final void unregister(ConsoleCmd cmd) {\n cmdList.remove(cmd.name);\n }", "@Override\n void undo() {\n assert false;\n }", "public CommandReset() {\r\n setCommandName(COMMAND_NAME);\r\n setParameterRegex(RESET_PARAMETERS_REGEX);\r\n }", "public void undoAction(){}", "private void unsetLast() { this._last = false; }", "@Override\n public void revoke() {\n\t\t\tcore(HexEditorConstants.CELL_STATUS_UNDO);\n\t\t\tif (singleCommand) {\n\t\t\t\ttable.select(row);\n\t\t\t\tcursor.setSelection(row, col + 1);\n\t\t\t}\n\t\t}", "public void reset() {\n setPrimaryDirection(-1);\n setSecondaryDirection(-1);\n flags.reset();\n setResetMovementQueue(false);\n setNeedsPlacement(false);\n }", "public void undo() throws CannotUndoException;", "private void setGoCommand() {\n myCanvas.removeCommand(myPauseCommand);\n myCanvas.removeCommand(myNewCommand);\n myCanvas.addCommand(myGoCommand);\n }", "public void clear() {\n\t\tproc = \"\";\n\t}", "private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }", "public void clear() {\n history.clear();\n position = -1;\n }", "void unsetDirection();" ]
[ "0.7269156", "0.6797358", "0.6773177", "0.66857815", "0.6584197", "0.65589213", "0.65115434", "0.6476073", "0.6468877", "0.6463398", "0.64573175", "0.6443969", "0.6378114", "0.6340194", "0.63056827", "0.6285844", "0.62858045", "0.62652946", "0.6255544", "0.62135595", "0.6175822", "0.6135815", "0.61060447", "0.60760534", "0.60680485", "0.59364957", "0.5928666", "0.5912806", "0.59036577", "0.5886491", "0.5885053", "0.5867915", "0.5817679", "0.5806361", "0.5790669", "0.5787111", "0.5783921", "0.5769919", "0.57682294", "0.57604563", "0.5760149", "0.57547194", "0.5744771", "0.57362896", "0.5734486", "0.5730955", "0.57124984", "0.57085294", "0.57085294", "0.56931853", "0.5686822", "0.5668771", "0.56681484", "0.56630194", "0.56576693", "0.56576693", "0.56576693", "0.5648174", "0.5647553", "0.5632792", "0.56214356", "0.5610956", "0.5609057", "0.56021357", "0.5591281", "0.55895513", "0.55887103", "0.55881894", "0.5581731", "0.5563409", "0.5543418", "0.55390215", "0.5523282", "0.5513565", "0.55098355", "0.5508069", "0.5503208", "0.54993045", "0.5494618", "0.5493199", "0.5492583", "0.54923874", "0.5486947", "0.54840934", "0.548295", "0.54815036", "0.54776347", "0.54766196", "0.54758626", "0.546319", "0.5461233", "0.5459314", "0.5450666", "0.54460824", "0.5445766", "0.54431814", "0.5441821", "0.5432877", "0.54210734", "0.54171443" ]
0.76367706
0
The following test case is basically for the method's general functionality Test case : PASSED
@Test public void newSortingTest() { newSorting sort = new newSorting(); int[] arr = {3, 2, 6, 5, 1, 7, 4}; int[] expected = {1, 2, 3, 4, 5, 6, 7}; sort.newSorting(arr, 4); assertArrayEquals(arr, expected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\n public void test() {\n \n }", "@Override\n\tpublic void test() {\n\t\t\n\t}", "public void testOperation();", "private void test() {\n\n\t}", "@Test\n public void testCheckPositive() {\n Helper.checkPositive(1, \"obj\", \"method\", LogManager.getLog());\n }", "public int testmethod1()\n\t{\n\t\treturn 0;\n\t\t\n\t}", "public void test() {\n\t}", "public void test5() {\n\t\t\n\t}", "public void testGetBasedata() {\n }", "@Test\r\n public void dummyCanGiveXP() {\n\r\n dummy.giveExperience();\r\n\r\n assertEquals(DUMMY_EXPERIENCE, dummy.giveExperience());\r\n }", "public void testGetInsDyn() {\n }", "public void testgetParameter() throws Exception {\n\r\n\t}", "@Test\n public void matchCorrect() {\n }", "public void testaReclamacao() {\n\t}", "public void testCheckOxyEmpty() {\n }", "@Test\r\n\tpublic void testSum() { //testing the adding method\r\n\t\tnum1 = 2; \r\n\t\tnum2 = 8;\r\n\t\tresult = calculate.sum(num1, num2); //result stores the method of add\r\n\t\texpected = 10;\r\n\t\t\r\n\t\tassertEquals(expected,result); //compares add to the expected, if no match then error \r\n\t}", "@Test\n public void accuseSuccesTest() throws Exception {\n }", "public void test() {\n }", "public void test() {\n }", "public void sampleOperation() {\n\t}", "private test5() {\r\n\t\r\n\t}", "@Test\n\tpublic void method1SC() {\n\t\tSystem.out.println(FaultyClass.method1(3));\n\t\tassertEquals(1, FaultyClass.method1(3));\n\t}", "public void testAltaVehiculo(){\r\n\t}", "@Test\n public void should_return_() {\n }", "@Test\n public void sayHiTest() {\n \tHelloWorldImpl hello=new HelloWorldImpl();\n \tString arg0=\"satish\";\n\t\tString arg1=\"namdeo\";\n\t\tString arg2=\"impetus\";\n\t\tString arg3=\"indore\";\n \tString actualResult=hello.sayHi(arg0,arg1, arg2, arg3);\n \t//check for result is not empty.\n \tassertNotNull(\"Result is not null\",actualResult);\n \tString expectedResult=\"Hello \"+arg0+\" \"+arg1+\" ,\"+arg2+\" ,\"+arg3;\n \t//check for equality\n \tassertThat(actualResult).isEqualTo(expectedResult);\n \t//System.out.println(\"sayHiTest result : \"+result);\n }", "public void test() {\n\n }", "@Test\n public void testWalkForPduTarget() throws Exception {\n//TODO: Test goes here... \n }", "@Test\n public void shouldProcessData() throws Exception {\n }", "public void testGenericMethod() {\n \n }", "@Test\n public void temporaryTeamClosingUnavalableOption() {\n\n }", "@Test\n public void solve1() {\n }", "public void testBidu(){\n\t}", "@Test\n public void testDAM30203001() {\n testDAM30102001();\n }", "public void test17_33() throws Exception {\n helperPass(new String[] { \"p.Foo\" }, \"getX\", \"p.Foo\", 14, 17, 14, 21);\n }", "@Test\n public void is_totalPrice_Is_displayed_properly_Added_To_The_Menu_Failure_Senario(){\n int isTotalNotPriceDisplayed = restaurant.getTotalPriceWrongMethodCalled().size();\n restaurant.getTotalPriceWrongMethodCalled(\"InCorrect Amount Displayed\", isTotalNotPriceDisplayed);\n System.out.println(\"Method Does not exists\");\n assertEquals(isTotalNotPriceDisplayed,restaurant.getTotalPriceWrongMethodCalled().size());\n\n\n }", "@Test\r\n\tpublic void testSanity() {\n\t}", "@Test (priority=1)\n\tpublic void TestCase1() {\n\t\tapp.log(\"------TESTING TEST CASE 1-----\");\n\t\tActualResult=app.Method1();//execute the method 1 and Result can be accessed using the Map reference\n\t\t\n\t\t//add every assertion in a try-catch block \n\t\ttry{\n\t\tAssert.assertEquals(\"Key 1\",ActualResult.get(\"key1\"));//assert(expected, actual value)\n\t\t}catch(Throwable t){\n\t\t\tErrorUtil.addVerificationFailure(t);\n\t\t\tapp.log(\"Value is incorrect\");\n\t\t\t}\n\t\t}", "@Test\n public void testAttack() {\n enemy.attack(1, enemy);\n assertEquals(enemy.getHealth(), 90);\n \n hero.attack(2, hero);\n assertEquals(hero.getHealth(), 85);\n \n \n System.out.println(testName.getMethodName() + \" PASSED.\");\n }", "public void test(){\n }", "public boolean test() throws Exception {\n throw new Exception(\"Test funcationality not yet implemented: unclear API\");\n }", "@Test\n public void test_getSub_1() throws Exception {\n }", "@Override\n public void runTest() {\n }", "@Test\n public void testDAM30402001() {\n testDAM30101001();\n }", "abstract protected boolean checkMethod();", "@Test\n\tpublic void testReadTicketOk() {\n\t}", "void test02(){\n\t}", "@Test\n public void testGetAnalyzedData() {\n System.out.println(\"getAnalyzedData\");\n \n }", "@Test\r\n public void testDoctor_info() {\r\n System.out.println(\"doctor_info\");\r\n doctor instance = new doctor();\r\n instance.doctor_info();\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Override\n protected String testName(FrameworkMethod method)\n {\n return method.getName() + getName();\n }", "@Override\n\tpublic boolean test() {\n\t\treturn false;\n\t}", "@Test\n public void testGetPointId() {\n System.out.println(\"getPointId\");\n Manager instance = new Manager();\n int expResult = 0;\n int result = instance.getPointId();\n assertEquals(expResult, result);\n \n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testAddACopy() {\n }", "@Test\npublic void testCalTransactionUTF() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = ResultService.getClass().getMethod(\"calTransactionUTF\", int.class, int.class, int.class, EstimationTransactionData.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}", "@Test\n \tpublic void method1PC() {\n \t\tassertEquals(-2, FaultyClass.method1(-2));\n\t\tassertEquals(1, FaultyClass.method1(3));\n\t\t\n\t\t//test 1st IF TRUE, 2nd IF FALSE\n\t\tassertEquals(1, FaultyClass.method1(3));;\n\t\t\n\t\t//test 1st IF FALSE, 2nd IF TRUE\n\t\t//Arithmetic Exception and 100 path coverage here\n\t\tFaultyClass.method1(-1);\n }", "@Test\n public void testSuccess() {\n }", "@Test\r\n\tpublic void test() {\r\n\t}", "@Test (dataProvider=\"testdata\")\r\n\r\n\r\n\r\n\t //public void testAdd(Integer exp, Inputs i) {\r\n\r\n\t public void testAdd(Integer exp, int a, int b) {\n\r\n\t assertEquals( exp, (Integer) calci.add(a,b));\r\n\r\n\t //fail(\"expected exceotion didn't occur\");\r\n\r\n\t //assertTrue(false);\r\n\r\n\t }", "@Test\n public void testDAM30601001() {\n testDAM30102001();\n }", "Testcase createTestcase();", "@Test\n public void testCheckPz() {\n System.out.println(\"checkPz\");\n int pz = 0;\n int[] number = {1, 0};\n AbstractMethod instance = new AbstractMethodImpl();\n boolean expResult = true;\n boolean result = instance.checkPz(pz, number);\n assertEquals(expResult, result);\n\n }", "@Test\n\tpublic abstract void testTransform4();", "@Test\r\n public void testCalculate_salary() {\r\n assertEquals(2, s.calculate_salary(1, 1));\r\n }", "public void testCheck()\r\n {\n DataUtil.check(9, \"This is a test!\");\r\n }", "public void testOneOrMoreParameters() {\n int nrParameters = methodToTest.getParameterTypes().length;\n Class[] params = methodToTest.getParameterTypes();\n Object[] foo = new Object[nrParameters];\n \n // set up all parameters. Some methods are invoked with\n // primitives or collections, so we need to create them\n // accordingly\n for (int i = 0; i < nrParameters; i++) {\n try {\n if (params[i].isPrimitive()) {\n String primitiveName = params[i]\n .getName();\n if (primitiveName.equals(\"int\")) {\n foo[i] = Integer.valueOf(0);\n }\n if (primitiveName.equals(\"boolean\")) {\n foo[i] = Boolean.TRUE;\n }\n if (primitiveName.equals(\"short\")) {\n foo[i] = new Short(\"0\");\n }\n } else if (params[i].getName().equals(\"java.util.Collection\")) {\n foo[i] = new ArrayList();\n } else {\n /*\n * this call could easily fall if there is e.g. no public\n * default constructor. If it fails tweak the if/else tree\n * above to accommodate the parameter or check if we need to\n * test the particular method at all.\n */\n foo[i] = params[i].newInstance();\n }\n } catch (InstantiationException e) {\n fail(\"Cannot create an instance of : \"\n + params[i].getName()\n + \", required for \"\n + methodToTest.getName()\n + \". Check if \"\n + \"test needs reworking.\");\n } catch (IllegalAccessException il) {\n fail(\"Illegal Access to : \"\n + params[i].getName());\n }\n }\n \n try {\n methodToTest.invoke(facade, foo);\n fail(methodToTest.getName()\n + \" does not deliver an IllegalArgumentException\");\n } catch (InvocationTargetException e) {\n if (e.getTargetException() instanceof IllegalArgumentException \n || e.getTargetException() instanceof ClassCastException\n || e.getTargetException() instanceof NotImplementedException) {\n return;\n }\n fail(\"Test failed for \" + methodToTest.toString()\n + \" because of: \"\n + e.getTargetException());\n } catch (NotImplementedException e) {\n // If method not supported ignore failure\n } catch (Exception e) {\n fail(\"Test failed for \" + methodToTest.toString()\n + \" because of: \" + e.toString());\n }\n }", "@Test\n public void countInfosTest() {\n // TODO: test countInfos\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "public void testService() {\n\n\t\ttry {\n\t\t\tString nextAction = \"next action\";\n\t\t\trequest.setAttribute(\"NEXT_ACTION\", nextAction);\n\t\t\tString nextPublisher = \"next publisher\";\n\t\t\trequest.setAttribute(\"NEXT_PUBLISHER\", nextPublisher);\n\t\t\tString expertQueryDisplayed = \"expert query displayed\";\n\t\t\trequest.setAttribute(\"expertDisplayedForUpdate\", expertQueryDisplayed);\n\t\t\tupdateFieldsForResumeAction.service(request, response);\n\t\t\tassertEquals(nextAction, response.getAttribute(\"NEXT_ACTION\"));\t\t\n\t\t\tassertEquals(nextPublisher, response.getAttribute(\"NEXT_PUBLISHER\"));\n\t\t\tassertEquals(expertQueryDisplayed, singleDataMartWizardObj.getExpertQueryDisplayed());\n\t\t\t\n\t\t} catch (SourceBeanException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Unaspected exception occurred!\");\n\t\t}\n\t\t\n\t}", "@Test\n public void testGetProductInfo() throws Exception {\n }", "@Test\r\n public void test_performLogic_Accuracy2() throws Exception {\r\n instance.performLogic(null);\r\n }", "@Test\r\n public void testGetSum() {\r\n System.out.println(\"getSum\");\r\n int x = 0;\r\n int y = 0;\r\n Calculate instance = new Calculate();\r\n int expResult = 0;\r\n int result = instance.getSum(x, y);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "@Test\n public void testAddition() {\n Addition add = new Addition();\n assertEquals(\"Addition Failed!\", summation, add.AddOperation(v1, v2));\n System.out.println(\"Test for \" + v1 + \" and \" + v2 + \" has been passed!\\n\");\n }", "@Test\r\n public void testAddition() {\n }", "@Test\n\tpublic void Account_test() { Using HamCrest \t\t\n\t\t// Exercise code to run and test\n\t\t//\n\t\tmiCuenta.setHolder(this.arg1);\n\t\tString resHolder = miCuenta.getHolder(); \n\t\t//\n\t\tmiCuenta.setBalance(this.arg2);\n\t\tint resBalance = miCuenta.getBalance(); \n\t\t//\n\t\tmiCuenta.setZone(this.arg3);\n\t\tint resZone = miCuenta.getZone(); \n\t\t\t\t\t\t\n\t\t// Verify\n\t\tassertThat(this.arg1, is(resHolder));\n\t\tassertThat(this.arg2, is(resBalance)); \n\t\tassertThat(this.arg3, is(resZone)); \n\t}", "@Test\npublic void testCalFileUFP() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = ResultService.getClass().getMethod(\"calFileUFP\", int.class, int.class, int.class, EstimationFileData.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}", "@Test\r\n public void testRentOut() {\r\n }", "@Test\r\n public void elCerdoNoSePuedeAtender() {\n }", "public void testDummy()\n {\n }", "@Test\n public void testGetAccountNumberArray() {\n System.out.println(\"getAccountNumberArray\");\n AbstractMethod instance = new AbstractMethodImpl();\n instance.setAccountNumber(\"123456\");\n int[] expResult = {1, 2, 3, 4, 5, 6};\n int[] result = instance.getAccountNumberArray();\n assertArrayEquals(expResult, result);\n }", "@Test\n public void updateAccept() throws Exception {\n\n }", "public void testSetBasedata() {\n }", "void testCanGetList();", "@Test\r\n public void testGetPaymentDetails() {\r\n }", "public void testGetOrder() {\n }", "private void test2(){\n\t}", "@Test\n public void testCheckForProduct() throws Exception {\n }", "@Test \n\tpublic void get() \n\t{\n\t\tassertTrue(true);\n\t}", "@Test //This is integration test\r\n\tpublic void testCalculatePrice01() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\tassertEquals(exspectedCombinationList, calcPrice.getResult());\r\n\t}", "@Override\n public void testTwoRequiredGroups() {\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "@Ignore\n @Test\n public void test1() {\n //concat method of a String\n //str.concat(\" World\");\n String1 str = new String1();\n //expected results come from requirements. (User story could your requirement)\n //requirement - is the most important thing.\n //All of our actions should be taken according to requirements.\n String expected = \"Hello World\";\n //What the method you are testing returns is your actual result\n String actual = str.concat(\"Hello\", \" World\");\n Assert.assertEquals(expected, actual);\n }", "@Test\n\tvoid test() {\n\t\t\n\t}", "@Test\r\n public void testGetDescription() {\r\n System.out.println(\"getDescription\");\r\n \r\n String expResult = \"\";\r\n String result = instance.getDescription();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }", "@Test\n public void t1() {\n // manually verified\n RefactoringCommit instance1 = getRefactoringCommits().stream().filter(commit ->\n commit.getCommit().equals(\"5e7d64d6b2719afb1e5f4785d80d24ac5a19a782\") &&\n commit.getRefactoring().equals(\"Extract Method\") &&\n commit.getMethodMetrics().getFullMethodName().equals(\"isSameDay/2[Date,Date]\")\n ).collect(Collectors.toList()).get(0);\n\n Assert.assertNotNull(instance1);\n\n Assert.assertEquals(\"isSameDay/2[Date,Date]\", instance1.getMethodMetrics().getFullMethodName());\n Assert.assertEquals(2, instance1.getMethodMetrics().getMethodVariablesQty());\n Assert.assertEquals(1, instance1.getMethodMetrics().getMethodMaxNestedBlocks());\n Assert.assertEquals(1, instance1.getMethodMetrics().getMethodReturnQty());\n Assert.assertEquals(0, instance1.getMethodMetrics().getMethodTryCatchQty());\n }", "public void testDummy() {\n }", "@Test\npublic void testJudge() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = ResultService.getClass().getMethod(\"judge\", String.class, String.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}", "public void testDummy() {\n }", "@Test\n public void testGetFlag() {\n System.out.println(\"getFlag\");\n AbstractMethod instance = new AbstractMethodImpl();\n char[] expResult = \"pl\".toCharArray();\n char[] result = instance.getFlag();\n assertArrayEquals(expResult, result);\n\n }", "@Override\r\n\tpublic void onTestSuccess(ITestResult arg0) {\n\t\t\r\n\t}" ]
[ "0.7291286", "0.68660015", "0.6846467", "0.68420786", "0.68291503", "0.6770235", "0.6509294", "0.6496122", "0.64326614", "0.6412908", "0.6397645", "0.6356335", "0.6340777", "0.633926", "0.63106734", "0.6287859", "0.62811744", "0.6273587", "0.6258862", "0.6258862", "0.62533057", "0.62522125", "0.6251443", "0.62362874", "0.62361753", "0.62325853", "0.62253267", "0.622331", "0.62139374", "0.62104374", "0.62057495", "0.6203115", "0.6200948", "0.6196227", "0.6195018", "0.61847395", "0.61830103", "0.6182271", "0.61752135", "0.6170396", "0.6160888", "0.61469257", "0.61447287", "0.6142579", "0.6117695", "0.6105933", "0.6103223", "0.61009115", "0.6094824", "0.60779405", "0.6074353", "0.6059834", "0.60594577", "0.6058881", "0.6058757", "0.60559493", "0.6055584", "0.6054094", "0.60506004", "0.60481936", "0.60457194", "0.6043095", "0.60405284", "0.60351086", "0.602616", "0.60247505", "0.60210484", "0.6020332", "0.6019869", "0.6015116", "0.60140866", "0.60105234", "0.6009027", "0.60082257", "0.60050535", "0.6004966", "0.6003868", "0.5993425", "0.5992137", "0.5989553", "0.5989216", "0.59844387", "0.59815615", "0.598053", "0.59750885", "0.5970697", "0.5964449", "0.5962573", "0.5960064", "0.5958445", "0.595544", "0.595544", "0.59543186", "0.5954115", "0.59474874", "0.5947257", "0.5937818", "0.5936353", "0.59307194", "0.59265846", "0.59257394" ]
0.0
-1
The following test case checks for duplicates Test case : PASSED
@Test public void newSortingTest2() { newSorting sort = new newSorting(); int[] arr = {0, 5, 1, 8, 0, 0}; int[] expected = {0, 0, 0, 1, 5, 8}; sort.newSorting(arr, 4); assertArrayEquals(arr, expected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void test1() {\r\n\t\tint[] nums = {1,2,3,1,4};\r\n\t\tAssert.assertEquals(true, containsDuplicate(nums));\r\n\t}", "public void testFindDuplicates() {\r\n System.out.println(\"findDuplicates\");\r\n \r\n List<String> elements = new ArrayList<>();\r\n elements.add(\"foo\");\r\n elements.add(\"bar\");\r\n elements.add(\"abc\");\r\n elements.add(\"foo\");\r\n elements.add(\"cde\");\r\n elements.add(\"cde\");\r\n elements.add(\"efg\");\r\n elements.add(\"cde\");\r\n \r\n Set<String> expResult = new LinkedHashSet<>();\r\n expResult.add(\"foo\");\r\n \r\n LexicalChecker instance = new LexicalChecker();\r\n Set<String> result = instance.findDuplicates(elements);\r\n \r\n assertNotSame(expResult, result);\r\n \r\n expResult.add(\"cde\");\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void testHasDups() {\n var arg = new String[] {\"a\",\"b\",\"c\"};\n Sequence instance = new Sequence();\n boolean expResult = false;\n boolean result = instance.hasDups(arg);\n assertEquals(expResult, result);\n }", "static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\tSystem.out.println(oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>();\n\t\t\t\n\t\t\tString s = \"\";\n\t\t\tfor(int i=0;i<oList.size();i++)\n\t\t\t{\n\t\t\t\tif((oSet.add(oList.get(i))==false) && (!s.contains(oList.get(i))))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Duplicate: \"+oList.get(i));\n\t\t\t\t\ts+=oList.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toList = null;\n\t\t\toSet = null;\n\t\t}\n\t}", "@Test\n public void testRemoveDuplicates() {\n System.out.println(\"removeDuplicates\");\n ArrayList<String> array = new ArrayList<>(Arrays.asList(\n \"A.example.COM,1.1.1.1,NO,11,Faulty fans\",\n \"b.example.com,1.1.1.2,no,13,Behind the other routers so no one sees it\",\n \"C.EXAMPLE.COM,1.1.1.3,no,12.1,\",\n \"d.example.com,1.1.1.4,yes,14,\",\n \"c.example.com,1.1.1.5,no,12,Case a bit loose\",\n \"e.example.com,1.1.1.6,no,12.3,\",\n \"f.example.com,1.1.1.7,No,12.200,\",\n \"g.example.com,1.1.1.6,no,15.0,Guarded by sharks with lasers on their heads\"\n ));\n ArrayList<String> expResult = new ArrayList<>(Arrays.asList(\n \"A.example.COM,1.1.1.1,NO,11,Faulty fans\",\n \"b.example.com,1.1.1.2,no,13,Behind the other routers so no one sees it\",\n \"d.example.com,1.1.1.4,yes,14,\",\n \"f.example.com,1.1.1.7,No,12.200,\"\n ));\n ArrayList<String> result = BTRouterPatch.removeDuplicates(array);\n assertEquals(expResult, result);\n }", "protected boolean isDuplicate(ELesxUseCase useCase) {\n return false;\n }", "@Test\n\tpublic void testRepeatedInsert() {\n\t\tSetADT<String> items = new JavaSet<>();\n\t\titems.insert(\"A\");\n\t\titems.insert(\"B\");\n\t\titems.insert(\"C\");\n\t\titems.insert(\"C\");\n\t\t\n\t\t// No matter what, \"C\" can't be added twice.\n\t\titems.insert(\"C\");\n\t\tassertEquals(3, items.size());\n\t\t\n\t\t//double checking - same as for loop\n\t\titems.insert(\"C\");\n\t\tassertEquals(3, items.size());\n\t\t\n\t\tassertEquals(3, items.size());\n\t\tassertEquals(true, items.contains(\"A\"));\n\t\tassertEquals(true, items.contains(\"B\"));\n\t\tassertEquals(true, items.contains(\"C\"));\n\t\t\n\t}", "@Test\r\n public void testCreateTourWithoutDuplicates_MultipleDups() {\r\n Tour tour = new Tour(new int[][]{{1, 1}, {2, 2}, {1, 1}, {3, 3}, {1, 1}, {1, 1}});\r\n Tour result = tour.createTourWithoutDuplicates();\r\n Tour expected = new Tour(new int[][]{{1, 1}, {2, 2}, {3, 3}});\r\n assertTrue(result.toString(), expected.isEqual(result));\r\n }", "@Test\n public void shouldReturnUniqueCodenames()\n {\n String[] codenames = DatabaseHelper.getRandomCodenames(25);\n boolean noMatches = true;\n\n\n for (int i = 0; i < codenames.length-1; i++)\n {\n for (int j = i+1; j < codenames.length; j++)\n {\n if (codenames[i] == codenames[j])\n {\n noMatches = false;\n // Here to give more detailed feedback in case the test fails.\n System.out.println(\"Match found: \" + codenames[i] + \" \" + codenames[j]);\n }\n }\n }\n\n assert(noMatches);\n }", "@Test\n\tpublic void addSameValueTwice() {\n\t\tXSet xset = new XSet(3);\n\t\txset.add(1);\n\t\txset.add(1);\n\t\tassertTrue(xset.getSize() == 1);\n\t}", "@Test\n public void testDuplicate() throws Exception {\n\n UploadRequest uploadRequest = createRequest();\n\n // create upload - We still care about study ID and requestedOn for reporting, as well as dupe attributes.\n DynamoUpload2 upload = (DynamoUpload2) dao.createUpload(uploadRequest, TEST_STUDY, TEST_HEALTH_CODE,\n ORIGINAL_UPLOAD_ID);\n uploadIds.add(upload.getUploadId());\n assertEquals(ORIGINAL_UPLOAD_ID, upload.getDuplicateUploadId());\n assertEquals(UploadStatus.DUPLICATE, upload.getStatus());\n assertEquals(TEST_STUDY_IDENTIFIER, upload.getStudyId());\n assertEquals(MOCK_NOW.getMillis(), upload.getRequestedOn());\n\n // We don't call Upload Complete in this scenario.\n }", "public static void main(String[] args) {\n\t\tint[] a1 = {1,2,3,4,5,6,7,8,9};\n\t\tSystem.out.println(containsDuplicates(a1));\n\t\tint[] a2 = {1,2,3,4,6,6,7,8,9};\n\t\tSystem.out.println(containsDuplicates(a2));\n\n\t}", "@Test\n public void testValidateDuplicateAccounts() {\n // Same account\n Long accountId = 123l;\n BankAccount bankAccountRequest = new BankAccountImpl();\n bankAccountRequest.setAccountId(accountId);\n Locale locale = Locale.getDefault();\n ErrorMessageResponse errorMessageResponse = new ErrorMessageResponse();\n List<BankAccount> bankAccountList = new ArrayList<>();\n // EMPTY LIST no duplicate accounts held\n BankHelper\n .validateDuplicateAccounts(bankAccountRequest, locale, errorMessageResponse, bankAccountList, account);\n assertFalse(errorMessageResponse.hasErrors());\n\n // ACCOUNT ONLY HELD BY CUSTOMER\n BankAccount bankAccount = new BankAccountImpl();\n bankAccount.setAccountId(accountId);\n bankAccount.setActivatedDate(new Date(new Date().getTime() - 1000));\n bankAccountList.add(bankAccount);\n\n bankAccount = new BankAccountImpl();\n bankAccount.setAccountId(accountId);\n bankAccount.setActivatedDate(new Date());\n bankAccountList.add(bankAccount);\n\n BankHelper\n .validateDuplicateAccounts(bankAccountRequest, locale, errorMessageResponse, bankAccountList, account);\n assertFalse(errorMessageResponse.hasErrors());\n\n }", "@Test\n public void testGetDuplicateUsers() {\n UserMapping userMapping = new UserMapping();\n userMapping.setTenancy(tenancy);\n userMapping.setNhsno(\"nhsno1\");\n userMapping.setUnitcode(\"unitcodeA\");\n userMapping.setUsername(\"usernameDuplicate1-GP\");\n\n userMappingDao.save(userMapping);\n\n // this one will show\n userMapping = new UserMapping();\n userMapping.setTenancy(tenancy);\n userMapping.setNhsno(\"nhsno1\");\n userMapping.setUnitcode(\"unitcodeA\");\n userMapping.setUsername(\"usernameDuplicate1\");\n\n userMappingDao.save(userMapping);\n\n List<UserMapping> userMappings = userMappingDao.getDuplicateUsers(\"nhsno1\", \"username1\", tenancy);\n\n // should get back 1 result\n assertEquals(\"incorrect number of duplicates found for nhsno1\", 1, userMappings.size());\n\n assertEquals(\"incorrect duplicate found for nhsno1\", \"usernameDuplicate1\", userMappings.get(0).getUsername());\n }", "public void containsNoDuplicates() {\n List<Entry<T>> duplicates = Lists.newArrayList();\n for (Multiset.Entry<T> entry : LinkedHashMultiset.create(getSubject()).entrySet()) {\n if (entry.getCount() > 1) {\n duplicates.add(entry);\n }\n }\n if (!duplicates.isEmpty()) {\n failWithRawMessage(\"%s has the following duplicates: <%s>\", getDisplaySubject(), duplicates);\n }\n }", "public void testDuplicate() {\n System.out.println(\"duplicate\");\n BufferedCharSequence instance = null;\n BufferedCharSequence expResult = null;\n BufferedCharSequence result = instance.duplicate();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(testName = \"duplicateElementsFromOneArrays\")\n\t public static void commonElementsFromOneArray() \n\t {\n\t int[] my_array = {1, 2, 5, 5, 6, 6, 7, 2};\n\t \n\t for (int i = 0; i < my_array.length-1; i++)\n\t {\n\t for (int j = i+1; j < my_array.length; j++)\n\t {\n\t if ((my_array[i] == my_array[j]) && (i != j))\n\t {\n\t System.out.println(\"Duplicate Element : \"+my_array[j]);\n\t }\n\t }\n\t }\n\t }", "public boolean allDuplicatesEqual() {\n int[] input = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5};\n int dupA = findDuplicatesA(input);\n int dupB = findDuplicatesB(input);\n int dupC = findDuplicatesC(input);\n int dupD = findDuplicatesD(input);\n int dupE = findDuplicatesE(input);\n return dupA == dupB && dupA == dupC && dupA == dupD && dupA == dupE;\n }", "@Test(groups = \"Transactions Tests\", description = \"Duplicate transaction\")\n\tpublic void duplicateTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDuplicateTransactionOption();\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(2));\n\t\ttest.log(Status.PASS, \"Transaction successfully duplicated\");\n\n\t\t//Testing if there is two identical transactions in the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(2));\n\t\ttest.log(Status.PASS, \"Transaction successfully duplicated in the 'Double Entry' account\");\n\n\t}", "@Test\r\n public void testAddDuplicateRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertFalse(coffeeMaker.addRecipe(recipe1));\r\n }", "@Test\r\n public void testCreateTourWithoutDuplicates_DupAtEnd() {\r\n Tour tour = new Tour(new int[][]{{1, 1}, {2, 2}, {1, 1}});\r\n Tour result = tour.createTourWithoutDuplicates();\r\n Tour expected = new Tour(new int[][]{{1, 1}, {2, 2}});\r\n assertTrue(result.toString(), expected.isEqual(result));\r\n }", "@Test\n public void addExactDupItemTest() {\n List<Item> items = itemSrv.getAllItems();\n Assert.assertNotNull(\"List of items is null\", items);\n\n Assert.assertEquals(\"Wrong initial size of the list, should be 0\", 0, items.size());\n\n final Item item = new Item(\"item1\", \"item1 description\");\n Assert.assertEquals(\"Item adding failure\", ErrCode.ADD_SUCCESS, itemSrv.addItem(item));\n\n items = itemSrv.getAllItems();\n Assert.assertEquals(\"Total item count should be 1\", 1, items.size());\n\n // Add same exact/original/duplicate item\n Assert.assertEquals(\"Duplicate item protection fails\", ErrCode.ADD_DUPLICATE_ITEM, itemSrv.addItem(item));\n Assert.assertEquals(\"Total item count should still be 1 after adding duplicate item\", 1, itemSrv.getAllItems().size());\n Assert.assertEquals(\"Retrieved item is not the same as original\", item, items.get(0));\n }", "@Test\n\tvoid RepeatedNumberTest() \n\t{ int[] oneNum = new int[] {1};\n\t\tint[] twoDiffNums = new int[] {1, 2};\n\t\tint[] twoSameNums = new int[] {2, 2};\n\t\tint[] insideOut = new int[] {5, 4, 3, 2, 1, 1, 2, 3, 4, 5};\n\t\t\n\t\tassertFalse(utilities.RepeatedNumber(oneNum));\n\t\tassertFalse(utilities.RepeatedNumber(twoDiffNums));\n\t\tassertTrue(utilities.RepeatedNumber(twoSameNums));\n\t\tassertTrue(utilities.RepeatedNumber(insideOut));\n\t}", "@Test \r\n\t\tpublic void testinsertAll() {\n\t\t\ttestingSet = new IntegerSet();\r\n\t\t\ttestingSet.insertAll(list1);\r\n\t\t\t// create set = to unique values in list \r\n\t\t\ttestingSet2 = new IntegerSet(unique); \r\n\t\t\t// 2 set should be equal \r\n\t\t\t// assertEquals for these parameters is a deprecated method \r\n\t\t\tassertArrayEquals(testingSet.toArray(), testingSet2.toArray()); \r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t}", "public boolean isDupe(T element);", "@Override\n\tpublic void test00400Add_DuplicateRecord() throws Exception\n\t{\n\t\t// This method will not fail with Generate card numbers set to Y\n\t}", "@Test\n public void testValidateDuplicateAccountsDifferentAccount() {\n // Same account\n Long accountId = 123l;\n BankAccount bankAccountRequest = new BankAccountImpl();\n bankAccountRequest.setAccountId(accountId);\n Locale locale = Locale.getDefault();\n ErrorMessageResponse errorMessageResponse = new ErrorMessageResponse();\n List<BankAccount> bankAccountList = new ArrayList<>();\n\n // ACCOUNT HELD BY DIFFERENT CUSTOMER\n BankAccount bankAccount = new BankAccountImpl();\n bankAccount.setAccountId(accountId);\n bankAccount.setActivatedDate(new Date());\n bankAccountList.add(bankAccount);\n\n // Older activation means it will not be first in the list\n bankAccount = new BankAccountImpl();\n bankAccount.setAccountId(12345l);\n bankAccount.setActivatedDate(new Date(new Date().getTime() - 1000));\n bankAccountList.add(bankAccount);\n\n BankHelper\n .validateDuplicateAccounts(bankAccountRequest, locale, errorMessageResponse, bankAccountList, account);\n assertTrue(errorMessageResponse.hasErrors());\n }", "private List<CustStmtRecord> validateDuplicate (final List<CustStmtRecord> custStmtRecords) {\n\t\tlog.info(\"Entering {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\tfinal List<CustStmtRecord> duplicateReference = custStmtRecords\n\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(e -> Collections.frequency(custStmtRecords, e) > 1)\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\t\t;\n\t\t\t\n\t\tlog.info(\"duplicateReference {}\", duplicateReference);\n\t\t\t\n\t\tlog.info(\"Exiting {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\treturn duplicateReference;\n\t}", "public static void main(String[] args) {\n\t\tint a[] = { 1, 2, 3, 6, 7, 8, 2, 3 };\r\n\r\n\t\tSystem.out.println(\"The Duplicates in the array is: \");\r\n\t\t\r\n\t\t//1 1\r\n\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tfor (int j=i+1; j < a.length; j++) {\r\n\t\t\t\tif (a[i] == a[j]) {\r\n\t\t\t\t\tSystem.out.println(a[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public boolean checkforDuplicates(Tour tocheck) {\r\n\t\t boolean duplicate=false;\r\n\t\tfor(int t=0; t<tours.length-1;t++) {\r\n\t\t\tif(tocheck.checkforOrderDiffrence(tours[t])==false) {\r\n\t\t\t\tduplicate=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn duplicate;\r\n\t}", "@Test\n public void testRemoveDuplicates() {\n System.out.println(\"removeDuplicates\");\n assertArrayEquals(\"abcd\".toCharArray(), q1_3.removeDuplicates(\"abcd\".toCharArray()));\n assertArrayEquals(null, q1_3.removeDuplicates(null));\n assertArrayEquals(\"a****\".toCharArray(), q1_3.removeDuplicates(\"aaaaa\".toCharArray()));\n assertArrayEquals(\"a**b**\".toCharArray(), q1_3.removeDuplicates(\"aaabbb\".toCharArray()));\n assertArrayEquals(\"abcdefg*\".toCharArray(), q1_3.removeDuplicates(\"abcdefga\".toCharArray()));\n assertArrayEquals(\"abcdefg*\".toCharArray(), q1_3.removeDuplicates(\"abcdefgb\".toCharArray()));\n }", "public void testAddRejectReasons_RejectReasonsContainsDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(2);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(1);\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 0, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[3]}, duplicate);\r\n }", "private boolean duplicationCheck(String userName) {\n\t\tboolean ret = true;\n\t\tif(obs.isEmpty()) {\n\t\t\tret = true;\n\t\t}\n\t\telse {\n\t\t\tfor(int i=0; i<obs.size(); i++) {\n\t\t\t\tif(obs.get(i).getUserName().compareTo(userName) == 0) {\n\t\t\t\t\tret = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tret = true;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint[] nums = {2,3,4,5,7,6,0};\r\n\t\t\r\n\t\tSystem.out.println(containsDuplicate(nums));\r\n\r\n\t}", "@Test\n\t@DisplayName(\"test you can not register a duplicate customer\")\n\tvoid testCustomers() {\n\t\ts.addACustomer(new Customer(\"Gary\", \"Smith\"));\n\t\ts.addACustomer(new Customer(\"Gary\", \"Smith\"));\n\t\tassertEquals(1, s.getCustomers().size());\n\t}", "public void testValidateSubjectPrimaryAssociationsDuplicate() throws Exception {\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n List subjectPrimaryAssociations = positionWrapperBean.getSubjectPrimaryAssociations();\n for (int i = 0; i < subjectPrimaryAssociations.size(); i++) {\n ArtefactAssociationWrapperBean artefactAssociationWrapperBean = (ArtefactAssociationWrapperBean) subjectPrimaryAssociations.get(i);\n artefactAssociationWrapperBean.setSourceId(new Long(12));\n artefactAssociationWrapperBean.setQualifierId(new Long(399));\n }\n // should produce a duplicate assocition error\n DataBinder binder = new DataBinder(positionWrapperBean, ZynapDefaultFormController.DEFAULT_COMMAND_NAME);\n Errors errors = binder.getBindingResult();\n positionValidator.validateSubjectPrimaryAssociations(positionWrapperBean, errors);\n assertEquals(1, errors.getErrorCount());\n FieldError error = errors.getFieldError(FIRST_PRIMARY_ASSOCIATION_SOURCE_FIELD);\n assertEquals(\"error.association.target.unique.required\", error.getCode());\n }", "public void testAddRejectReasons_RejectReasonsContainsManyDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(2);\r\n entry.addRejectReason(new ExpenseEntryRejectReason(1));\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 1, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[2]}, duplicate);\r\n }", "@Test\n\tpublic void urlShortenerServiceDuplicatedUrlExceptionTest() throws GenerateUrlShortenedDuplicatedException {\n\t\twhen(validateUrlShortenerDuplicatedToUrlOriginalAndValidToService.isDuplicated(any(UrlShortenedDto.class)))\n\t\t\t\t.thenReturn(true);\n\t\tGeneratorRandomAlphanumericStringHelper generatorRandomAlphanumericStringHelper = new GeneratorRandomAlphanumericStringHelperImpl();\n\t\tUrlShortenerService urlShortenerService = new UrlShortenerServiceImpl(5, 10,\n\t\t\t\tgeneratorRandomAlphanumericStringHelper, logger,\n\t\t\t\tvalidateUrlShortenerDuplicatedToUrlOriginalAndValidToService, 3);\n\n\t\tassertThrows(GenerateUrlShortenedDuplicatedException.class, () -> {\n\t\t\turlShortenerService.shorten(urlOriginalDto);\n\t\t});\n\t\tverify(validateUrlShortenerDuplicatedToUrlOriginalAndValidToService, times(3))\n\t\t\t\t.isDuplicated(any(UrlShortenedDto.class));\n\t}", "private boolean checkDuplicate(int id) {\r\n boolean x = false;\r\n for (Registration registration : studentRegList) {\r\n if (id == registration.getCourseId()) {\r\n x = true;\r\n break;\r\n }\r\n x = false;\r\n }\r\n return x;\r\n }", "public static void main(String[] args) {\n\t\tint a[] = {1,2,2,6,7,3,4,4,5,5,6,7};\n\t\t\n\t\t\n\t\tMap<Integer,Integer> map =new HashMap<Integer,Integer>();\n\t\t\n\t\tfor (Integer num :a) {\n\t\t\tInteger Count =map.get(num);\n\t\t\tif(Count==null) {\n\t\t\t\tmap.put(num, 1);\n\t\t\t}else {\n\t\t\t\tmap.put(num, ++Count);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tSet<Entry<Integer, Integer>> entryset =map.entrySet();\n\t\tArrayList<Integer> list =new ArrayList<Integer>();\n\t\tfor(Entry<Integer, Integer> entry :entryset) {\n\t\t\tif(entry.getValue()>1) {\n\t\t\t\tlist.add(entry.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\tSystem.out.println(\"Duplicates are \" +list);\n\t\t\n\t\tSet<Entry<Integer, Integer>> entryset1 =map.entrySet();\n\t\tArrayList<Integer> nonduplist =new ArrayList<Integer>();\n\t\tfor(Entry<Integer, Integer> entry1 :entryset1) {\n\t\t\tif(entry1.getValue()==1) {\n\t\t\t\tnonduplist.add(entry1.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\tSystem.out.println(\"Non Duplicates are \" +nonduplist);\n\t\t\n \n}", "private void checkDuplicateOfFile(Iterable<FileInfo> files, DuplicateDataDTO data) {\n for(FileInfo nextFile: files) {\n for(FileInfo nextFile2: files) {\n if(nextFile.duplicate(nextFile2)) {\n LOG.info(\"Duplicate - {}\", nextFile);\n\n processDuplicate(nextFile,data);\n }\n }\n }\n }", "@Test\n public void AfterAddingDuplicatetheSizeShouldBeOne() throws MySetException {\n set.add(1);\n assertThat(set.size(), is(1));\n }", "static void test_evensOnlyNoDupes() {\n\n System.out.println( \"\\nTESTS for evensOnlyNoDupes() : \" );\n\n System.out.print( \"String 'BBddHHjj' returns: \" );\n try { System.out.println( StringStuff.evensOnlyNoDupes( \"BBddHHjj\" ) ); }\n catch ( Exception e ) { System.out.println ( false ); }\n\n System.out.print( \"String 'BcdBcdBcd' returns: \" );\n try { System.out.println( StringStuff.evensOnlyNoDupes( \"BcdBcdBcd\" ) ); }\n catch ( Exception e ) { System.out.println ( false ); }\n\n\n }", "boolean isIsUnique();", "private void checkDuplicities(final List<Unit> units) {\n final Set<Unit> tmp = new HashSet<>();\n units.forEach(unit -> {\n if (tmp.contains(unit)) {\n throw new IllegalStateException(\"Unit was registered twice, unit: \" + unit);\n } else {\n tmp.add(unit);\n }\n });\n }", "@Test\n\tvoid testIsUnique() {\n\t\tMap<String, String> testMap = new HashMap<String, String>();\n\t\ttestMap.put(\"Marty\", \"Stepp\");\n\t\ttestMap.put(\"Stuart\", \"Reges\");\n\t\tassertTrue(isUnique(testMap));\n\t\ttestMap.clear();\n\t\t\n\t\t// Test of non-unique map using two meanings of the word \"Paris\"\n\t\ttestMap.put(\"City of Light\", \"Paris\");\n\t\ttestMap.put(\"Homeric adjudicator\", \"Paris\");\n\t\tassertFalse(isUnique(testMap));\n\t}", "public void test_retainAll() {\r\n try {\r\n List<WrongHashCode> retain = new ArrayList<WrongHashCode>();\r\n retain.add(new WrongHashCode(\"1\"));\r\n \r\n Set<WrongHashCode> set = IdentityHashSet.create();\r\n set.add(new WrongHashCode(\"2\"));\r\n \r\n assertTrue(set.retainAll(retain));\r\n assertEquals(0, set.size());\r\n \r\n fail(\"retainAll works now, rewrite test\");\r\n } catch (UnsupportedOperationException e) {\r\n //passed\r\n }\r\n }", "@Test\n public void testAddCity_City03() {\n\n System.out.println(\"addCity\");\n City cityTest = new City(new Pair(41.243345, -8.674084), \"city0\", 28);\n Set<City> expResult = new HashSet<>();\n\n expResult.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n expResult.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n expResult.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n expResult.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n expResult.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n expResult.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n expResult.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n expResult.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n expResult.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n expResult.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n sn10.addCity(cityTest);\n Set<City> result = sn10.getCitiesList();\n assertEquals(expResult, result);\n }", "@Test\r\n void test_insert_same_vertex_twice() {\r\n graph.addVertex(\"1\");\r\n graph.addVertex(\"1\"); \r\n graph.addVertex(\"1\"); \r\n vertices = graph.getAllVertices();\r\n if(vertices.size() != 1 ||graph.order() != 1) {\r\n fail();\r\n }\r\n }", "boolean isUnique();", "@Test\n public void find_redundant_interaction() {\n list1.add(1);\n list1.add(2);\n verify(list1, Mockito.times(2)).add(Mockito.anyInt());\n verifyNoMoreInteractions(list1);\n\n //List<Integer> list2 = Mockito.mock(List.class);\n list2.add(1);\n list2.add(2);\n verify(list2, Mockito.times(2)).add(Mockito.anyInt());\n verify(list2, Mockito.never()).add(3);\n verifyNoMoreInteractions(list2);\n }", "@Test\n public void addDiffItemDupNameTest() {\n final String itemName = \"item1\";\n List<Item> items = itemSrv.getAllItems();\n Assert.assertNotNull(\"List of items is null\", items);\n\n Assert.assertEquals(\"Wrong initial size of the list, should be 0\", 0, items.size());\n\n final Item item = new Item(itemName, \"item1 description\");\n Assert.assertEquals(\"Item adding failure\", ErrCode.ADD_SUCCESS, itemSrv.addItem(item));\n\n items = itemSrv.getAllItems();\n Assert.assertEquals(\"Total item count should be 1\", 1, items.size());\n\n // Add different item, but with duplicate Name\n final Item diffItemSameName = new Item(itemName, \"different description\");\n itemSrv.addItem(diffItemSameName);\n\n items = itemSrv.getAllItems();\n Assert.assertEquals(\"Total item count should be 1 after addition of different item which has duplicate Name\", 1, items.size());\n\n final Item retrievedItem = items.get(0);\n\n Assert.assertEquals(\"Retrieved item is not the same as original\", item, retrievedItem);\n Assert.assertNotEquals(\"Retrieved item should NOT be the same as duplicate item that was attempted to be inserted\",\n diffItemSameName, retrievedItem);\n }", "public static void main(String[] args) {\n\n\n\t\tHashSet<String> actual = uniqueTuple(\"aaabbb\", 2);\n\t\tHashSet<String> expected = new HashSet<String>();\n\t\texpected.add(\"aa\");\n\t\texpected.add(\"ab\");\n\t\texpected.add(\"bb\");\n System.out.println(expected.containsAll(actual));\n }", "public boolean hasDuplicates(boolean ignoreWhenIdentical) {\n boolean compareJustClassNames = !ignoreWhenIdentical;\n if (compareJustClassNames) {\n return list.size() > 1;\n }\n\n if (list.size() <= 1) {\n return false;\n }\n\n String previousHash = list.get(0).getHash();\n for (int i = 1; i < list.size(); i++) {\n String currentHash = list.get(i).getHash();\n if (!previousHash.equals(currentHash)) {\n return true;\n }\n }\n\n log.debug(\"ignoring duplicates of class \" + classFilePath + \" since the bytecode matches exactly\");\n\n return false;\n }", "@Test\n void shouldNotSkipDuplicates() {\n Report report = parse(\"pit-with-duplicates.xml\");\n\n assertThat(report).hasSize(22);\n }", "@Test\n public void testEquals() {\n \t\n \t//create data set\n \tString strJava = \"java\";\n \tString strScala = \"scala\";\n \tString strPhp = \"php\";\n \t\n \tfinal LastWriteWinSet<String> lastWriteWinSet1 = new LastWriteWinSet<>();\n\n \tlastWriteWinSet1.add(time1, strJava);\n \tlastWriteWinSet1.add(time1, strScala);\n \tlastWriteWinSet1.add(time1, strPhp);\n\n \tlastWriteWinSet1.delete(time2, strJava);\n \n final LastWriteWinSet<String> lastWriteWinSet2 = new LastWriteWinSet<>();\n\n lastWriteWinSet2.add(time1, strJava);\n lastWriteWinSet2.add(time1, strScala);\n lastWriteWinSet2.add(time1, strPhp);\n\n lastWriteWinSet2.delete(time2, strJava);\n \n final LastWriteWinSet<String> lastWriteWinSet3 = lastWriteWinSet2;\n \t\n assertTrue(lastWriteWinSet1.equals(lastWriteWinSet2));\n assertTrue(lastWriteWinSet3.equals(lastWriteWinSet2));\n assertTrue(lastWriteWinSet1.equals(lastWriteWinSet1));\n assertTrue(!lastWriteWinSet1.equals(null));\n }", "public static void main(String[] args) {\n\t\tint[] input ={1, 1, 2, 3, 5, 5, 7, 9, 9, 9};\n\t\t\n\t\tfindDuplicates(input);\n\t}", "@Test\n public void testRepeatedMatch() {\n assertMetrics(\"fieldCompleteness:1 queryCompleteness:0.6667 segments:1 earliness:1 gaps:1\",\n \"pizza hut pizza\",\"pizza hut\");\n }", "@Test(timeout=1000)\n\tpublic void testSimpleAdd() {\n\t\thashmap.add(s1);\n\t\tStudent[] array = hashmap.getArray();\n\t\tboolean success = false;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tStudent s = array[i];\n\t\t\tif (s1.equals(s)){\n\t\t\t\tsuccess = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tassertTrue(\"add() failed. Element not found in array\", success);\n\t}", "@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }", "Boolean same(MultiSet<X> s);", "static void FindDuplicate(String[] strArray){\n\t\t\n\t\tHashSet<String> set = new HashSet<String>();\n\t\t\n\t\tfor(String arrayElement : strArray){\n\t\t\tif(!set.add(arrayElement))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Duplicate Element is: \"+ arrayElement);\n\t\t\t}\n\t\t}\n\t}", "@objid (\"ef9777b4-ed2a-4341-bb22-67675cddb70a\")\n boolean isIsUnique();", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "public static void incrDuplicates() { ++duplicates; }", "@Test\n public void whenAddSeveralIdenticalElementsThenSetHasOnlyOneSuchElement() {\n SimpleSet<Integer> set = new SimpleSet<>();\n set.add(1);\n set.add(2);\n set.add(3);\n set.add(3);\n set.add(2);\n set.add(1);\n\n Iterator<Integer> iterator = set.iterator();\n\n assertThat(iterator.next(), is(1));\n assertThat(iterator.next(), is(2));\n assertThat(iterator.next(), is(3));\n assertThat(iterator.hasNext(), is(false));\n }", "public boolean isUnique();", "public boolean checkDuplicates() {\n List<Booking> dupbookings = new ArrayList<>();\n try {\n dupbookings = bookingHelper.checkDuplicates(b_facility.getId(), b_evdate, b_startTime, b_endTime);\n } catch (Exception e) {\n //facesMessage(\"No other bookings found for the day and time\");\n }\n return dupbookings.size() > 0;\n }", "public boolean checkDuplicates() {\n\t\tboolean[] vals = new boolean[9];\n\t\tfor(int i = 0; i < 3; i++) {\n\t\t\tfor(int k = 0; k < 3; k++) {\n\t\t\t\tint num = this.getCellNum(i, k);\n\t\t\t\tif(num != 0) {\n\t\t\t\t\tif(!vals[num-1]) {\n\t\t\t\t\t\t//The number hasn't already been found\n\t\t\t\t\t\tvals[num-1] = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//A duplicate number was found\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static boolean duplicateCheck(ArrayList<Integer> aList) {\n\t\tBoolean duplicates = false;\n\t\tint elementIndex = 0;\n\t\twhile (duplicates == false && elementIndex < aList.size()-1) {\n\t\t\tint compareIndex = elementIndex + 1;\n\t\t\twhile (duplicates == false && compareIndex < aList.size()) {\n\t\t\t\t//System.out.println(aList.get(elementIndex));\n\t\t\t\t//System.out.println(aList.get(compareIndex));\n\t\t\t\tif (aList.get(elementIndex) == aList.get(compareIndex)) {\n\t\t\t\t\t//System.out.println(\"duplicate is true\");\n\t\t\t\t\tduplicates = true;\n\t\t\t\t}\n\t\t\t\tcompareIndex++;\n\t\t\t}\n\t\t\telementIndex++;\n\t\t}\n\t\tif (duplicates == true) {\n\t\t\t//System.out.println(\"final return for duplicate is true\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//System.out.println(\"final return for duplicate is false\");\n\t\t\treturn false;\n\t\t}\n\t}", "@SuppressWarnings({ \"unchecked\", \"static-access\" })\r\n\tpublic boolean checkArticleIsDuplicated(){\r\n\t\r\n\t\tnum_DupInDBLP = 0;\r\n\t\t\t\t\r\n\t\tCheckExist check = new CheckExist();\r\n\t\t\r\n\t\tnumberArray = (ArrayList<Integer>) check.CheckTitleSignaturePublications(dbsaPublicationCheckList).clone();\r\n\t\tduplicateNumber = numberArray.size();\r\n\t\t\r\n\t\tduplicationArtilce = false;\r\n\t\tif(numberArray.size() > 0){\r\n\t\t\tfor(int i = 0; i < numberArray.size(); i++)\r\n\t\t\t{\t\r\n\t\t\t\tmodel.setValueAt(true, numberArray.get(i), 8);\r\n\t\t\t\tresultsJTable.addRowToPaint(numberArray.get(i), Color.red);\r\n\t\t\t\tduplicationArtilce = true;\r\n\t\t\t\t\r\n\t\t\t\tnum_DupInDBLP ++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgetFetcherInfo();\r\n\t\t//System.out.println(num_DupInDBLP);\r\n\t\tcheckDuplicateJButton.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\t\tDBSAApplication.statisticPanel.updateStatistic(num_Total);\r\n\t\treturn duplicationArtilce;\r\n\t}", "public static boolean haveDuplicated(Solution[] Collection, Solution element) {\n // Go through All the Collection\n for (Solution item: Collection) {\n // Prevent NullElementException\n if (item == null) {\n return false;\n }\n if(item.equals(element)) {\n return true;\n }\n }\n return false;\n }", "@Test\n public void testAddCity_3args01() {\n\n System.out.println(\"addCity_3args\");\n String cityName = \"cityTest\";\n Pair coordenates = new Pair(41.200000, -8.000000);\n int points = 30;\n City cityTest = new City(coordenates, cityName, points);\n Set<City> expResult = new HashSet<>();\n\n expResult.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n expResult.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n expResult.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n expResult.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n expResult.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n expResult.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n expResult.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n expResult.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n expResult.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n expResult.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n expResult.add(cityTest);\n\n sn10.addCity(coordenates, cityName, points);\n Set<City> result = sn10.getCitiesList();\n assertEquals(expResult, result);\n }", "public boolean containsDuplicate(int[] nums) {\r\n\t Set<Integer> set = new HashSet<Integer>();\r\n\t for(int i = 0; i < nums.length; i++) {\r\n\t if(set.contains(nums[i]))\r\n\t return true;\r\n\t else\r\n\t set.add(nums[i]);\r\n\t }\r\n\t return false;\r\n\t }", "public static boolean exactlyOneDup(int[] num) {\n\n //create an int called control\n int control = 1;\n \n //create an int called counter\n int counter = 0;\n\n //check to see if there are any duplicates in num []\n for (int i = 0; i < num.length; i++) {\n\n for (int j = control; j < num.length; j++) {\n\n if (num[i] == num[j]) {\n counter += 1;\n\n } //end of if statement\n\n } //end of for loop\n \n control++;\n \n } //end of for loop\n\n if (counter != 1) {\n return false;\n }\n return true;\n \n }", "private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tList<Integer> nums = new ArrayList<>();\r\n\t\t\r\n\t\tnums.add(10);nums.add(10);nums.add(10);nums.add(8);\r\n\t\tnums.add(11);nums.add(10);nums.add(10);nums.add(10);\r\n\r\n\t\tSystem.out.println(nums);\r\n\t\t\r\n\t\tList<Integer> unique1 = new ArrayList<>(); \r\n\t\t\r\n\t\t\r\n\t\t // find unique NON DUPLICATE VALUES\r\n\t\tfor(Integer num: nums) {\r\n\t\t\tif(!unique1.contains(num)) { // if unique1 doesn't contains num add it\r\n\t\t\t\tunique1.add(num); //<<<<<======= adding to unique1 num one by one\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(unique1.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t \r\n\t\t\r\n\t\tList<Integer> unique2 = new ArrayList<>();\r\n\t\t\r\n\t\tfor(int i =0; i<nums.size(); i++) { // find unique ( appearence once)\r\n\t\t\tint count=0;\r\n\t\t\t\r\n\t\t\tInteger value = nums.get(i);\r\n\t\t\tfor(int k =0; k<nums.size(); k++) {\r\n\t\t\t\tif(nums.get(k)== value && i != k) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(count == 0) {\r\n\t\t\t\tunique2.add(value);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(unique2);\r\n\t\t\r\n\t}", "private boolean checkDuplicate(int[] array, int index, int value) {\n\t\tfor (int i = 0; i < index; i++) {\n\t\t\tif (array[i] == value) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void createDuplicateAccount() {\n final String username1 = \"[email protected]\";\n final String username2 = \"[email protected]\";\n final String username3 = \"[email protected]\";\n final String firstname = \"william\";\n final String lastname = \"shakespeare\";\n final String address = \"@iaeste.org\";\n\n final CreateUserRequest request1 = new CreateUserRequest(username1, firstname, lastname);\n final CreateUserResponse response1 = administration.createUser(token, request1);\n assertThat(response1, is(not(nullValue())));\n assertThat(response1.isOk(), is(true));\n assertThat(response1.getUser(), is(not(nullValue())));\n assertThat(response1.getUser().getAlias(), is(firstname + '.' + lastname + address));\n\n final CreateUserRequest request2 = new CreateUserRequest(username2, firstname, lastname);\n final CreateUserResponse response2 = administration.createUser(token, request2);\n assertThat(response2, is(not(nullValue())));\n assertThat(response2.isOk(), is(true));\n assertThat(response2.getUser(), is(not(nullValue())));\n assertThat(response2.getUser().getAlias(), is(firstname + '.' + lastname + 2 + address));\n\n final CreateUserRequest request3 = new CreateUserRequest(username3, firstname, lastname);\n final CreateUserResponse response3 = administration.createUser(token, request3);\n assertThat(response3, is(not(nullValue())));\n assertThat(response3.isOk(), is(true));\n assertThat(response3.getUser(), is(not(nullValue())));\n assertThat(response3.getUser().getAlias(), is(firstname + '.' + lastname + 3 + address));\n }", "public static void main(String[] args) {\n\t\tint a[] = {4,4,4,5,5,5,6,6,6,9};\n\t\t\n\t\tArrayList<Integer> ab = new ArrayList<Integer>();\n\t\t\n\t\tfor(int i=0; i<a.length; i++)\n\t\t{\n\t\t\tint k =0;\n\t\t\tif(!ab.contains(a[i]))\n\t\t\t{\n\t\t\t\tab.add(a[i]);\n\t\t\t\tk++;\n\t\t\t\tfor(int j=i+1; j<a.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif(a[i]==a[j])\n\t\t\t\t\t{\n\t\t\t\t\t\tk++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(a[i]);\n\t\t\t//System.out.println(k);\n\t\t\tif(k==1)\n\t\t\t\tSystem.out.println(a[i] +\" is unique number \");\n\t\t}\n\t\t\n\t}", "@Test\n public void testGetUniqueInt() {\n UniqueRandomGenerator instance = new UniqueRandomGenerator();\n \n List<Integer> extracted = new ArrayList<>();\n \n for (int i = 0; i < 1000; i++)\n {\n int extr = instance.getUniqueInt(0, 1000);\n \n if (extracted.contains(extr))\n fail();\n else\n extracted.add(extr);\n }\n }", "static boolean isDuplicated(String mac) {\n for (DeviceDetail detail : deviceDetails) {\n if (detail.macAddress.equals(mac)) {\n return true;\n }\n }\n return false;\n }", "public static boolean exactlyOneDup(int num[]){\n int count = 0; //set up a varaible to record the number of duplicates\n \n //set up a loop to compare numbers in the array with each other\n for(int i=0;i<num.length;i++){\n int j=i+1;\n while(j<num.length)\n {\n if (num[i]==num[j])\n {\n count++;//when two numbers in the array are same,return true\n }\n \n j++;\n }\n \n }\n //return the results\n if (count==1){\n return true;//if there is only one duplicate return true\n }\n else {\n return false;//else return false\n }\n \n }", "@Test\n public void testGetBusinessObjectDefinitionSubjectMatterExpertByKeyDuplicateSubjectMatterExperts() throws Exception\n {\n BusinessObjectDefinitionEntity businessObjectDefinitionEntity =\n businessObjectDefinitionDaoTestHelper.createBusinessObjectDefinitionEntity(BDEF_NAMESPACE, BDEF_NAME, DATA_PROVIDER_NAME, BDEF_DESCRIPTION);\n\n // Create duplicate business object definition subject matter experts.\n businessObjectDefinitionSubjectMatterExpertDaoTestHelper\n .createBusinessObjectDefinitionSubjectMatterExpertEntity(businessObjectDefinitionEntity, USER_ID.toUpperCase());\n businessObjectDefinitionSubjectMatterExpertDaoTestHelper\n .createBusinessObjectDefinitionSubjectMatterExpertEntity(businessObjectDefinitionEntity, USER_ID.toLowerCase());\n\n // Try to get business object definition subject matter expert when business object definition has duplicate subject matter experts.\n try\n {\n businessObjectDefinitionSubjectMatterExpertDao\n .getBusinessObjectDefinitionSubjectMatterExpertByKey(new BusinessObjectDefinitionSubjectMatterExpertKey(BDEF_NAMESPACE, BDEF_NAME, USER_ID));\n fail();\n }\n catch (IllegalArgumentException e)\n {\n assertEquals(String.format(\"Found more than one business object definition subject matter expert instance with parameters {namespace=\\\"%s\\\", \" +\n \"businessObjectDefinitionName=\\\"%s\\\", userId=\\\"%s\\\"}.\", BDEF_NAMESPACE, BDEF_NAME, USER_ID), e.getMessage());\n }\n }", "@Test\n public void testInsertSharedService () {\n\n ArrayList<SharedService> sharedServicesBefore =\n given().\n header(\"AJP_eppn\", userEPPN).\n expect().\n statusCode(200).\n when().\n get(SHARED_SERVICE_ENDPOINT).\n as(ArrayList.class);\n\n int serviceId = 1;\n int userId = 102;\n int idSharedService = addSharedService(serviceId, userId);\n assertTrue(idSharedService != -1);\n ServiceLogger.log(logTag, \"inserted shared servie, id =\" + idSharedService);\n\n ArrayList<SharedService> sharedServicesAfter =\n given().\n header(\"AJP_eppn\", userEPPN).\n expect().\n statusCode(200).\n when().\n get(SHARED_SERVICE_ENDPOINT).\n as(ArrayList.class);\n\n int numBefore = (sharedServicesBefore != null) ? sharedServicesBefore.size() : 0;\n int numAfter = (sharedServicesAfter != null) ? sharedServicesAfter.size() : 0;\n int numExpected = numBefore + 1;\n assertTrue (numAfter == numExpected);\n\n ArrayList<SharedService> sharedServiceLookup =\n given().\n header(\"AJP_eppn\", userEPPN).\n expect().\n statusCode(200).\n when().\n get(SHARED_SERVICE_GET_BY_ID, idSharedService).\n as(ArrayList.class);\n int numLookup = (sharedServiceLookup != null) ? sharedServiceLookup.size() : 0;\n ServiceLogger.log(logTag, \"get shared service by id returns list of size =\" + numLookup);\n assertTrue (numLookup == 1);\n\n }", "@Test\r\n public void testAdd() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n System.out.println(entry1.toString());\r\n // Initial state\r\n assertEquals(0, instance.size());\r\n assertFalse(instance.contains(entry1));\r\n\r\n instance.add(entry1);\r\n\r\n // Test general case (size)\r\n assertEquals(1, instance.size());\r\n\r\n // Test general case (content)\r\n assertTrue(instance.contains(entry1));\r\n\r\n // Test combined quantity case\r\n // Test that matching ignores letter case\r\n// int initialQuantity = entry1.getQuantity();\r\n int diff = 1;\r\n// int newQuantity = initialQuantity + diff;\r\n Grocery duplicate = new Grocery(entry1.getName().toLowerCase(),\r\n entry1.getCategory());\r\n duplicate.setQuantity(diff);\r\n instance.add(duplicate);\r\n System.out.println(instance.toString());\r\n // and ? do we test anything here?\r\n }", "@Test\r\n\tpublic void testContains() {\r\n\t\tassertFalse(ll.contains(t1));\r\n\t\tll.add(0, t1);\r\n\t\tassertTrue(ll.contains(t1));\r\n\t}", "private void verifyDuplication(int index, long serialNumber) throws DuplicateSerialNumberException {\n\t\tfor (int i = 0; i < wsArr.length; i++) {\n\t\t\tif (i == index) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (wsArr[i].getSerialNumber() == serialNumber) {\n\t\t\t\tthrow new DuplicateSerialNumberException(i + 1, serialNumber);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint r = findDuplicate(new int[]{1,1,3});\n\t\tSystem.out.println(r);\n\t}", "@Test\n public void testAddCity_3args03() {\n\n System.out.println(\"addCity_3args\");\n String cityName = \"city0\";\n Pair coordenates = new Pair(41.243345, -8.674084);\n int points = 28;\n City cityTest = new City(coordenates, cityName, points);\n Set<City> expResult = new HashSet<>();\n\n expResult.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n expResult.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n expResult.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n expResult.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n expResult.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n expResult.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n expResult.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n expResult.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n expResult.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n expResult.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n sn10.addCity(coordenates, cityName, points);\n Set<City> result = sn10.getCitiesList();\n assertEquals(expResult, result);\n }", "public boolean containsDuplicate(int[] nums) {\n if (nums == null || nums.length <= 1) {\n return false;\n }\n TreeSet<Integer> set = new TreeSet<>();\n for (int num : nums) {\n if (set.contains(num)) {\n return true;\n } else {\n set.add(num);\n }\n }\n return false;\n }", "protected int checkForDuplicateGiftCards(Order order) {\r\n ArrayList paymentGroupClonedList = new ArrayList(order.getPaymentGroups());\r\n Iterator paymentGroupIterator = paymentGroupClonedList.iterator();;\r\n Iterator giftCardIterator = getGiftCardList().iterator();\r\n GiftCard tempGiftCard = null;\r\n String giftCardListCheckString = \"\";\r\n String paymentGroupListCheckString = \"\";\r\n int returnValue = NO_ERRORS;\r\n PaymentGroupImpl paymentGroup;\r\n \r\n while (paymentGroupIterator.hasNext()) {\r\n paymentGroup = (PaymentGroupImpl) paymentGroupIterator.next();\r\n if (paymentGroup instanceof NMCreditCard && ((NMCreditCard) paymentGroup).getCreditCardNumber() != null && ((NMCreditCard) paymentGroup).getCidTransient() != null) {\r\n paymentGroupListCheckString += ((NMCreditCard) paymentGroup).getCreditCardNumber().trim() + ((NMCreditCard) paymentGroup).getCidTransient().trim() + \"~\";\r\n }\r\n }\r\n \r\n while (giftCardIterator.hasNext()) {\r\n tempGiftCard = (GiftCard) giftCardIterator.next();\r\n \r\n if (!tempGiftCard.getIsBlank()) {\r\n if (paymentGroupListCheckString.indexOf(tempGiftCard.getCardNumber() + tempGiftCard.getCid()) != -1) {\r\n tempGiftCard.setIsValid(false);\r\n returnValue = DUPLICATE_CARD;\r\n }\r\n \r\n if (giftCardListCheckString.indexOf(tempGiftCard.getCardNumber() + tempGiftCard.getCid()) != -1) {\r\n tempGiftCard.setIsValid(false);\r\n Iterator giftCardIterator2 = getGiftCardList().iterator(); // another iterator to flag the other card that is a duplicate\r\n GiftCard tempGiftCard2 = null;\r\n while (giftCardIterator2.hasNext()) {\r\n tempGiftCard2 = (GiftCard) giftCardIterator2.next();\r\n if (tempGiftCard2.getCardNumber().trim().equalsIgnoreCase(tempGiftCard.getCardNumber()) && tempGiftCard2.getCid().trim().equalsIgnoreCase(tempGiftCard.getCid())) {\r\n tempGiftCard2.setIsValid(false);\r\n }\r\n }\r\n returnValue = DUPLICATE_CARD;\r\n }\r\n }\r\n giftCardListCheckString += tempGiftCard.getCardNumber() + tempGiftCard.getCid() + \"~\";\r\n }\r\n \r\n return returnValue;\r\n }", "public static void main(String[] args) {\n\t\tArrayList<String> arrayListWithDups = new ArrayList<String>();\n\n\t\tarrayListWithDups.add(\"nonie\");\n\t\tarrayListWithDups.add(\"test\");\n\t\tarrayListWithDups.add(\"中中中\");\n\t\tarrayListWithDups.add(\"test\");\n\t\tarrayListWithDups.add(\"nonie\");\n\t\tarrayListWithDups.add(null);\n\t\tarrayListWithDups.add(\"中中中\");\n\t\tarrayListWithDups.add(\"homework\");\n\t\tarrayListWithDups.add(null);\n\n\t\t// Printing listWithDuplicateElements\n\t\tSystem.out.print(\"Input:\");\n\t\tSystem.out.println(arrayListWithDups);\n\n\t\t// Constructing HashSet using listWithDuplicateElements\n\t\tHashSet<String> removeDups = new HashSet<String>(arrayListWithDups);\n\n\t\t// Constructing listWithoutDuplicateElements using set\n\t\tArrayList<String> arrayListNoDups = new ArrayList<String>(removeDups);\n\n\t\t// Printing listWithoutDuplicateElements\n\t\tSystem.out.print(\"Ouput: \");\n\t\tSystem.out.println(arrayListNoDups);\n\t}", "@Test\r\n void test_insert_same_edge_twice() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"B\");\r\n if (graph.size() != 1) {\r\n fail();\r\n }\r\n if (!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")) {\r\n fail();\r\n }\r\n\r\n }", "@Test\r\n public void testHashSetInsert()\r\n {\r\n Square s0 = new Square(1, -1),\r\n s1 = new Square(1, -1);\r\n HashSet<Square> hs = new HashSet<>();\r\n hs.add(s0);\r\n assertEquals(1, hs.size());\r\n hs.add(s1);\r\n assertEquals(1, hs.size());\r\n assertTrue(hs.contains(s0));\r\n assertTrue(hs.contains(s1));\r\n }", "@Test(expected=DuplicateKeyException.class)\n\t\tpublic void testSave3()\n\t\t{\n\n\t\t\tChObject cho = repoTest.get(\"68268301\");\n\n\t\t\trepoTest.save(cho);\t\t\t//add chObject to repo\n\t\t\trepoTest.save(cho);\t\t\t//add duplicate record (not allowed...should throw exception)\n\t\t}", "@Test\n public void testEquals03() {\n System.out.println(\"equals\");\n\n Set<User> users = new HashSet<>();\n users.add(new User(\"nick0\", \"[email protected]\"));\n users.add(new User(\"nick1\", \"[email protected]\"));\n users.add(new User(\"nick2\", \"[email protected]\"));\n users.add(new User(\"nick3\", \"[email protected]\"));\n users.add(new User(\"nick4\", \"[email protected]\"));\n users.add(new User(\"nick5\", \"[email protected]\"));\n users.add(new User(\"nick6\", \"[email protected]\"));\n users.add(new User(\"nick7\", \"[email protected]\"));\n users.add(new User(\"nick8\", \"[email protected]\"));\n users.add(new User(\"nick9\", \"[email protected]\"));\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n SocialNetwork otherSN = new SocialNetwork(users, cities);\n boolean result = sn10.equals(otherSN);\n assertTrue(result);\n }", "@Test\r\n\tpublic void createDuplicateFunctionTestFail(){\r\n\t\tSystem.out.println(\"TEST STARTED: createDuplicateFunctionTestFail()\");\r\n\t\tLong orgId = null;\r\n\t\tLong funcId = null;\r\n\t\ttry{\r\n\t\t\t//create the test organization\r\n\t\t\tString createOrgResp = org_service.createOrganization(CREATE_ORG_REQ_1);\r\n\t\t\torgId=getRecordId(createOrgResp);\r\n\t\t\tSystem.out.println(createOrgResp);\r\n\t\t\t\r\n\t\t\t//create the test function linked to the organization test\r\n\t\t\tString createFuncResp = func_service.createFunction(CREATE_FUNCTION_REQ_1.replace(\"$ID_ORG\", orgId.toString()));\r\n\t\t\tSystem.out.println(\"CreateFunction Response: \"+createFuncResp);\r\n\t\t\t\r\n\t\t\t//get the new function ID\r\n\t\t\tfuncId = getRecordId(createFuncResp);\r\n\t\t\t\r\n\t\t\t//check if the createFuncResp is a well formed JSON object.\r\n\t\t\tcheckJsonWellFormed(createFuncResp);\r\n\t\t\t\r\n\t\t\t//try to create another function with the same name for the same organization\r\n\t\t\tString reCreateFuncResp = func_service.createFunction(CREATE_FUNCTION_REQ_1.replace(\"$ID_ORG\", orgId.toString()));\r\n\t\t\tSystem.out.println(\"CreateFunction Response: \"+reCreateFuncResp);\r\n\t\t\t\r\n\t\t\tAssert.assertTrue(reCreateFuncResp.contains(\"\\\"status\\\":\\\"error\\\"\"));\r\n\t\t\t\t\t\t\r\n\t\t}catch (Exception e ){\t\t\t\r\n\t\t\tAssert.fail(e.getMessage());\r\n\t\t}finally{\r\n\t\t\t//delete the test organization created\r\n\t\t\torg_service.deleteOrganization(DELETE_ORG_REQ_1+orgId+REQ_END);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"TEST ENDED: createDuplicateFunctionTestFail()\");\r\n\t\t}\r\n\t\t\r\n\t}", "private boolean validateForDuplicateItemField(OleDiscoveryExportProfile oleDiscoveryExportProfile) {\n List<String> MARCItemlist = new ArrayList<String>();\n for (int i = 0; i < oleDiscoveryExportProfile.getOleDiscoveryExportMappingFields().size(); i++) {\n MARCItemlist.add(oleDiscoveryExportProfile.getOleDiscoveryExportMappingFields().get(i).getItemField());\n }\n for (int j = 0; j < oleDiscoveryExportProfile.getOleDiscoveryExportMappingFields().size(); j++) {\n int count = 0;\n for (int k = 0; k < MARCItemlist.size(); k++) {\n if (oleDiscoveryExportProfile.getOleDiscoveryExportMappingFields().get(j).getItemField().equalsIgnoreCase(MARCItemlist.get(k))) {\n count++;\n }\n }\n if (count > 1) {\n this.putFieldError(OLEConstants.OleDiscoveryExportProfile.OLE_EXP_ITEM_FIELD, OLEConstants.OleDiscoveryExportProfile.OLE_EXP_ITEM_DUPLICATE_ERROR);\n return false;\n }\n }\n return true;\n }", "public void checkDuplicate (ArrayList studentAnswer, int answer) {\r\n if (!studentAnswer.contains(answer)){\r\n studentAnswer.add(answer);\r\n }\r\n }", "public void testEquals() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n XIntervalDataItem item2 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n }" ]
[ "0.8029213", "0.7517954", "0.7303155", "0.7204346", "0.70551854", "0.6950422", "0.69426626", "0.6929646", "0.6778536", "0.6725065", "0.6708395", "0.66903496", "0.66760576", "0.66581833", "0.6657843", "0.6647117", "0.65750134", "0.6572898", "0.6547079", "0.65246606", "0.6511457", "0.6479205", "0.6446534", "0.64205277", "0.6342807", "0.63400334", "0.6323456", "0.6320816", "0.6266633", "0.6262319", "0.62076914", "0.6205238", "0.6203172", "0.61695635", "0.61667037", "0.6161891", "0.6161775", "0.61594236", "0.61470765", "0.6130833", "0.61191094", "0.61169726", "0.6113434", "0.61129075", "0.61114204", "0.6099077", "0.6087465", "0.60870004", "0.6068218", "0.6065371", "0.60632885", "0.60632014", "0.606237", "0.6058172", "0.6048676", "0.6045198", "0.60447705", "0.60367334", "0.6035311", "0.6018422", "0.600974", "0.6007995", "0.59997106", "0.59885734", "0.5987758", "0.59752536", "0.59718215", "0.596889", "0.5953384", "0.5950635", "0.5950326", "0.59323376", "0.592294", "0.5920068", "0.5910998", "0.5906846", "0.590645", "0.59056145", "0.59017545", "0.59003735", "0.5887597", "0.58775735", "0.58688325", "0.58678275", "0.58643556", "0.5861449", "0.58581614", "0.5844977", "0.5842909", "0.58429086", "0.5838115", "0.58335006", "0.58227044", "0.58213097", "0.5819612", "0.581926", "0.58153445", "0.5814869", "0.58127654", "0.5812603", "0.58125263" ]
0.0
-1
The following test case checks if the array can be sorted reversely Test case : PASSED
@Test public void newSortingTest3() { newSorting sort = new newSorting(); int[] arr = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; int[] expected = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; sort.newSorting(arr, 5); assertArrayEquals(arr, expected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void reverseArray () {\n\n int[] input = {-2,5,-1,7,-3};\n int[] output = {-3,7,-1,5,-2};\n assertArrayEquals(output, Computation.reversal(input));\n\n }", "@Test\r\n public void testReverseArr() {\r\n System.out.println(\"ReverseArr\");\r\n int length = 0;\r\n Class sortClass = null;\r\n int[] expResult = null;\r\n int[] result = GenerateArr.ReverseArr(length, sortClass);\r\n assertArrayEquals(expResult, result);\r\n }", "@Test\n public void testReverseOrderSort() {\n BubbleSort<Integer> testing = new BubbleSort<>();\n\n testing.sort(array, new Comparator<Integer>() {\n @Override\n public int compare(Integer i1, Integer i2) {\n return i2.compareTo(i1);\n }\n });\n\n checkReverseOrder(\"Bubble sort doesn't work with other comparator!\", array);\n }", "@Test\n public void case5SortReversedSequence(){\n //Completely reverse sorted array\n int[] testArray = {1,2,3};\n SortDemoData data3 = new SortDemoData() ;\n data3.initializeArray(\"3 2 1\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data3.myArray[2].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data3.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Third Element\",data3.myArray[0].key == testArray[2]);\n\n data3.runAlgo(algoUnderTest);\n\n if(algoUnderTest != 0)\n {\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data3.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data3.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Third Element\",data3.myArray[2].key == testArray[2]);\n }\n else {\n \t assertFalse(map.get(algoUnderTest)+\" After Sort ...First Element\",data3.myArray[0].key == testArray[0]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Second Element\",data3.myArray[1].key == testArray[1]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Third Element\",data3.myArray[2].key == testArray[2]);\n }\n \n }", "private static void compareForReverseArrays() {\n Integer[] reverse1 = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};\n Integer[] reverse2 = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};\n Insertion insertion = new Insertion();\n insertion.analyzeSort(reverse1);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(reverse2);\n selection.getStat().printReport();\n }", "@Test\n public void testSolution() {\n assertArrayEquals(new int[]{3,2,1} , new Task().reverse3( new int[]{1, 2, 3}));\n assertArrayEquals(new int[]{5, 11, 9} , new Task().reverse3( new int[]{9, 11, 5}));\n assertArrayEquals(new int[]{7, 0, 0} , new Task().reverse3( new int[]{0, 0, 7}));\n assertArrayEquals(new int[]{2, 1, 2} , new Task().reverse3( new int[]{2, 1, 2}));\n assertArrayEquals(new int[]{1, 2, 1} , new Task().reverse3( new int[]{1, 2, 1}));\n assertArrayEquals(new int[]{2, 11, 3} , new Task().reverse3( new int[]{3, 11, 2}));\n assertArrayEquals(new int[]{7, 2, 3} , new Task().reverse3( new int[]{3, 2, 7}));\n\n }", "public static void main(String[] args) {\n Integer arr[] = {10, 20, 30, 40, 50}; \n \n System.out.println(\"Original Array : \" + \n Arrays.toString(arr)); \n \n // Please refer below post for details of asList() \n \n Collections.reverse(Arrays.asList(arr)); \n \n System.out.println(\"Modified Array : \" + \n Arrays.toString(arr)); \n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tint a[]=new int[]{-2,-1,0,1,2,3,4,5,6,7,8,9},temp=0;\r\n\t\tSystem.out.println(\"Array before reversing and after reversing\");\r\n\t\tSystem.out.println(Arrays.toString(a));\r\n\t\tfor(int i=0,j=(a.length/2)-1;i<a.length/2/2;i++,j--)\r\n\t\t{\r\n\t\t\ttemp=a[i];\r\n\t\t\ta[i]=a[j];\r\n\t\t\ta[j]=temp;\r\n\t\t}\t\r\n\t\tfor(int i=a.length/2,j=a.length-1;i<(a.length*3)/4;i++,j--)\r\n\t\t{\r\n\t\t\ttemp=a[i];\r\n\t\t\ta[i]=a[j];\r\n\t\t\ta[j]=temp;\r\n\t\t}\r\n\t\tSystem.out.println(Arrays.toString(a));\r\n\t}", "@Test\n\tpublic void testSortOnlyNegativeElements() {\n\t\tint[] arrayBeforeSort = { -565, -78, -34, -2, -23, -2222, -34 };\n\t\tint[] arrayAfterSort = { -565, -78, -34, -2, -23, -2222, -34 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\n\tpublic void testSortPositiveNegativeElements() {\n\t\tint[] arrayBeforeSort = { 565, -78, 34, -2, 23, 2222, 34 };\n\t\tint[] arrayAfterSort = { 565, -78, 34, -2, 23, 2222, 34 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\n public void testReverse() {\n System.out.println(\"reverse\");\n al.add(1);\n al.add(2);\n al.add(3);\n ArrayList<Integer> rl = new ArrayList<>();\n rl.add(3);\n rl.add(2);\n rl.add(1);\n al.reverse();\n assertEquals(rl.get(0), al.get(0));\n assertEquals(rl.get(1), al.get(1));\n assertEquals(rl.get(2), al.get(2));\n }", "@Test\r\n public void testCreateTourWithOrder_ReversedOrder() {\r\n Tour tour = new Tour(new int[][]{{0, 0}, {1, 1}, {2, 2}, {3, 3}});\r\n Tour expected = new Tour(new int[][]{{3, 3}, {2, 2}, {1, 1}, {0, 0}});\r\n Tour result = tour.createTourWithOrder(new int[]{3, 2, 1, 0});\r\n assertTrue(result.toString(), expected.isEqual(result));\r\n }", "@Test\n\tpublic void givenAnArrayWithTwoElements_ThenItIsSorted() {\n\t\tList<Integer> unsorted = new ArrayList<>();\n\t\tunsorted.add(2);\n\t\tunsorted.add(1);\n\t\t\n\t\t// Execute the code\n\t\tList<Integer> sorted = QuickSort.getInstance().sort(unsorted);\n\t\t\t\n\t\t// Verify the test result(s)\n\t\tassertThat(sorted.get(0), is(1));\n\t\tassertThat(sorted.get(1), is(2));\n\t}", "@Test\r\n public void testSort() {\r\n System.out.println(\"sort\");\r\n int[] array = {6, 3, 7, 9, 4, 1, 3, 7, 0};\r\n int[] expResult = {0, 1, 3, 3, 4, 6, 7, 7, 9};\r\n\r\n int[] result = new InsertionSort().sort(array);\r\n\r\n assertArrayEquals(expResult, result);\r\n \r\n array = new int[10000];\r\n for (int i = 0; i < array.length; i++) {\r\n array[i] = new Random().nextInt(Integer.MAX_VALUE);\r\n }\r\n expResult = Arrays.copyOf(array, array.length);\r\n Arrays.sort(expResult);\r\n \r\n result = new InsertionSort().sort(array);\r\n\r\n assertArrayEquals(expResult, result);\r\n }", "@Test\n\tpublic void testSortNormalElements() {\n\t\tint[] arrayBeforeSort = { 565, 78, 34, 2, 23, 2222, 34 };\n\t\tint[] arrayAfterSort = { 565, 78, 34, 2, 23, 2222, 34 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\r\n public void testdecSortVector() {\r\n System.out.println(\"decSortVector\");\r\n int[] vector = {1,8,3,4};\r\n VectorHelper instance = new VectorHelper();\r\n int[] expResult = {8,4,3,1};\r\n int[] result = instance.decSortVector(vector);\r\n assertArrayEquals(expResult, result);\r\n \r\n }", "@Test\r\n public void SortTest() {\r\n System.out.println(\"sort\");\r\n List<String> array = Arrays.asList(\"3\", \"2\", \"1\");\r\n List<String> expResult = Arrays.asList(\"1\",\"2\",\"3\");\r\n instance.sort(array);\r\n assertEquals(expResult,array);\r\n }", "public static void main(String[] args) {\n int[] intArray = {20, 35, -15, 7, 55, 1, -22};\n\n for (int lastUnsortedIndex = intArray.length - 1; lastUnsortedIndex > 0; lastUnsortedIndex--) {\n for (int i = 0; i < lastUnsortedIndex; i++) {\n if (intArray[i] > intArray[i + 1]) {\n swap(intArray, i, i + 1);\n }\n }\n }\n\n for (int i = 0; i < intArray.length; i ++) {\n System.out.println(intArray[i]);\n }\n }", "@Test\n public void testPrueba1(){\n \n System.out.println(\"Prueba 1\");\n int[] input = new int[]{1, 2, 3, 5, 4};\n int[] expectedResult = new int[]{1, 2, 3, 4, 5};\n int[] actualResult = BubbleSort.sortBasic(input);\n assertArrayEquals(expectedResult, actualResult);\n \n }", "@Test\n public void testSort_intArr_IntComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void testSort_intArr_half() {\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tint a[]= {10,30,50,70,89,76,67,43,90};\r\n\t\tint temp;\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"ORIGNAL ARRAY\");\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tSystem.out.print(a[i]+\" \");\r\n\t\t}\r\n\t\t\r\n\t\t\r\nfor (int i = 0; i < a.length; i++) {\r\n\t\t\t\r\n\t\tfor (int j = i+1; j < a.length; j++) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttemp=a[i];\r\n\t\t\ta[i]=a[j];\r\n\t\t\ta[j]=temp;\r\n\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\nREVERSE ARRAY\");\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tSystem.out.print(a[i]+\" \");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tint arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9,10,11};\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\tarrrev(arr,3);\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\t\t\n\n\t}", "static void reverseArray(int arr[], int start, int end) \n { \n int temp; \n while (start < end) \n { \n temp = arr[start]; \n arr[start] = arr[end]; \n arr[end] = temp; \n start++; \n end--; \n } \n }", "@Test\n public void newSortingTest4() {\n newSorting sort = new newSorting();\n int[] arr = {-1, 0, 1, 0, 1, 0, -1};\n int[] expected = {-1, -1, 0, 0, 0, 1, 1};\n sort.newSorting(arr, 3);\n assertArrayEquals(arr, expected);\n\n }", "@Test\r\n public void confirmNumericalSortTest() {\r\n int[] unsorted = new int[]{2,10,1,3,4,100,20};\r\n int[] expResult = new int[]{1,2,3,4,10,20,100};\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\r\n }", "private static int[] reverseArray(int[] inputs) {\n for(int i =0; i < inputs.length/2; i++) {\n int tmp = inputs[i];\n int nextPosition = (inputs.length - i) -1;\n inputs[nextPosition] = tmp;\n }\n return inputs;\n }", "@Test\n public void testSort_intArr_IntegerComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void case3SortTwoElements(){\n //Already sorted array\n SortDemoData data2 = new SortDemoData() ;\n\n int[] testArray = {1,2};\n data2.initializeArray(\"2 1\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data2.myArray[1].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data2.myArray[0].key == testArray[1]);\n\n data2.runAlgo(algoUnderTest);\n \n if(algoUnderTest != 0)\n {\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n }\n \n else {\n \t assertFalse(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n }\n\n\n }", "public static void verifySortedIntArrayDesc(int[] a) {\n for (int i = 1; i < a.length; ++i) {\n Assert.assertTrue(a[i] <= a[i - 1]);\n }\n }", "private void sort(int[] inputArray) {\n\t\tint temp;\n\t\tfor(int i=0;i<inputArray.length;i++) {\n\t\t\tfor(int j=0;j<inputArray.length-1-i;j++) {\n\t\t\t\tif(inputArray[j]>inputArray[j+1]) { // if(inputArray[j]<inputArray[j+1]) for descending\n\t\t\t\t\ttemp = inputArray[j];\n\t\t\t\t\tinputArray[j] = inputArray[j+1];\n\t\t\t\t\tinputArray[j+1] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Pass: \" + (i+1));\n\t\t\tfor(int k=0;k<inputArray.length;k++) {\n\t\t\t\tSystem.out.print(inputArray[k] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Arry in Ascending order is:\");\n\t\tfor(int i=0;i<inputArray.length;i++) {\n\t\t\tSystem.out.print(inputArray[i] + \"\\t\");\n\t\t}\n\t}", "@Test\n\tpublic void testSortTwoElements() {\n\t\tint[] arrayBeforeSort = { 565, 45 };\n\t\tint[] arrayAfterSort = { 565, 45 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\n\tpublic void testSortOneElementInArray() {\n\t\tint[] arrayBeforeSort = { 565 };\n\t\tint[] arrayAfterSort = { 565 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "public boolean supportsReverseComparison() {\n return true;\n }", "@Test\r\n public void testSortedArr() {\r\n System.out.println(\"SortedArr\");\r\n int length = 0;\r\n Class sortClass = null;\r\n int[] expResult = null;\r\n int[] result = GenerateArr.SortedArr(length, sortClass);\r\n assertArrayEquals(expResult, result);\r\n }", "@Test\n\tpublic void testSortRepeatableNumbers() {\n\t\tint[] arrayBeforeSort = { 104, 104, 0, 9, 56, 0, 9, 77, 88 };\n\t\tint[] arrayAfterSort = { 104, 104, 0, 9, 56, 0, 9, 77, 88 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "private void assertSorted(final int[] testArr) {\n for (int i = 0; i < testArr.length - 1; i++) {\n assertTrue(\"Array was not sorted: element \" + i + \" was out \"\n + \"of order: \\n\" + Arrays.toString(testArr),\n testArr[i] <= testArr[i + 1]);\n\n }\n }", "public void testSortAndDedup() {\n assertDeduped(List.<String>of(), Comparator.naturalOrder(), 0);\n // test no elements in an integer array\n assertDeduped(List.<Integer>of(), Comparator.naturalOrder(), 0);\n // test unsorted array\n assertDeduped(List.of(-1, 0, 2, 1, -1, 19, -1), Comparator.naturalOrder(), 5);\n // test sorted array\n assertDeduped(List.of(-1, 0, 1, 2, 19, 19), Comparator.naturalOrder(), 5);\n // test sorted\n }", "@Test\n public void testSort_intArr_IntComparator_Desc() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_ARRAY;\n sorter.sort(data, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "public static void main(String[] args) {\n int[] array = {1,2,3,4,5,6,7,8,9,10};\n System.out.println(\"The original array is:\"+Arrays.toString(array));\n reverse(array);\n }", "public static void sortDesc(long[]arr)\n\t{\n\t\tfor(int i=0;i<arr.length-1;++i)\n\t\t{\n\t\t\tfor(int j=i+1;j<arr.length;++j)\n\t\t\t{\n\t\t\t\tif(arr[j]>arr[i])\n\t\t\t\t{\n\t\t\t\t\tlong temp=arr[i];\n\t\t\t\t\tarr[i]=arr[j];\n\t\t\t\t\tarr[j]=temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint[] a={9,7,6,4,5,6,2,4,1,5,6,9,7,8};\n\t\tSystem.out.println(\"排序前的数组如下:\"+Arrays.toString(a));\n\t\tint temp;\n\t\tfor(int i=1;i<a.length;i++){\n\t\t\ttemp=a[i];\n\t\t\tint j=i-1;\n\t\t\twhile(j>=0&&a[j]>temp){\n\t\t\t\ta[j+1]=a[j];\n\t\t\t\t--j;\n\t\t\t\t\n\t\t\t}\n\t\t\ta[j+1]=temp;\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"排序后的数组如下\"+Arrays.toString(a));\n\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\t int [] arr = new int [] {2,5,1,7,3,9,5}; \r\n\t int length=arr.length;\r\n\t\t \r\n\t\t Arrays.sort(arr);\r\n\t\t System.out.println(arr[length-1]-arr[0]);\r\n\t}", "public static void bubbleSort(int [] arr){\n int temp = 0; //temporary variable\n boolean flag = false; //mark if any reversion has happened\n for (int i = 0; i < arr.length - 1;i++){\n\n for (int j = 0; j < arr.length - 1-i; j++) {\n //if the previous number is bigger than the latter, reverse\n if (arr[j] > arr[j + 1]) {\n flag = true;\n temp = arr[j];\n arr[j] = arr[j + 1];\n arr[j + 1] = temp;\n }\n }\n\n //System.out.printf(\"After the %d round of sorting\",i+1);\n //System.out.println(Arrays.toString(arr));\n\n if(!flag){\n break;\n } else {\n flag = false;\n //reset flag to true to do the next check\n }\n }\n }", "@Test\n\tpublic void testReverse() {\n\t\tassertEquals(6543, Exercise6point3.reverse(3456));\n\t\tif (6543 == Exercise6point3.reverse(3456)) {\n\t\t\tSystem.out.println(\"Reverse function is correct.\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Reverse Function is a failure.\");\n\t\t}\n\t}", "public static void reverseInSameArray(int[] array) {\n\n int length = array.length;\n\n for (int i = 0; i < length / 2; i++) {\n swap(array, i, length / 2);\n\n }\n\n System.out.println(\"reverseInSameArray\");\n print(array);\n }", "@Test\n public void testBubbleSort() {\n BubbleSort<Integer> testing = new BubbleSort<>();\n\n testing.sort(array, new Comparator<Integer>() {\n @Override\n public int compare(Integer i1, Integer i2) {\n return i1.compareTo(i2);\n }\n });\n\n checkArray(\"Bubble sort doesn't work!\", array);\n }", "@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}", "public static void main (String[] args) {\r\n\t int arr[] = {1, 2, 3, 4, 5, 6};\r\n\t printArray(arr, 6);\r\n\t reverseArray(arr, 0, 5);\r\n\t System.out.println(\"Reversed array is \");\r\n\t printArray(arr, 6);\r\n\t }", "@Test\r\n public void trivialTest() {\r\n int[] unsorted = new int[0];\r\n int[] expResult = new int[0];\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\r\n }", "@Test\n public void testQuicksortWithNegativeValues() {\n Integer[] testArray = new Integer[]{7, -10, 17, 4, 1, 5};\n Quicksort.<Integer>quicksort(testArray, 0, testArray.length - 1);\n Integer[] expectedResult = {-10, 1, 4, 5, 7, 17};\n assertArrayEquals(expectedResult, testArray);\n }", "@Override\r\n\tpublic void sortDESC(int[] array) {\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\t\t\tfor (int j = i + 1; j < array.length; j++) {\r\n\t\t\t\t\r\n\t\t\t\tif (array[i] < array[j]) {\r\n\t\t\t\t\tint temp = array[i];\r\n\t\t\t\t\tarray[i] = array[j];\r\n\t\t\t\t\tarray[j] = temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void testSort_intArr_IntComparator_half() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "public static void main (String[] args) {\r\n int arr[] = {1, 2, 3, 4, 5, 6};\r\n printArray(arr, 6);\r\n rvereseArray(arr, 0, arr.length-1);\r\n System.out.println(\"Reversed array is \");\r\n printArray(arr, 6);\r\n }", "public static void sortReverse(Integer[] array) {\n Arrays.sort(array, new Comparator<Integer>() {\n @Override\n public int compare(Integer o1, Integer o2) {\n return o2.compareTo(o1);\n }\n });\n }", "@Test\n\tpublic void testSortSortedNumbers() {\n\t\tint[] arrayBeforeSort = { 104, 103, 102, 101, 100, 99, 98 };\n\t\tint[] arrayAfterSort = { 104, 103, 102, 101, 100, 99, 98 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\n public void case4SortSameSequence(){\n //Already sorted array\n SortDemoData data2 = new SortDemoData() ;\n\n int[] testArray = {1,2,3};\n data2.initializeArray(\"1 2 3\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Third Element\",data2.myArray[2].key == testArray[2]);\n data2.runAlgo(algoUnderTest);\n\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Third Element\",data2.myArray[2].key == testArray[2]);\n\n }", "public static void main(String[] args) {\n\t\t\n\tdouble[] array = new double[1048576];\n\t//http://stackoverflow.com/questions/215271/sort-arrays-of-primitive-types-in-descending-order\n\tArrays.sort(array);\n\t// reverse the array\n\tfor(int i=0;i<array.length/2;i++) {\n\t // swap the elements\n\t double temp = array[i];\n\t array[i] = array[array.length-(i+1)];\n\t array[array.length-(i+1)] = temp;\n\t}\n\t}", "@Test\n public void testSort_intArr() {\n int[] expResult = ASC_CHECK_ARRAY;\n sorter.sort(data);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n\tpublic void backwardsCopy_test2() {\n\t\tSystem.out.println(\"copy前:\" + Arrays.toString(intArr));\t\n\t\tint index = 1;\n//\t\tArrayUtil.backwardsCopy(intArr, index);\n//\t\t//[2, 4, 4, 8, 3, 6, 0, 0]\n//\t\tSystem.out.println(\"copy后(后移):\" + Arrays.toString(intArr));\n\t\tfor(int i = intArr.length - 1; i > index; i--){\n\t\t\tintArr[i] = intArr[i - 1];\n\t\t}\n//\t\t//[2, 4, 4, 8, 3, 6, 0, 0]\n\t\tSystem.out.println(\"copy后(后移):\" + Arrays.toString(intArr));\n\t}", "public static void reverseArray(int[] arr) {\r\n\t\tfor (int i = 0; i < arr.length / 2; i++) {\r\n\t\t\tint temp = arr[i];\r\n\t\t\tarr[i] = arr[arr.length - 1 - i];\r\n\t\t\tarr[arr.length - 1 - i] = temp;\r\n\t\t}\r\n\t}", "@Test\n public void testSort_intArr_IntegerComparator_Desc() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_ARRAY;\n sorter.sort(data, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void testSort_intArr_IntegerComparator_half() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void testQuickSort() {\n System.out.println(\"QuickSort listo\");\n Comparable[] list = {3,2,5,4,1};\n QuickSort instance = new QuickSort();\n Comparable[] expResult = {1,2,3,4,5};\n Comparable[] result = instance.QuickSort(list, 0, list.length-1);\n assertArrayEquals(expResult, result);\n }", "private static int[] reverseArray(int[] arr) {\n int n = arr.length;\n int[] revertedArray = new int[n];\n int j = n;\n\n for (int value : arr) {\n revertedArray[j - 1] = value;\n j = j - 1;\n }\n\n return revertedArray;\n }", "public static void main(String[] args) {\n\t\t\n\t\tint[] a = {1,2,3,4,5,6};\n\t\t\n\t\tint[] rev = new int[a.length];\n\t\t\n\t\tfor(int i=a.length-1;i>=0;i--) {\n\t\t\trev[a.length-1-i] = a[i];\n\t\t}\n\t\t\n\t\tfor(int j=0;j<rev.length;j++) {\n\t\tSystem.out.println(rev[j]);\n\t}\n\n}", "public static void testSort() {\n\t\tint[] test = {-1,-2,-3,4,1,3,0,3,-2,1,-2,2,-1,1,-5,4,-3};\n\t\tArrays.sort(test);\n\t\tfor (int e : test) {\n\t\t\tSystem.out.print(e + \", \");\n\t\t}\n\t}", "private static void reverse(int[] myArray) {\n int temp;\n for (int i = 0; i < myArray.length / 2; i++) {\n// System.out.println(\"first = \" + myArray[i]);\n// System.out.println(\"last = \" + myArray[myArray.length - 1 - i]);\n temp = myArray[i];\n myArray[i] = myArray[myArray.length - 1 - i];\n myArray[myArray.length - 1 - i] = temp;\n }\n }", "@Test\n void descendingSetDescendingSetReturnsOriginalSet() {\n assertArrayEquals(filledSet.toArray(), reverseSet.descendingSet().toArray());\n }", "public static void main(String[] args) {\n\t\tint a[] = {1, 2, 5, 9, 4};\n\t\tfor(int i=0;i<a.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<a.length-i-1;j++)\n\t\t\t{\n\t\t\t\tif(a[j+1] < a[j])\n\t\t\t\t{\n\t\t\t\t\tint temp = a[j];\n\t\t\t\t\ta[j] = a[j+1];\n\t\t\t\t\ta[j+1] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The sorted array is:\");\n\t\tfor(int i=0;i<a.length;i++)\n\t\t{\n\t\t\tSystem.out.print(a[i]+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "@Test\r\n\tpublic void testSortIntegersMethod1() {\r\n\t\tint[] arr1= {67,87,34,32,12,11};\r\n\t\tint[] sortedarr1 = {11,32,12,34,67,87};\r\n\t\tSorting.sortIntegers(arr1);\r\n\t\t assertEquals(false, Arrays.equals(arr1, sortedarr1));\r\n\t\t}", "private static void generateWorstUnsortArray(int[] array) {\n\n if (array.length == 2) {\n\n int swap = array[0];\n array[0] = array[1];\n array[1] = swap;\n } else if (array.length > 2) {\n\n int i, j;\n int m = (array.length + 1) / 2;\n int left[] = new int[m];\n int right[] = new int[array.length - m];\n\n for (i = 0, j = 0; i < array.length; i = i + 2, j++) {\n\n left[j] = array[i];\n }\n\n for (i = 1, j = 0; i < array.length; i= i + 2, j++) {\n\n right[j] = array[i];\n }\n\n generateWorstUnsortArray(left);\n generateWorstUnsortArray(right);\n merge(array, left, right);\n }\n }", "private void assertSorted(final IntPlus[] testArr,\n Comparator<IntPlus> cmp) {\n for (int i = 0; i < testArr.length - 1; i++) {\n assertTrue(\"Array was not sorted: element \" + i + \" was out \"\n + \"of order: \\n\" + Arrays.deepToString(testArr),\n cmp.compare(testArr[i], testArr[i + 1]) <= 0);\n\n }\n }", "public static void main(String[] args) {\r\n\t\tInteger[] givenArr = {3,4,6,2,9,34,87,91,2,6,8,65,86,71,33};\r\n\t\tint[] givenIntArr = {3,4,6,2,9,34,87,91,2,6,8,65,86,71,33};\r\n\t\tprint(givenArr);\r\n\t\tArrays.sort(givenArr,Collections.reverseOrder());\r\n\t\tArrays.sort(givenIntArr);\r\n\t\tprint(givenArr);\r\n\t}", "@Test\r\n public void descendingIterator() throws Exception {\r\n Iterator<Integer> it = sInt.descendingIterator();\r\n int[] arr = {5, 4, 3, 2, 1};\r\n int[] res = new int[5];\r\n int i = 0;\r\n while (it.hasNext()) {\r\n res[i++] = it.next();\r\n }\r\n assertArrayEquals(arr, res);\r\n }", "private void reverse(int[] nums, int start, int end) {\n\t\twhile(start<end)\n\t\t{\n\t\t\tswap(nums,start++,end--);\n\t\t}\n\t}", "private static void sort(int[] arr) {\n\t\tint lesserIndex=-1;\n\t\tint arrLen = arr.length ; \n\t\tfor(int i=0; i<arrLen; i++){\n\t\t\tif(arr[i]<0){\n\t\t\t\tlesserIndex++; \n\t\t\t\tint tmp = arr[lesserIndex]; \n\t\t\t\tarr[lesserIndex] = arr[i];\n\t\t\t\tarr[i] = tmp; \n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint negBound = lesserIndex+1;\n\t\tint posIndex = negBound;\n\t\t\n\t\tfor(int negIngex = 0;negIngex<negBound && posIndex<arr.length; negIngex+=2, posIndex+=1){\n\t\t\tint tmp = arr[posIndex]; \n\t\t\tarr[posIndex] = arr[negIngex] ; \n\t\t\tarr[negIngex] = tmp ;\n\t\t\tnegBound++;\n\t\t}\n\t\t\n\t\t\n\t\tfor(int a : arr) {\n\t\t\tSystem.out.print(a);\n\t\t}\n\t\t\n\t}", "@Test\n public void newSortingTest2() {\n newSorting sort = new newSorting();\n int[] arr = {0, 5, 1, 8, 0, 0};\n int[] expected = {0, 0, 0, 1, 5, 8};\n sort.newSorting(arr, 4);\n assertArrayEquals(arr, expected);\n }", "public static void reverse(int[] a){\n \n int n = a.length;\n \n for(int i = 0; i<n/2;i++){\n int c = a[i];\n int d = a[n-1-i];\n int temp=0;\n \n temp =c;\n c= d;\n d=temp;\n a[i]= c;\n a[n-1-i]=d;\n }\n \n \n \n }", "public static void reverse(byte[] array) {\n if (array == null) {\n return;\n }\n int i = 0;\n int j = array.length - 1;\n byte tmp;\n while (j > i) {\n tmp = array[j];\n array[j] = array[i];\n array[i] = tmp;\n j--;\n i++;\n }\n }", "@Test\n public void correctnessReverse() {\n final Iterator<Partition<Integer>> it = Partitions.lexicographicEnumeration(Helper.newHashSet(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), new int[]{3, 5}, ImmutablePartition::new);\n final Iterator<Partition<Integer>> itr = Partitions.reverseLexicographicEnumeration(Helper.newHashSet(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), new int[]{3, 5}, ImmutablePartition::new);\n final List<Partition<Integer>> partitions = new ArrayList<>();\n final List<Partition<Integer>> partitionsReverse = new ArrayList<>();\n while (it.hasNext() && itr.hasNext()) {\n final Partition<Integer> p = it.next();\n final Partition<Integer> pr = itr.next();\n partitions.add(p);\n partitionsReverse.add(pr);\n }\n Assert.assertTrue(!it.hasNext() && !itr.hasNext());\n Collections.reverse(partitionsReverse);\n Assert.assertEquals(partitions, partitionsReverse);\n }", "private static void reverse(int[] arr, int i, int length) {\n\t\tif(i >= length)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint temp=arr[i];\r\n\t\tarr[i]=arr[length];\r\n\t\tarr[length]=temp;\r\n\t\treverse(arr, i+1, length-1);\r\n\t}", "public static void reverse(int[] array){\n int[] reverseArray = Arrays.copyOf(array,array.length);\n for(int i=0;i<array.length;i++){\n reverseArray[i]=array[array.length-i-1];\n }\n System.out.println(\"The reversed assay is:\"+ Arrays.toString(reverseArray));\n }", "public void reverse(int[] nums, int low, int high) {\n while (low < high) {\n\n // swap low and high indices\n int temp = nums[high];\n nums[high--] = nums[low];\n nums[low++] = temp;\n }\n }", "public static void main(String args[])\n {\n JavaBuiltInSort ob = new JavaBuiltInSort();\n\n /*\n\n Integer arr[] = {64, 34, 25, 12, 22, 90, 11};\n System.out.println(\"The Unsorted array is\");\n ob.printArray(arr);\n\n sort(arr, 3, 7);\n System.out.println(\"The Java Built In Sort of the last 4 elements is\");\n ob.printArray(arr);\n\n sort(arr);\n System.out.println(\"The Java Built In Sorted array is\");\n ob.printArray(arr);\n\n sort(arr, Collections.reverseOrder());\n System.out.println(\"The Java Built in Reverse Sorted array is\");\n ob.printArray(arr);\n\n */\n\n String arr[] = {\n \"Michael\",\n \"Tamara\",\n \"Mackenzie\",\n \"Caius\",\n \"Emilia\",\n \"Katie\",\n \"Michael\",\n \"Maggie\",\n \"Austin\"\n };\n\n System.out.println(\"The Unsorted array is\");\n ob.printArray(arr);\n\n sort(arr);\n System.out.println(\"The Java Built In Sorted array is\");\n ob.printArray(arr);\n\n sort(arr, Collections.reverseOrder());\n System.out.println(\"The Java Built in Reverse Sorted array is\");\n ob.printArray(arr);\n\n sort(arr, arr.length-4, arr.length);\n System.out.println(\"The Java Built in Sort of the last 4 elements is\");\n ob.printArray(arr);\n }", "public static void main(String[] args) {\n\t\tSortTransformedArray result = new SortTransformedArray();\n\t\tSystem.out.println(Arrays.toString(result.sortTransformedArray(new int[] {-4, -2, 2, 4}, 1, 3, 5)));\n\t\tSystem.out.println(Arrays.toString(result.sortTransformedArray(new int[] {-4, -2, 2, 4}, -1, 3, 5)));\n\t}", "@Test\n public void newSortingTest() {\n newSorting sort = new newSorting();\n int[] arr = {3, 2, 6, 5, 1, 7, 4};\n int[] expected = {1, 2, 3, 4, 5, 6, 7};\n sort.newSorting(arr, 4);\n assertArrayEquals(arr, expected);\n }", "public static <T extends Comparable<? super T>> void sortTest(T[] a) {\n int N = a.length;\n int q = 0;\n for (int i = 1; i < N; i++) { \n // Insert a[i] among a[i-1], a[i-2], a[i-3]... ..\n for (int j = i; j > 0 && less(a[j], a[j-1]); j--) {\n exch(a, j, j-1); q = j;\n }\n }\n System.out.println(\"q==j==\"+q);\n }", "public static void reverseIterative(int[] data) {\n int low = 0, high = data.length - 1;\n while (low < high) { // swap data[low] and data[high]\n int temp = data[low];\n data[low++] = data[high]; // post-increment of low\n data[high--] = temp; // post-decrement of high\n }\n }", "private static int[] Reverse(int[] num, int left, int right)\n\t{\n\t\tif(num == null || num.length == 1)\n\t\t\treturn num;\n\t\t\n\t\t// Swap values for the given point of left end and right end of the array.\n\t\twhile(left < right)\n\t\t{\n\t\t\tint temp;\n\t\t\ttemp = num[left];\n\t\t\tnum[left++] = num[right];\n\t\t\tnum[right--] = temp;\n\t\t\t//left ++;\n\t\t\t//right --;\n\t\t}\n\t\treturn num;\n\t}", "public static void sortDesc(int[] theArray) {\n\n\n //convert the array with int to a list with Integer\n //boxed convert the int to an Integer. collectors.toList() converts the array to a list.\n List<Integer> thelist = Arrays.stream(theArray).boxed().collect(Collectors.toList());\n //sort it in reverse\n Collections.sort(thelist, Collections.reverseOrder());\n\n //since the List has Integer and not int anymore..\n for (int i = 0; i < theArray.length; i++) {\n theArray[i] = thelist.get(i);\n }\n\n ////ALT code\n ////using bubblesort Algorithm\n\n// int len = theArray.length;\n// int temp = 0;\n//\n// for (int i = 0; i < len; i++) {\n// for (int j = 1; j < (len-i); j++) {\n//\n// if (theArray[j - 1] < theArray[j]) {\n// //switch position\n// temp = theArray[j - 1];\n// theArray[j - 1] = theArray[j];\n// theArray[j] = temp;\n// }\n//\n// }\n// }\n\n }", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t\tint[] intArray = {20, 35, -15, 7, 55, 1, -22};\r\n\t\t\r\n\t\tfor(int firstUnsortedIndex = 1; firstUnsortedIndex< intArray.length; firstUnsortedIndex++) {\r\n\t\t\tint temp = intArray[firstUnsortedIndex];\r\n\t\t\tint index = 0;\r\n\t\t\tfor(int i=firstUnsortedIndex-1; i>=0;i--) {\r\n\t\t\t\tif(intArray[i]> temp) {\r\n\t\t\t\t\tintArray[i+1]=intArray[i];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tindex=i+1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tintArray[index]=temp;\r\n\t\t}\r\n\t\tSystem.out.println(Arrays.toString(intArray));\r\n\r\n\t}", "public static void main(String[] args) {\r\n\t\tint arr[] = {1,0,5,6,3,2,3,7,9,8,4};\r\n\t\tint temp;\r\n\t\t\r\n\t\tfor(int i = 0; i < 10; i ++) {\r\n\t\t\tfor(int j = 0; j < 10 - i; j ++) {\r\n\t\t\t\tif(arr[j] > arr[j+1]){\r\n\t\t\t\t\ttemp = arr[j+1];\r\n\t\t\t\t\tarr[j+1] = arr[j];\r\n\t\t\t\t\tarr[j] = temp;\r\n\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < 11; i ++) {\r\n\t\t\tSystem.out.println(arr[i]);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n int[] array = {5, 35, 75, 25, 95, 55, 45};\n // Arrays.sort(array);\n\n\n int j = array.length-1;\n for (int i = array.length-1; i >= 0; i--){\n array[j] = array[i];\n j--;\n //System.out.println(array[i]);\n }\n\n System.out.println(\"##########################\");\n //int max2 = array[array.length-1];\n\n //System.out.println(max2);\n double[] arr2 = {5.7, 35.0, 75.6, 25.3, 95.15, 55.88, 55.45};\n\n char[] ch = {'A', 'C', 'F', 'G', 'D', 'E', 'H', 'B'};\n\n\n maxNumber(array);\n\n maxNumber(arr2);\n\n System.out.println(\"><><><><><><><><><><><><><><><\");\n\n int[ ] des = Descending(array);\n System.out.println(Arrays.toString(des));\n\n double[] dess = Descending(arr2);\n System.out.println(Arrays.toString(dess));\n\n char[] desss = Descending(ch);\n System.out.println(Arrays.toString(desss));\n\n System.out.println(\"><><><><><><><><><><><><><><><\");\n\n }", "public static void decending(int arr[]){\n int temp=0; // created temp variable to store the array value\n System.out.println(\"The order of array elememts in decending order\");\n for(int i=0;i<arr.length;i++){\n for(int j=i+1;j<arr.length;j++){ //loop to sort the arrays in decending order\n if(arr[i]<arr[j]){\n temp=arr[i];\n arr[i]=arr[j];\n arr[j]=temp;\n }\n }\n System.out.print(arr[i]);\n }\n }", "@Test\n public void newSortingTest5() {\n newSorting sort = new newSorting();\n int[] arr = {10, 100, 20, 90, 30, 80, 40, 70, 50, 60};\n int[] expected = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};\n sort.newSorting(arr, 2);\n assertArrayEquals(arr, expected);\n }", "void reverseH(char arr[],int start) {\nif(arr == null)\n return;\n if(start==(arr.length/2))\n return;\n \n int i=start;\n if(arr[i] != arr[arr.length-1-i])\n {\n arr[i]^=arr[arr.length-1-i];\n arr[arr.length-1-i]^=arr[i];\n arr[i]^=arr[arr.length-1-i];\n }\n reverseH(arr,start+1);\n}", "@Test\r\n public void testCrSortVector() {\r\n System.out.println(\"CrSortVector\");\r\n int[] vector = {1,8,3,4};\r\n VectorHelper instance = new VectorHelper();\r\n int[] expResult = {1,3,4,8};\r\n int[] result = instance.CrSortVector(vector);\r\n assertArrayEquals(expResult, result);\r\n \r\n }", "@Test\n public void testSort_intArr_IntComparator_Asc_Middle() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_MIDDLE_SORT_ARRAY;\n sorter.sort(data, 4, 10, comparator);\n// System.out.println(\"Expected: \" + Arrays.toString(expResult));\n// System.out.println(\"Result: \" + Arrays.toString(data));\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "private void sorter(int[] array){\r\n\r\n for (int i = 0; i < array.length-1; i++)\r\n for (int j = 0; j < array.length-i-1; j++)\r\n if (array[j] > array[j+1])\r\n {\r\n int temp = array[j];\r\n array[j] = array[j+1];\r\n array[j+1] = temp;\r\n }\r\n }" ]
[ "0.7924808", "0.7835651", "0.78318965", "0.76262397", "0.7382609", "0.68772745", "0.68648535", "0.677624", "0.6719571", "0.6702716", "0.66463184", "0.6645347", "0.6549357", "0.65435684", "0.6451039", "0.6443457", "0.6443123", "0.64294", "0.6427885", "0.6418502", "0.64040196", "0.639062", "0.63605094", "0.63465226", "0.634602", "0.63449794", "0.6332845", "0.6332552", "0.6324827", "0.63131124", "0.63027436", "0.6302678", "0.6297445", "0.62973684", "0.6282929", "0.6278438", "0.6269763", "0.62432235", "0.62381256", "0.6235815", "0.62328994", "0.6229649", "0.6228944", "0.6224547", "0.62226486", "0.6212225", "0.62105465", "0.6206408", "0.6206017", "0.62020016", "0.6186531", "0.6171563", "0.6169145", "0.6162303", "0.6154347", "0.61507505", "0.61480504", "0.6137082", "0.61301273", "0.61212665", "0.6115565", "0.61091214", "0.61082834", "0.610516", "0.609886", "0.60869783", "0.6054587", "0.6049612", "0.60421425", "0.60285753", "0.6026208", "0.60243946", "0.60199356", "0.60179406", "0.6012361", "0.6004244", "0.60036016", "0.6001909", "0.5999165", "0.5988061", "0.5987097", "0.59826314", "0.5979991", "0.59639776", "0.59572375", "0.59528744", "0.59506536", "0.5950314", "0.5943865", "0.5942527", "0.5931989", "0.5929114", "0.59289265", "0.5922836", "0.59206235", "0.5919083", "0.59148407", "0.59109807", "0.59092885", "0.5900388" ]
0.5923499
93
The following test case checks if the array can be sorted with negative numbers and duplicates numbers. Test case : PASSED
@Test public void newSortingTest4() { newSorting sort = new newSorting(); int[] arr = {-1, 0, 1, 0, 1, 0, -1}; int[] expected = {-1, -1, 0, 0, 0, 1, 1}; sort.newSorting(arr, 3); assertArrayEquals(arr, expected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void repeatedValuesTest() {\r\n int[] unsorted = new int[]{1,33,1,0,33,-23,1,-23,1,0,-23};\r\n int[] expResult = new int[]{-23,-23,-23,0,0,1,1,1,1,33,33};\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\r\n }", "@Test\n\tpublic void testSortRepeatableNumbers() {\n\t\tint[] arrayBeforeSort = { 104, 104, 0, 9, 56, 0, 9, 77, 88 };\n\t\tint[] arrayAfterSort = { 104, 104, 0, 9, 56, 0, 9, 77, 88 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\n\tpublic void testSortPositiveNegativeElements() {\n\t\tint[] arrayBeforeSort = { 565, -78, 34, -2, 23, 2222, 34 };\n\t\tint[] arrayAfterSort = { 565, -78, 34, -2, 23, 2222, 34 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\n\tpublic void testSortOnlyNegativeElements() {\n\t\tint[] arrayBeforeSort = { -565, -78, -34, -2, -23, -2222, -34 };\n\t\tint[] arrayAfterSort = { -565, -78, -34, -2, -23, -2222, -34 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "public void testSortAndDedup() {\n assertDeduped(List.<String>of(), Comparator.naturalOrder(), 0);\n // test no elements in an integer array\n assertDeduped(List.<Integer>of(), Comparator.naturalOrder(), 0);\n // test unsorted array\n assertDeduped(List.of(-1, 0, 2, 1, -1, 19, -1), Comparator.naturalOrder(), 5);\n // test sorted array\n assertDeduped(List.of(-1, 0, 1, 2, 19, 19), Comparator.naturalOrder(), 5);\n // test sorted\n }", "@Test\r\n public void mixedSignTest() {\r\n int[] unsorted = new int[]{111,-35,0,23,-9,-100,99,970};\r\n int[] expResult = new int[]{-100,-35,-9,0,23,99,111,970};\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\r\n }", "@Test\n\tpublic void testSortNormalElements() {\n\t\tint[] arrayBeforeSort = { 565, 78, 34, 2, 23, 2222, 34 };\n\t\tint[] arrayAfterSort = { 565, 78, 34, 2, 23, 2222, 34 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\r\n public void trivialTest() {\r\n int[] unsorted = new int[0];\r\n int[] expResult = new int[0];\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\r\n }", "@Test\n\tpublic void testSortOneElementInArray() {\n\t\tint[] arrayBeforeSort = { 565 };\n\t\tint[] arrayAfterSort = { 565 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\r\n public void confirmNumericalSortTest() {\r\n int[] unsorted = new int[]{2,10,1,3,4,100,20};\r\n int[] expResult = new int[]{1,2,3,4,10,20,100};\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\r\n }", "@Test\n\tpublic void testSortSortedNumbers() {\n\t\tint[] arrayBeforeSort = { 104, 103, 102, 101, 100, 99, 98 };\n\t\tint[] arrayAfterSort = { 104, 103, 102, 101, 100, 99, 98 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\r\n public void testSort() {\r\n System.out.println(\"sort\");\r\n int[] array = {6, 3, 7, 9, 4, 1, 3, 7, 0};\r\n int[] expResult = {0, 1, 3, 3, 4, 6, 7, 7, 9};\r\n\r\n int[] result = new InsertionSort().sort(array);\r\n\r\n assertArrayEquals(expResult, result);\r\n \r\n array = new int[10000];\r\n for (int i = 0; i < array.length; i++) {\r\n array[i] = new Random().nextInt(Integer.MAX_VALUE);\r\n }\r\n expResult = Arrays.copyOf(array, array.length);\r\n Arrays.sort(expResult);\r\n \r\n result = new InsertionSort().sort(array);\r\n\r\n assertArrayEquals(expResult, result);\r\n }", "public static void testSort() {\n\t\tint[] test = {-1,-2,-3,4,1,3,0,3,-2,1,-2,2,-1,1,-5,4,-3};\n\t\tArrays.sort(test);\n\t\tfor (int e : test) {\n\t\t\tSystem.out.print(e + \", \");\n\t\t}\n\t}", "@Test\r\n\tpublic void testSortIntegersMethod1() {\r\n\t\tint[] arr1= {67,87,34,32,12,11};\r\n\t\tint[] sortedarr1 = {11,32,12,34,67,87};\r\n\t\tSorting.sortIntegers(arr1);\r\n\t\t assertEquals(false, Arrays.equals(arr1, sortedarr1));\r\n\t\t}", "private void assertSorted(final IntPlus[] testArr,\n Comparator<IntPlus> cmp) {\n for (int i = 0; i < testArr.length - 1; i++) {\n assertTrue(\"Array was not sorted: element \" + i + \" was out \"\n + \"of order: \\n\" + Arrays.deepToString(testArr),\n cmp.compare(testArr[i], testArr[i + 1]) <= 0);\n\n }\n }", "@Test\n public void testQuicksortWithNegativeValues() {\n Integer[] testArray = new Integer[]{7, -10, 17, 4, 1, 5};\n Quicksort.<Integer>quicksort(testArray, 0, testArray.length - 1);\n Integer[] expectedResult = {-10, 1, 4, 5, 7, 17};\n assertArrayEquals(expectedResult, testArray);\n }", "private static void findDuplicatesBySorting(int[] arr) {\n\t\t\n\t\tint[] givenArray = arr;\n\t\tArrays.sort(givenArray);\n\t\t\n\t\tfor ( int i=0; i<givenArray.length - 1 ; i++)\n\t\t{\n\t\t\tif( givenArray[i] == givenArray[i+1])\n\t\t\t{\n\t\t\t\tSystem.out.println(givenArray[i] + \" is the duplicate by sort method \");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t\n\t}", "private void assertStablySorted(final IntPlus[] origArr,\n final IntPlus[] testArr,\n Comparator<IntPlus> cmp) {\n //Create copy of original array and sort it\n IntPlus[] stablySortedArr = cloneArr(origArr);\n Arrays.parallelSort(stablySortedArr, cmp); //guaranteed to be stable\n\n //Works since stable sorts are unique - there is 1 right answer.\n for (int i = 0; i < origArr.length; i++) {\n assertEquals(\"Array was not stably sorted: element \" + i + \" was \"\n + \"out of order. Expected:\\n\"\n + Arrays.deepToString(stablySortedArr) + \"\\nYours:\"\n + \"\\n\" + Arrays.deepToString(testArr),\n stablySortedArr[i], testArr[i]);\n }\n }", "@Test(expectedExceptions = IllegalArgumentException.class)\n\tpublic void testSortEmptyArray() {\n\t\tint[] array = {};\n\t\tArrayQuickSort.sort(array);\n\t}", "@Test\n\tpublic void givenAnArrayWithTwoElements_ThenItIsSorted() {\n\t\tList<Integer> unsorted = new ArrayList<>();\n\t\tunsorted.add(2);\n\t\tunsorted.add(1);\n\t\t\n\t\t// Execute the code\n\t\tList<Integer> sorted = QuickSort.getInstance().sort(unsorted);\n\t\t\t\n\t\t// Verify the test result(s)\n\t\tassertThat(sorted.get(0), is(1));\n\t\tassertThat(sorted.get(1), is(2));\n\t}", "@Test\n\tpublic void testSortTwoElements() {\n\t\tint[] arrayBeforeSort = { 565, 45 };\n\t\tint[] arrayAfterSort = { 565, 45 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\n public void testSort_intArr() {\n int[] expResult = ASC_CHECK_ARRAY;\n sorter.sort(data);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testAdaptiveInsertionSort() {\n //Test adaptiveness of completely ordered sort\n\n //Generate sorted array\n toSort = randArrDuplicates(MAX_ARR_SIZE, new Random(2110));\n Arrays.parallelSort(toSort, comp);\n sortedInts = cloneArr(toSort);\n\n comp.resetCount();\n Sorting.insertionSort(sortedInts, comp);\n int numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n //Should require only 1 pass through array, for n-1 comparisons\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= MAX_ARR_SIZE - 1);\n\n //Check adaptiveness with 1 item out-of-order\n\n //Set up list\n toSort = new IntPlus[6];\n for (int i = 0; i < toSort.length; i++) {\n toSort[i] = new IntPlus(2 * i);\n }\n toSort[3] = new IntPlus(-1);\n\n sortedInts = cloneArr(toSort);\n\n /*\n Initial Array: [0, 2, 4, -1, 8, 10]\n Should require 7 comparisons to sort\n */\n comp.resetCount();\n Sorting.insertionSort(sortedInts, comp);\n numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= 7);\n }", "private static void sort(int[] arr) {\n\t\tint lesserIndex=-1;\n\t\tint arrLen = arr.length ; \n\t\tfor(int i=0; i<arrLen; i++){\n\t\t\tif(arr[i]<0){\n\t\t\t\tlesserIndex++; \n\t\t\t\tint tmp = arr[lesserIndex]; \n\t\t\t\tarr[lesserIndex] = arr[i];\n\t\t\t\tarr[i] = tmp; \n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint negBound = lesserIndex+1;\n\t\tint posIndex = negBound;\n\t\t\n\t\tfor(int negIngex = 0;negIngex<negBound && posIndex<arr.length; negIngex+=2, posIndex+=1){\n\t\t\tint tmp = arr[posIndex]; \n\t\t\tarr[posIndex] = arr[negIngex] ; \n\t\t\tarr[negIngex] = tmp ;\n\t\t\tnegBound++;\n\t\t}\n\t\t\n\t\t\n\t\tfor(int a : arr) {\n\t\t\tSystem.out.print(a);\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int noOfElements = sc.nextInt();\n int[] arr = new int[noOfElements];\n int[] arr1 = new int[noOfElements];\n int diff = Integer.MAX_VALUE;\n int sIndex = 0;\n int j = 0;\n for (int i = 0; i < noOfElements; i++) {\n arr[i] = sc.nextInt();\n }\n for (int j1 = 1; j1 < noOfElements; j1++) {\n int i = j1 - 1;\n int key = arr[j1];\n while (i >= 0 && key < arr[i]) { // 1 2 3\n arr[i + 1] = arr[i];\n i--;\n }\n arr[i + 1] = key;\n }\n //Arrays.sort(arr);\n for (int i = 0; i < noOfElements - 1; i++) {\n int temp = Math.abs(arr[i] - arr[i + 1]);\n if (temp <= diff) {\n diff=temp;\n }\n\n }\n\n for (int i = 0; i < noOfElements - 1; i++) {\n if (Math.abs(arr[i] - arr[i+1]) == diff) {\n System.out.print(arr[i] + \" \" + arr[i+1] + \" \");\n }\n }\n// for (int a = 0; a < j; a++) {\n//\n// System.out.print(arr[arr1[a]] + \" \" + arr[arr1[a]+1] + \" \");\n// }\n\n }", "@Test\n public void case3SortTwoElements(){\n //Already sorted array\n SortDemoData data2 = new SortDemoData() ;\n\n int[] testArray = {1,2};\n data2.initializeArray(\"2 1\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data2.myArray[1].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data2.myArray[0].key == testArray[1]);\n\n data2.runAlgo(algoUnderTest);\n \n if(algoUnderTest != 0)\n {\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n }\n \n else {\n \t assertFalse(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n }\n\n\n }", "@Test\n public void testSort_intArr_IntComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "public static <T extends Comparable<? super T>> void sortTest(T[] a) {\n int N = a.length;\n int q = 0;\n for (int i = 1; i < N; i++) { \n // Insert a[i] among a[i-1], a[i-2], a[i-3]... ..\n for (int j = i; j > 0 && less(a[j], a[j-1]); j--) {\n exch(a, j, j-1); q = j;\n }\n }\n System.out.println(\"q==j==\"+q);\n }", "public static void verifySortedIntArrayDesc(int[] a) {\n for (int i = 1; i < a.length; ++i) {\n Assert.assertTrue(a[i] <= a[i - 1]);\n }\n }", "@Test\r\n public void SortTest() {\r\n System.out.println(\"sort\");\r\n List<String> array = Arrays.asList(\"3\", \"2\", \"1\");\r\n List<String> expResult = Arrays.asList(\"1\",\"2\",\"3\");\r\n instance.sort(array);\r\n assertEquals(expResult,array);\r\n }", "public static void verifySortedIntArrayAsc(int[] a) {\n for (int i = 1; i < a.length; ++i) {\n Assert.assertTrue(a[i - 1] <= a[i]);\n }\n }", "@Test\n public void testSort_intArr_IntComparator_Desc() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_ARRAY;\n sorter.sort(data, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\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 }", "@Test\n public void testSort_intArr_IntegerComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void testSort_intArr_half() {\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void testPrueba1(){\n \n System.out.println(\"Prueba 1\");\n int[] input = new int[]{1, 2, 3, 5, 4};\n int[] expectedResult = new int[]{1, 2, 3, 4, 5};\n int[] actualResult = BubbleSort.sortBasic(input);\n assertArrayEquals(expectedResult, actualResult);\n \n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinyInsertionSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.insertionSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.insertionSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }", "private static void findDuplicateInteger2(Integer[] array) {\n\t\t\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\t\t\n\t\t\tint item = array[Math.abs(array[i])];\n\t\t\tif( item > 0) {\n\t\t\t\tarray[Math.abs(array[i])] = -item;\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"duplicated \"+ Math.abs(array[i]));\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testSort_intArr_IntComparator() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_ARRAY;\n sorter.sort(data, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "private void assertSorted(final int[] testArr) {\n for (int i = 0; i < testArr.length - 1; i++) {\n assertTrue(\"Array was not sorted: element \" + i + \" was out \"\n + \"of order: \\n\" + Arrays.toString(testArr),\n testArr[i] <= testArr[i + 1]);\n\n }\n }", "@Test\n public void testBubbleSort() {\n BubbleSort<Integer> testing = new BubbleSort<>();\n\n testing.sort(array, new Comparator<Integer>() {\n @Override\n public int compare(Integer i1, Integer i2) {\n return i1.compareTo(i2);\n }\n });\n\n checkArray(\"Bubble sort doesn't work!\", array);\n }", "@Test\n public void case5SortReversedSequence(){\n //Completely reverse sorted array\n int[] testArray = {1,2,3};\n SortDemoData data3 = new SortDemoData() ;\n data3.initializeArray(\"3 2 1\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data3.myArray[2].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data3.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Third Element\",data3.myArray[0].key == testArray[2]);\n\n data3.runAlgo(algoUnderTest);\n\n if(algoUnderTest != 0)\n {\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data3.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data3.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Third Element\",data3.myArray[2].key == testArray[2]);\n }\n else {\n \t assertFalse(map.get(algoUnderTest)+\" After Sort ...First Element\",data3.myArray[0].key == testArray[0]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Second Element\",data3.myArray[1].key == testArray[1]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Third Element\",data3.myArray[2].key == testArray[2]);\n }\n \n }", "@Test\n public void case4SortSameSequence(){\n //Already sorted array\n SortDemoData data2 = new SortDemoData() ;\n\n int[] testArray = {1,2,3};\n data2.initializeArray(\"1 2 3\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Third Element\",data2.myArray[2].key == testArray[2]);\n data2.runAlgo(algoUnderTest);\n\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Third Element\",data2.myArray[2].key == testArray[2]);\n\n }", "public static <T extends Comparable<? super T>> void sortTest2(T[] a) {\n int N = a.length;\n for (int i = 1; i < N; i++) { \n // Insert a[i] among a[i-1], a[i-2], a[i-3]... ..\n for (int j = i; j > 0 && lessTest(a[j], a[j-1]); j--) {\n exch(a, j, j-1);\n }\n }\n }", "@Test\n public void testSort_intArr_IntComparator_half() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void testSort_intArr_IntegerComparator_Desc() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_ARRAY;\n sorter.sort(data, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinyCocktailShakerSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.cocktailSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.cocktailSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }", "public static void findMultipleDupes(int[] arr){\n\n for(int i : arr){\n \n if(arr[Math.abs(i)] > 0){\n arr[Math.abs(i)] = -arr[Math.abs(i)];\n }else\n System.out.println(Math.abs(i));\n }\n\n}", "@Test\n public void testSort_intArr_IntegerComparator_half() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void sortArrayQuickSortTest() {\n int[] array1 = new int[]{5, 2, 3, 1};\n int[] expectedArray1 = new int[]{1, 2, 3, 5};\n int[] actualArray1 = sortArrayQuickSort(array1);\n assertArrayEquals(expectedArray1, actualArray1);\n /**\n * Example 2:\n * Input: nums = [5,1,1,2,0,0]\n * Output: [0,0,1,1,2,5]\n */\n int[] array2 = new int[]{5, 1, 1, 2, 0, 0};\n int[] expectedArray2 = new int[]{0, 0, 1, 1, 2, 5};\n int[] actualArray2 = sortArrayQuickSort(array2);\n assertArrayEquals(expectedArray2, actualArray2);\n }", "public static void testAlgos() {\n\t\tint[] array;\n\t\t//Test of sorts and searches\n\t\tint[] arrayTest = generateArray(20, -20, 20);\n\t\t//Bubble Sort\n\t\tarray = copyArray(arrayTest);\n\t\tSort.bubbleSort(array);\n\t\tSystem.out.println(\"Bubble Sorted Array:\");\n\t\tprintArray(array);\n\t\t//Selection Sort\n\t\tarray = copyArray(arrayTest);\n\t\tSort.selectionSort(array);\n\t\tSystem.out.println(\"Selection Sorted Array:\");\n\t\tprintArray(array);\n\t\t//Insertion Sort\n\t\tarray = copyArray(arrayTest);\n\t\tSort.insertionSort(array);\n\t\tSystem.out.println(\"Insertion Sorted Array:\");\n\t\tprintArray(array);\n\t\t//Quick Sort\n\t\tarray = copyArray(arrayTest);\n\t\tSort.quickSort(array);\n\t\tSystem.out.println(\"Quick Sorted Array:\");\n\t\tprintArray(array);\n\t\t//Merge Sort\n\t\tarray = copyArray(arrayTest);\n\t\tSort.mergeSort(array);\n\t\tSystem.out.println(\"Merge Sorted Array:\");\n\t\tprintArray(array);\n\t\t//Test of linear search on sorted array\n\t\tSystem.out.printf(\"%6s%6s%20s%20s%n\", \"Value\", \"Index\",\"Linear Result\",\"Binary Result\");\n\t\tSystem.out.printf(\"%6d%6d%20d%20d%n\", array[2], 2, Search.linearSearch(array, array[2]),Search.binarySearch(array, array[2]));\n\t\tSystem.out.printf(\"%6d%6d%20d%20d%n\", array[5], 5, Search.linearSearch(array, array[5]),Search.binarySearch(array, array[5]));\n\t\tSystem.out.printf(\"%6d%6d%20d%20d%n\", array[17], 17, Search.linearSearch(array, array[17]),Search.binarySearch(array, array[17]));\n\t\tSystem.out.printf(\"%6d%6d%20d%20d%n\", -40, -1, Search.linearSearch(array, -40),Search.binarySearch(array, -40));\n\t}", "@Test\n public void newSortingTest2() {\n newSorting sort = new newSorting();\n int[] arr = {0, 5, 1, 8, 0, 0};\n int[] expected = {0, 0, 0, 1, 5, 8};\n sort.newSorting(arr, 4);\n assertArrayEquals(arr, expected);\n }", "static boolean isSorted(int[] array) {\n for (int i = 0; i < array.length - 1; i++) {\n if (array[i] > array[i + 1])\n return false;\n }\n return true;\n }", "@Test\n public void testSort_intArr_IntegerComparator() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_ARRAY;\n sorter.sort(data, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void heapSort(){\n int[] array = {3, 9, 6, 5, 2, 8, 7};\n SortTestHelper.testSort(new QuickSort(), array);\n SortTestHelper.print(array);\n }", "private void testCountingSort() {\n int listSize = 1000000;\r\n // Generate list of random values\r\n int[] a = new int[listSize];\r\n Random r = new Random();\r\n for (int i = 0; i < a.length; i++) {\r\n a[i] = r.nextInt(20000);\r\n }\r\n \r\n //a = new int[] {10, 20, 8, -4, -7, 22 };\r\n\r\n // Copy list to new array\r\n int[] a2 = new int[listSize];\r\n System.arraycopy(a, 0, a2, 0, a.length);\r\n\r\n TestUtil.print(a);\r\n // Sort the two arrays\r\n long time = System.currentTimeMillis();\r\n countSort(a);\r\n time = System.currentTimeMillis() - time;\r\n System.out.println(\"Count sort took: \" + time);\r\n TestUtil.print(a);\r\n time = System.currentTimeMillis();\r\n Arrays.sort(a2);\r\n time = System.currentTimeMillis() - time;\r\n System.out.println(\"Java sort took: \" + time);\r\n\r\n // Compare the two arrays\r\n for (int i = 0; i < listSize; i++) {\r\n if (a[i] != a2[i]) {\r\n System.out.println(\"Error: Results do not match.\");\r\n return;\r\n }\r\n }\r\n System.out.println(\"Sort successful\");\t\t\r\n\t}", "@Test\n public void newSortingTest3() {\n newSorting sort = new newSorting();\n int[] arr = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};\n int[] expected = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\n sort.newSorting(arr, 5);\n assertArrayEquals(arr, expected);\n\n }", "@Test\n public void newSortingTest5() {\n newSorting sort = new newSorting();\n int[] arr = {10, 100, 20, 90, 30, 80, 40, 70, 50, 60};\n int[] expected = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};\n sort.newSorting(arr, 2);\n assertArrayEquals(arr, expected);\n }", "static void sort(int[] a)\n {\n for ( int j = 1; j<a.length; j++)\n {\n int i = j - 1;\n while(i>=0 && a[i]>a[i+1])\n {\n int temp = a[i];\n a[i] = a[i+1];\n a[i+1] = temp;\n i--;\n }\n }\n }", "@Test\n\tpublic void testSortNumbers() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortNumbers(inputArr7);\n\t\tassertEquals(\"1\", arrayList.get(0));\n\t\tassertEquals(\"10\", arrayList.get(1));\n\t\tassertEquals(\"100\", arrayList.get(2));\n\t\tassertEquals(\"33\", arrayList.get(3));\n\t\tassertEquals(\"5\", arrayList.get(4));\n\t}", "@Test\n public void newSortingTest() {\n newSorting sort = new newSorting();\n int[] arr = {3, 2, 6, 5, 1, 7, 4};\n int[] expected = {1, 2, 3, 4, 5, 6, 7};\n sort.newSorting(arr, 4);\n assertArrayEquals(arr, expected);\n }", "@Test\n\tpublic void testSortSimpleNumbers() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortSimpleNumbers(inputArr6);\n\t\tassertEquals(\"100apples\", arrayList.get(0));\n\t\tassertEquals(\"1oranges\", arrayList.get(1));\n\t\tassertEquals(\"22pears\", arrayList.get(2));\n\t\tassertEquals(\"feb16\", arrayList.get(3));\n\t\tassertEquals(\"january2016\", arrayList.get(4));\n\t}", "public static void main(String[] args) {\n\t\tRemoveDuplicatesfromSortedArray test = new RemoveDuplicatesfromSortedArray();\n\t\tint[] nums = {1,1,2};\n\t\tint r = test.removeDuplicates(nums);\n\t\tSystem.out.println(r);\n\t}", "static boolean intArraySorted(int[] iarray) {\n\t\tfor (int i = 0; i + 1< iarray.length; i++) {\n\t\t\tif (iarray[i] > iarray[i + 1]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static void main(String[] args) {\n\t\t\n int array[] = {20,50,10,43,543,-43,-42,-245,5,21,5,1010};\n \n for(int firstUnsortedIndex = 1; firstUnsortedIndex < array.length; firstUnsortedIndex++) {\n \t\n \tint newElement = array[firstUnsortedIndex]; //storing the element of the unsorted array temporary to newElement\tin case we need to overwrite\n \n \tint i;\n \t//we want to keep looking for the insertion position as long as we havent hit the front of the array\n \tfor(i = firstUnsortedIndex; (i > 0 && array[i-1] > newElement); i--) {\n \t\tarray[i] = array[i-1];\n \t}\n \t\n \tarray[i] = newElement;\n }\n \n printer(array);\n \n\t}", "static boolean isSorted(int arr[]) {\n\t\tif(arr.length==1) {\n\t\t\treturn true;\n\t\t}\n\t\tif(arr[0]>arr[1]) {\n\t\t\treturn false;\n\t\t}\n\t\tint paritialArray [] = new int[arr.length-1];\n\t\tfor(int i=0; i<paritialArray.length; i++) {\n\t\t\tparitialArray[i] = arr[i+1];\n\t\t}\n\t\tboolean result = isSorted(paritialArray);\n\t\treturn result;\n\t\t\n\t\t\n\t}", "@Test\n public void testSort_intArr_IntComparator_Asc_Middle() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_MIDDLE_SORT_ARRAY;\n sorter.sort(data, 4, 10, comparator);\n// System.out.println(\"Expected: \" + Arrays.toString(expResult));\n// System.out.println(\"Result: \" + Arrays.toString(data));\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n\tpublic void testSortNumbersWithNumFlag() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortNumbersWithNumFlagOn(inputArr7);\n\t\tassertEquals(\"1\", arrayList.get(0));\n\t\tassertEquals(\"5\", arrayList.get(1));\n\t\tassertEquals(\"10\", arrayList.get(2));\n\t\tassertEquals(\"33\", arrayList.get(3));\n\t\tassertEquals(\"100\", arrayList.get(4));\n\t}", "@Test\n public void case2SortSingleElement(){\n //Checking for a single element\n SortDemoData data1 ;\n data1 = new SortDemoData();\n\n data1.initializeArray(\"1\");\n String[] output1 = data1.runAlgo(algoUnderTest).toString().split(\"\\\\s\");\n assertTrue(map.get(algoUnderTest),Integer.parseInt(output1[5]) == data1.myArray[0].key);\n\n\n }", "public long sort(Comparable[] array) throws IllegalArgumentException {\n\t\tif (array == null) {\n\t\t\tthrow new IllegalArgumentException(\"argument 'array' must not be null.\");\n\t\t}\n\t\tAmountOfCompares amount_of_compares = new AmountOfCompares(0);\n\t\tint n = array.length;\n\t\tfor (int i = 1; i < n ; i++){\n\t\t\tfor(int j = i; j > 0 && less(array[j], array[j-1]); j--){\n\t\t\t\tamount_of_compares.add_one();\n\t\t\t\texch(array, j, j-1);\n\t\t\t}\n\t\t}\n\t\treturn amount_of_compares.get();\n\t}", "public static boolean dIsSorted(double [] a) {\n\n for(int i = 0; i < a.length-1; i ++) { \n if (a[i] >= a[i+1]) {\n return false; \n }\n }\n return true;\n }", "@Test\n public void canHeapSort(){\n int[] array = {5, 6, 3, 7, 9, 1};\n heapSort(array);\n for (int elem : array) {\n System.out.println(elem + \" \");\n }\n }", "public static void main(String[] args) {\n\t\tint a[] = {1, 2, 5, 9, 4};\n\t\tfor(int i=0;i<a.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<a.length-i-1;j++)\n\t\t\t{\n\t\t\t\tif(a[j+1] < a[j])\n\t\t\t\t{\n\t\t\t\t\tint temp = a[j];\n\t\t\t\t\ta[j] = a[j+1];\n\t\t\t\t\ta[j+1] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The sorted array is:\");\n\t\tfor(int i=0;i<a.length;i++)\n\t\t{\n\t\t\tSystem.out.print(a[i]+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinySelectionSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.selectionSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.selectionSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }", "private void sorter(int[] array){\r\n\r\n for (int i = 0; i < array.length-1; i++)\r\n for (int j = 0; j < array.length-i-1; j++)\r\n if (array[j] > array[j+1])\r\n {\r\n int temp = array[j];\r\n array[j] = array[j+1];\r\n array[j+1] = temp;\r\n }\r\n }", "static boolean doubleArraySorted(double[] darray) {\n\t\tfor (int i = 0; i + 1 < darray.length; i++) {\n\t\t\t if (darray[i] > darray[i + 1]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "static void sort(int[] array) {\n int len = array.length;\n for (int i = 0; i < len; i++) {\n int minIndex = i;\n for (int j = i + 1; j < len; j++) {\n if (array[j] < array[minIndex])\n minIndex = j;\n }\n SortingUtil.swap(array, i, minIndex);\n }\n }", "private static List<Integer> findDuplicates(int[] nums) {\n List<Integer> ans = new ArrayList<>();\n for (int i = 0; i < nums.length; i++) {\n int index = Math.abs(nums[i]) - 1;\n if (nums[index] < 0) {\n ans.add(index + 1);\n }\n nums[index] = -nums[index];\n }\n return ans;\n }", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t\tint[] intArray = {20, 35, -15, 7, 55, 1, -22};\r\n\t\t\r\n\t\tfor(int firstUnsortedIndex = 1; firstUnsortedIndex< intArray.length; firstUnsortedIndex++) {\r\n\t\t\tint temp = intArray[firstUnsortedIndex];\r\n\t\t\tint index = 0;\r\n\t\t\tfor(int i=firstUnsortedIndex-1; i>=0;i--) {\r\n\t\t\t\tif(intArray[i]> temp) {\r\n\t\t\t\t\tintArray[i+1]=intArray[i];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tindex=i+1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tintArray[index]=temp;\r\n\t\t}\r\n\t\tSystem.out.println(Arrays.toString(intArray));\r\n\r\n\t}", "public static void main(String[] args) { int n = 100000000;\n// Integer[] array = ArrayGenerator.randomGenerator(n, n);\n// Integer[] arr = Arrays.copyOf(array, array.length);\n// PerformanceSort.test(\"QuickSort\", array);\n// PerformanceSort.test(\"MergeSort\", arr);\n// Integer[] array1 = ArrayGenerator.orderGenerator(n);\n// Integer[] arr1 = Arrays.copyOf(array1, array1.length);\n// PerformanceSort.test(\"QuickSort\", array1);\n// PerformanceSort.test(\"MergeSort\", arr1);\n//\n int n = 5000000;\n Integer[] array = ArrayGenerator.randomGenerator(n, 3);\n Integer[] arr = Arrays.copyOf(array, array.length);\n\n PerformanceSort.test(\"QuickSort3\", array);\n PerformanceSort.test(\"QuickSort2\", arr);\n// Integer[] array = new Integer[]{1, 8, 7, 6, 4};\n// PerformanceSort.test(\"QuickSort2\", array);\n\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testAdaptiveCocktailShakerSort() {\n //Test adaptiveness of completely ordered sort\n\n //Generate sorted array\n toSort = randArrDuplicates(MAX_ARR_SIZE, new Random(2110));\n Arrays.parallelSort(toSort, comp);\n sortedInts = cloneArr(toSort);\n\n comp.resetCount();\n Sorting.cocktailSort(sortedInts, comp);\n int numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n //Should require only 1 pass through array, for n-1 comparisons\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= MAX_ARR_SIZE - 1);\n\n //Check adaptiveness with 1 item out-of-order\n\n //Set up list\n toSort = new IntPlus[6];\n for (int i = 0; i < toSort.length; i++) {\n toSort[i] = new IntPlus(2 * i);\n }\n toSort[0] = new IntPlus(7);\n\n sortedInts = cloneArr(toSort);\n\n /*\n Initial Array: [7, 2, 4, 6, 8, 10]\n Forward pass: [ 2, 4, 6, *7, *8, *10]. 5 comparisons. Last swap at\n index 2, so starred items in order\n Backward pass: [ 2, 4, 6, *7, *8, *10]. 2 comparisons. Search ends\n */\n comp.resetCount();\n Sorting.cocktailSort(sortedInts, comp);\n numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= 7);\n }", "public int findDuplicate(int[] nums) {\n if(nums == null) return 0;\n\n for(int i = 0; i < nums.length; i++) {\n int index = Math.abs(nums[i]);\n if(nums[index - 1] < 0) {\n return index;\n }\n nums[index - 1] = -nums[index - 1];\n }\n return 0;\n}", "@Test\n public void testSort(){\n InsertionSort sort = new InsertionSort();\n int arr[] = sort.shellInsertionSort(initArr());\n scan(arr);\n }", "@Test\n public void testQuickSort() {\n System.out.println(\"QuickSort listo\");\n Comparable[] list = {3,2,5,4,1};\n QuickSort instance = new QuickSort();\n Comparable[] expResult = {1,2,3,4,5};\n Comparable[] result = instance.QuickSort(list, 0, list.length-1);\n assertArrayEquals(expResult, result);\n }", "public static void main(String[] args) {\n\t\t\n\t\tint[] array = { 234, 23, 123, 0, -345, 123, -45, 34, 345, -9 };\n\t\t\n\t\tfor (int i = 0; i < array.length - 1; i++) {\n\t\t\tfor (int j = 0; j < array.length - i - 1; j++) {\n\t\t\t\tif (array[j] > array[j + 1]) {\n\t\t\t\t\tarray[j] = array[j] + array[j + 1];\n\t\t\t\t\tarray[j + 1] = array[j] - array[j + 1];\n\t\t\t\t\tarray[j] = array[j] - array[j + 1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}", "public boolean checkPossibility(int[] nums) {\n int n = nums.length;\n int count = 0;\n if(n <= 2) return true;\n\n for(int i = 0; i < n - 1; i++) {\n if(nums[i] > nums[i+1]) {\n if(i == 0 || i == n - 2) {\n count ++;\n } else {\n //i needs to be fixed, e.g. -1,4,2,3, i == 1\n if (nums[i + 1] >= nums[i - 1]) {\n nums[i] = nums[i - 1];\n } else { //try to fix i+1, e.g. 5,7,1,8, i == 1\n nums[i + 1] = nums[i];\n }\n count++;\n }\n if(count == 2) return false;\n }\n\n }\n return true;\n }", "@Test\n\tpublic void testSortSimpleNumbersWithNumFlagOn() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortSimpleNumbersWithNumFlagOn(inputArr6);\n\t\tassertEquals(\"1oranges\", arrayList.get(0));\n\t\tassertEquals(\"22pears\", arrayList.get(1));\n\t\tassertEquals(\"100apples\", arrayList.get(2));\n\t\tassertEquals(\"feb16\", arrayList.get(3));\n\t\tassertEquals(\"january2016\", arrayList.get(4));\n\t}", "private static String testSorts(int[] arr) {\n\t\tint[] initial = arr.clone();\n\t\tdouble start;\n\t\tdouble[] heapTime = new double[10];\n\t\tdouble[] quickTime = new double[10];\n\t\tdouble[] mergeTime = new double[10];\n\t\t\n\t\tfor (int i=0; i < 10; i++){ //runs 10 times\n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t Sorting.heapSort(arr);\n\t heapTime[i] = System.nanoTime()-start;\n\t \n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t\t\tSorting.quickSort(arr); \n\t quickTime[i] = System.nanoTime()-start;\n\t \n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t\t\tSorting.mergeSort(arr); \n\t mergeTime[i] = System.nanoTime()-start;\n\t\t}\n\t\t\n\t double heapMean= meanVal(heapTime) ;\n\t double quickMean= meanVal(quickTime);\n\t double mergeMean= meanVal(mergeTime);\n\t \n\t String result = \"Means | HeapSort: \" +heapMean + \" QuickSort: \" + quickMean + \" MergeSort: \" + mergeMean + \"\\n\" + \n\t \"Variance| HeapSort: \"+ varianceVal(heapTime, heapMean)+ \" QuickSort: \" + varianceVal(quickTime, quickMean)+\n\t \" MergeSort: \" +varianceVal(mergeTime, mergeMean);\n\t \n\t return result;\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tint[] arrays = {20,3,6,84,95,-5};\n\t\t\n\t\tint temp = 0;\n\t\t//时间复杂度(O (n^2))\n\t\tboolean flag = false; //优化算法\n\t\tfor(int i = 0; i < arrays.length-1; i++) {\n\t\t\tfor(int j = 0; j < arrays.length - 1 - i; j++) {\n\t\t\t\tif(arrays[j] > arrays[j+1]){\n\t\t\t\t\tflag = true;\n\t\t\t\t\ttemp = arrays[j];\n\t\t\t\t\tarrays[j] = arrays[j+1];\n\t\t\t\t\tarrays[j+1] = temp;\n\t\t\t\t}\t\n\t\t\t\tSystem.out.println(Arrays.toString(arrays));\n\t\t}\n\t\t\tif(!flag) {\n\t\t\t\t//数组过程中没有进行排序,说明数组已经排序好了\n\t\t\t\tbreak;\n\t\t\t}else {\n\t\t\t\tflag = true;\n\t\t\t}\n\t}\n\n\t\tfor(int i = 0; i < arrays.length; i++) {\n\t\t\tSystem.out.print(arrays[i] + \" \");\n\t\t}\n }", "private static void fromUnsortedArray()\n\t{\n Integer[] origArray = new Integer[] { 1, 1, 2, 3, 3, 3, 4, 5, 6, 6, 6, 7, 8 };\n \n // This array has duplicate elements\n System.out.println(Arrays.toString(origArray));\n \n Integer[] tempArray = removeDuplicates2(origArray);\n \n // Verify the array content\n System.out.println(Arrays.toString(tempArray));\n\t}", "public boolean solution(int[] A) {\n int target = 0 ;\n int length = A.length;\n for(int i =0;i< length -1 ; i++){\n if(target == 0){\n target = Integer.compare(A[i],A[i+1]);\n continue;\n }\n if(target > 0){\n if(A[i] < A[i+1]){\n return false;\n }\n }\n if (target < 0){\n if(A[i] >A[i+1]){\n return false;\n }\n }\n }\n return true;\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}", "private static boolean isSorted(Comparable[] a) {\n for (int i = 1; i < a.length; i++)\n if (less(a[i], a[i-1])) return false;\n return true;\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 Exception {\n int arr[]= {7,9,88,-33,2,12,6,1};\n Arrays.sort(arr);\n /*for(int i=0; i<arr.length; i++)\n \t System.out.print(arr[i]+\", \");\n System.out.println(\"\\n DESC\");\n System.out.print(\"{ \");\n for(int i=arr.length-1; i>=0; i--) {\n \t if(arr[i]==arr[0])\n \t System.out.print(arr[i]);\n \t else \n \t\t System.out.print(arr[i]+\", \");\n }*/\n // System.out.print(\" }\");\n \n int[] ar= {6,2,2,5,2,2,1};\n int startIndex=0;\n int lastIndex=ar.length-1;\n //a is sumRight,b = sumLeft\n int a=0,b=0;\n /* while(true) {\n \t \n \t if(b>a) \n \t\t //1+2+2=+5\n \t\t a+=ar[lastIndex--];\n \t else \n \t\t //6+2+2\n \t\t\t b+=ar[startIndex++];\n \t\tif(startIndex>lastIndex) {\n \t\t\tSystem.out.println(startIndex);\n \t\t\tif(a==b)\n \t\t\t\tbreak;\n \t\t\t else\n \t\t\t throw new Exception(\"not a valid array\");\n \t\t\t\n \t\t}\n \t\t\t \n \t\t\n }\n System.out.println(lastIndex);\n */\n \n \n while(true) {\n \t \n \t if(b>a)\n \t\t a+= ar[lastIndex--];\n \t else\n b+=ar[startIndex++];\n \t if(startIndex>lastIndex) {\n \t\t if(a==b)\n \t\t\t break;\n \t }\n }\n System.out.println(lastIndex);\n\t}", "@Override\n public int[] sort(int[] array) {\n\n if (array.length <= 1) return array;\n\n for (int num_sorted = 1; num_sorted < array.length; num_sorted++) {\n\n int check_idx = num_sorted;\n int temp_val;\n\n while (array[check_idx] < array[check_idx - 1]) {\n\n temp_val = array[check_idx];\n array[check_idx] = array[check_idx - 1];\n array[check_idx - 1] = temp_val;\n check_idx --;\n\n if (check_idx == 0) break;\n\n }\n\n }\n\n return array;\n }", "public static void main(String[] args) {\r\n\t\tint arr[] = {1,0,5,6,3,2,3,7,9,8,4};\r\n\t\tint temp;\r\n\t\t\r\n\t\tfor(int i = 0; i < 10; i ++) {\r\n\t\t\tfor(int j = 0; j < 10 - i; j ++) {\r\n\t\t\t\tif(arr[j] > arr[j+1]){\r\n\t\t\t\t\ttemp = arr[j+1];\r\n\t\t\t\t\tarr[j+1] = arr[j];\r\n\t\t\t\t\tarr[j] = temp;\r\n\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < 11; i ++) {\r\n\t\t\tSystem.out.println(arr[i]);\r\n\t\t}\r\n\t}", "private static void missRepeat2(int[] a) {\n\t\tint miss = -1;\n\t\tint repeat = -1;\n\t\t\n\t\tfor(int x : a) {\n\t\t\tif(a[Math.abs(x)-1] > 0) {\n\t\t\t\ta[Math.abs(x)-1] = - a[Math.abs(x)-1];\n\t\t\t}\n\t\t\telse if (a[Math.abs(x)-1] < 0){\n\t\t\t\trepeat = Math.abs(x);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=0; i<a.length; i++) {\n\t\t\tif(a[i]>0) {\n\t\t\t\tmiss = i+1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(repeat + \" \" + miss);\n\t}", "@Test\r\n public void testSortedArr() {\r\n System.out.println(\"SortedArr\");\r\n int length = 0;\r\n Class sortClass = null;\r\n int[] expResult = null;\r\n int[] result = GenerateArr.SortedArr(length, sortClass);\r\n assertArrayEquals(expResult, result);\r\n }", "@Test\n\tpublic void testSortSimpleCapitalNumberWithNumFlagOn() throws SortException {\n\t\tString[] input = new String[] { \"ap1EE\", \"100aPp1e\", \"66p3aR\", \"1Pear\", \"p3Arr\" };\n\t\tList<String> arrayList = sortApplication.sortSimpleCapitalNumberWithNumFlagOn(input);\n\t\tassertEquals(\"1Pear\", arrayList.get(0));\n\t\tassertEquals(\"66p3aR\", arrayList.get(1));\n\t\tassertEquals(\"100aPp1e\", arrayList.get(2));\n\t\tassertEquals(\"ap1EE\", arrayList.get(3));\n\t\tassertEquals(\"p3Arr\", arrayList.get(4));\n\t}" ]
[ "0.76580304", "0.75958526", "0.7513042", "0.73905426", "0.7062372", "0.6978802", "0.6967995", "0.6960922", "0.6952724", "0.69204104", "0.6889121", "0.6873409", "0.68126696", "0.67752606", "0.67484003", "0.6728885", "0.6715664", "0.6710301", "0.66789633", "0.66504353", "0.65848887", "0.6569341", "0.65549713", "0.65403175", "0.6482644", "0.64726096", "0.64656806", "0.6457052", "0.64384073", "0.64278054", "0.6413135", "0.6399127", "0.63858235", "0.63728964", "0.63467216", "0.6335649", "0.63298595", "0.6327611", "0.6325711", "0.63227624", "0.6317162", "0.63147414", "0.6297968", "0.62822676", "0.6281286", "0.62679285", "0.6249222", "0.62364197", "0.6225608", "0.6218847", "0.6217541", "0.6211155", "0.620879", "0.6202292", "0.6200446", "0.6190071", "0.61894697", "0.6178005", "0.61210513", "0.6117764", "0.61153364", "0.6113328", "0.6112605", "0.610219", "0.6096933", "0.6095947", "0.60915786", "0.6080398", "0.60800594", "0.6075158", "0.6066399", "0.6064095", "0.604558", "0.60375834", "0.60352176", "0.6030263", "0.6023609", "0.6009577", "0.59993804", "0.59958076", "0.59914184", "0.5990661", "0.59902376", "0.5983338", "0.59824234", "0.5979512", "0.5979028", "0.5975863", "0.5971317", "0.5962669", "0.59623134", "0.59532857", "0.5951231", "0.59498924", "0.594713", "0.594524", "0.5940775", "0.5940693", "0.5939377", "0.591339" ]
0.66961145
18
The following test case checks if the half size is smaller than expected Test case : PASSED
@Test public void newSortingTest5() { newSorting sort = new newSorting(); int[] arr = {10, 100, 20, 90, 30, 80, 40, 70, 50, 60}; int[] expected = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}; sort.newSorting(arr, 2); assertArrayEquals(arr, expected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void assertSizeEquals(int expected);", "public void testSize() {\n assertEquals(this.stack.size(), 10, 0.01);\n assertEquals(this.empty.size(), 0, 0.01);\n }", "private void assertEqual(long count, long size) {\n\t\t\n\t}", "private void testSize() {\n System.out.println(\"------ TESTING: size() ----- \");\n System.out.println(\"Expected: \" +iSize);\n System.out.print(\"Returned: \");\n try{\n if(iTestList.size() != iSize)\n throw new RuntimeException(\"FAILED -> test size not matching\");\n else\n System.out.print(iTestList.size());\n }catch(RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }", "@Test\n public void testLargeSize(){\n assertEquals(25, largeMaze.size());\n }", "@Test\n public void testSize(){\n assertEquals(25, largeMaze.size());\n }", "private void testSize(ArrayGenerator generator) {\n assertEquals(generator.getSize(), generator.getArray().length);\n }", "@Test\n public void testSize_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n int expResult = 6;\n\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n long result = instance.size();\n assertEquals(expResult, result);\n\n }", "private void testSize() {\n init();\n assertTrue(\"FListInteger.size(l0)\", FListInteger.size(l0) == 0);\n assertTrue(\"FListInteger.size(l1)\", FListInteger.size(l1) == 1);\n assertTrue(\"FListInteger.size(l2)\", FListInteger.size(l2) == 2);\n assertTrue(\"FListInteger.size(l3)\", FListInteger.size(l3) == 3);\n }", "public void testSize() {\n assertEquals(10, maze1.size());\n }", "@Test\n public void allSize() throws Exception{\n fillFile();\n Assert.assertEquals(maxBlocks, rf.size());\n }", "protected void checkSize(){\n if (size == data.length){\n resize( 2 * data.length);\n }\n }", "@Test\r\n\tvoid testSize2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.append(1);\r\n\t\ttest.append(2);\r\n\t\ttest.append(3);\r\n\t\ttest.append(4);\r\n\t\ttest.append(5);\r\n\t\ttest.append(6);\r\n\t\ttest.append(7);\r\n\t\ttest.append(8);\r\n\t\ttest.append(9);\r\n\t\ttest.append(10);\r\n\t\ttest.append(11);\r\n\t\tint output = test.size();\r\n\t\tassertEquals(15, output);\r\n\t}", "@Test\r\n\tpublic void testSize() {\r\n\t\tAssert.assertEquals(15, list.size());\r\n\t}", "@Override\n public int estimateSize() {\n return 8 + 8 + 1 + 32 + 64;\n }", "@Test\n\tpublic void testSampleSize() {\n\t\t// Check size of pyr piece\n\t\tassertEquals(3, pyr1.getWidth());\n\t\tassertEquals(2, pyr1.getHeight());\n\t\t\n\t\t// Now try after rotation\n\t\t// Effectively we're testing size and rotation code here\n\t\tassertEquals(2, pyr2.getWidth());\n\t\tassertEquals(3, pyr2.getHeight());\n\t\t\n\t\t// Now try with some other piece, made a different way\n\t\tPiece l = new Piece(Piece.STICK_STR);\n\t\tassertEquals(1, l.getWidth());\n\t\tassertEquals(4, l.getHeight());\n\t\t\n assertEquals(4, stickRotated.getWidth());\n assertEquals(1, stickRotated.getHeight());\n \n assertEquals(2, square.getWidth());\n assertEquals(2, square.getHeight());\n \n assertEquals(2, sRotated.getWidth());\n assertEquals(3, sRotated.getHeight());\n\t}", "public static boolean checkSize(int expected, int actual) {\n if (expected != actual) {\n System.out.println(\"size() returned \" + actual + \", but expected: \" + expected);\n return false;\n }\n return true;\n }", "@Test\n public void testSmallSize(){\n assertEquals(9, smallMaze.size());\n }", "@Test\n\tpublic void testSampleSize2() {\n\t\tassertEquals(3, pyr1.getWidth());\n\t\tassertEquals(1, stick1.getWidth());\n\t\tassertEquals(2, square1.getWidth());\n\t\tassertEquals(2, l1_1.getWidth());\n\t\tassertEquals(2, l2_1.getWidth());\n\t\tassertEquals(3, s1_1.getWidth());\n\t\tassertEquals(3, s2_1.getWidth());\n\t\t\n\t\tassertEquals(2, pyr1.getHeight());\n\t\tassertEquals(4, stick1.getHeight());\n\t\tassertEquals(2, square1.getHeight());\n\t\tassertEquals(3, l1_1.getHeight());\n\t\tassertEquals(3, l2_1.getHeight());\n\t\tassertEquals(2, s1_1.getHeight());\n\t\tassertEquals(2, s2_1.getHeight());\n\t\t\n\t\t// Now try after rotation\n\t\t// Effectively we're testing size and rotation code here\n\t\tassertEquals(2, pyr2.getWidth());\n\t\tassertEquals(4, stick2.getWidth());\n\t\tassertEquals(2, square2.getWidth());\n\t\tassertEquals(3, l1_2.getWidth());\n\t\tassertEquals(3, l2_2.getWidth());\n\t\tassertEquals(2, s1_2.getWidth());\n\t\tassertEquals(2, s2_2.getWidth());\n\t\t\n\t\tassertEquals(3, pyr2.getHeight());\n\t\tassertEquals(1, stick2.getHeight());\n\t\tassertEquals(2, square2.getHeight());\n\t\tassertEquals(2, l1_2.getHeight());\n\t\tassertEquals(2, l2_2.getHeight());\n\t\tassertEquals(3, s1_2.getHeight());\n\t\tassertEquals(3, s2_2.getHeight());\n\t\t\t\n\t\t// Now try with some other piece, made a different way\n\t\tassertEquals(3, pyr1.getWidth());\n\t\tassertEquals(1, stick3.getWidth());\n\t\tassertEquals(2, square3.getWidth());\n\t\tassertEquals(2, l1_5.getWidth());\n\t\tassertEquals(2, l2_5.getWidth());\n\t\tassertEquals(3, s1_5.getWidth());\n\t\tassertEquals(3, s2_5.getWidth());\n\t\t\n\t\tassertEquals(2, pyr1.getHeight());\n\t\tassertEquals(4, stick3.getHeight());\n\t\tassertEquals(2, square3.getHeight());\n\t\tassertEquals(3, l1_5.getHeight());\n\t\tassertEquals(3, l2_5.getHeight());\n\t\tassertEquals(2, s1_5.getHeight());\n\t\tassertEquals(2, s2_5.getHeight());\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test52() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickSize(6372, 3, 2146363568);\n assertEquals(\"id=6372 askSize=2146363568\", string0);\n }", "private void checkAndModifySize() {\r\n if (size == data.length * LOAD_FACTOR) {\r\n resizeAndTransfer();\r\n }\r\n }", "@Test\n public final void testValidGetSize() {\n int expRes = 5;\n int result = ship.getSize();\n assertEquals(expRes, result);\n expRes = 19;\n ship.setSize(expRes);\n result = ship.getSize();\n assertEquals(expRes, result);\n }", "@Test\n public void testSize() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n int expResult = 4;\n\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n\n long result = instance.size();\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testSampleSize1() {\n\t\t// Check size of pyr piece\n\t\tassertEquals(3, pyr1.getWidth());\n\t\tassertEquals(2, pyr1.getHeight());\n\t\t\n\t\t// Now try after rotation\n\t\t// Effectively we're testing size and rotation code here\n\t\tassertEquals(2, pyr2.getWidth());\n\t\tassertEquals(3, pyr2.getHeight());\n\t\t\n\t\t// Now try with some other piece, made a different way\n\t\tPiece l = new Piece(Piece.STICK_STR);\n\t\tassertEquals(1, l.getWidth());\n\t\tassertEquals(4, l.getHeight());\n\t}", "@Test\n\tpublic void testGetTableSize()\n\t{\n\t\tassertEquals(20, testStructure.getTableSize());\t\t\n\t\ttestStructure = new ConcordanceDataStructure(500);\n\t\tassertEquals(347, testStructure.getTableSize());\t\n\t}", "public static int size_estLength() {\n return (8 / 8);\n }", "@Test\r\n public void testSize1() {\r\n Assert.assertEquals(5, set1.size());\r\n }", "@Test\n public void testSumPlanAddedModifiedSizeActualAddedModifiedSize()\n {\n assertEquals(this.linealRegressionCalculator.sumPlanAddedModifiedSizeActualAddedModifiedSize(), 5242927.0, 0.01);\n }", "@Test\n public void testEnsureBufferSizeExpandsToBeyondMaxBufferSize() {\n assertEnsureBufferSizeExpandsToMaxBufferSize(true);\n }", "@Test\n public void Rightsize() {\n assertEquals(7, Otava2.getStars().size());\n }", "@Test\n \tpublic void testSize() throws FileNotFoundException {\n \n \t\tMain.main(new String[]{\n \t\t\t\tArgs.TEST_STYLE_ARG,\n \t\t\t\t\"--preserve-element-order\",\n \t\t\t\tArgs.TEST_RESOURCE_OSM + \"uk-test-1.osm.gz\"\n \t\t});\n \n \t\tFileSystem fs = ImgFS.openFs(Args.DEF_MAP_ID + \".img\");\n \t\tassertNotNull(\"file exists\", fs);\n \n \t\tList<DirectoryEntry> entries = fs.list();\n \t\tint count = 0;\n \t\tfor (DirectoryEntry ent : entries) {\n \t\t\tString ext = ent.getExt();\n \n \t\t\tint size = ent.getSize();\n \t\t\tif (ext.equals(\"RGN\")) {\n \t\t\t\tcount++;\n \t\t\t\tassertEquals(\"RGN size\", 153466, size);\n \t\t\t} else if (ext.equals(\"TRE\")) {\n \t\t\t\tcount++;\n \t\t\t\tassertEquals(\"TRE size\", 1897, size);\n \t\t\t} else if (ext.equals(\"LBL\")) {\n \t\t\t\tcount++;\n\t\t\t\tassertEquals(\"LBL size\", 28351, size);\n \t\t\t}\n \t\t}\n \t\tassertTrue(\"enough checks run\", count >= 3);\n \t}", "public void testLength() {\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n assertEquals(6, test1.length());\n }", "int fixedSize();", "@Test\r\n public void ArraySizeTest() {\r\n System.out.println(\"arraySize\");\r\n String[] string = {\"1\",\"2\",\"3\"};\r\n\r\n int expResult = 3;\r\n int result = instance.arraySize(string);\r\n assertEquals(expResult, result);\r\n }", "protected void testLessThanMaxLots () throws OutsideMaxLotsException\n {\n if (lots.size() >= MAX_LOTS)\n throw new OutsideMaxLotsException();\n }", "@Test\n public void testWidth(){\n assertEquals(5, largeMaze.width());\n }", "@Test\n public void testSort_intArr_half() {\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\r\n public void sizeSets() throws Exception {\r\n assertEquals(5, sInt.size());\r\n assertEquals(3, sStr.size());\r\n }", "@Test\n void test05_checkSize() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\"); // adds three vertices\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\");\n graph.addEdge(\"c\", \"b\"); // add three edges\n if (graph.size() != 3) {\n fail(\"graph has counted incorrect number of edges\");\n }\n }", "boolean testLength(Tester t) {\n return t.checkExpect(lob3.length(), 3) && t.checkExpect(los3.length(), 3)\n && t.checkExpect(los1.length(), 1) && t.checkExpect(new MtLoGamePiece().length(), 0);\n }", "@Test\n public void test006_test_capcaity() {\n try {\n HashTableADT test = new HashTable<Integer, String>(2, 0.5);\n test.insert(1, \"2\");\n test.insert(2, \"3\");\n if (test.getCapacity() != 5) { //capacity should be 2* original + 1\n fail(\"resize not correct\");\n }\n } catch (Exception e) {\n fail(\"Correct Exception wasn't thrown\");\n }\n }", "@Test\n public void testByteSizeTooBig() {\n ds.setMaxDocumentBytes(150);\n putD1();\n putD2();\n \n assertEquals(true, docExists(testStringNumber.STRING1));\n assertEquals(true, docExists(testStringNumber.STRING2));\n putD3();\n System.out.println(\"hey\");\n assertEquals(false, docExists(testStringNumber.STRING1));\n assertEquals(true, docExists(testStringNumber.STRING2));\n assertEquals(true, docExists(testStringNumber.STRING3));\n \n }", "@Test\n public void testGetSize() {\n Queue queue = new Queue();\n queue.enqueue(testParams[1]);\n queue.enqueue(testParams[2]);\n queue.enqueue(testParams[1]);\n queue.enqueue(testParams[2]);\n\n int expResult = 4;\n\n // call tested method\n int actualResult = queue.getSize();\n\n // compare expected result with actual result\n assertEquals(expResult, actualResult);\n }", "boolean hasSize();", "boolean hasSize();", "boolean hasSize();", "boolean hasSize();", "@Test\n public void length() {\n float result = 0.0f;\n float[] a = new float[] {1.001f, 2.002f, 2.0f, 3.0f, 4.0f, 6.0f}; \n float expect = 65.0f;\n // 1)\n result = Vec4f.length(a, 2);\n assertTrue(Math.abs(result*result-expect) < 1E-6f);\n \n //2)\n float[] a2 = new float[] {2.0f, 3.0f, 4.0f, 6.0f}; \n float result2 = Vec4f.length(a2);\n assertTrue(Math.abs(result2*result2-expect) < 1E-6f);\n }", "public void testLength()\n {\n LinearSearch ls = new LinearSearch();\n\n assertFalse(ls.validLength(int [15] haystack));\n }", "public boolean goodSize( Coordinates startCoord, Coordinates endCoord, int size) {\n\t\t\r\n\t\tint nb1 = startCoord.getNumber();\r\n\t\tchar letter1 = startCoord.getLetter();\r\n\t\tint nb2 = endCoord.getNumber();\r\n\t\tchar letter2 = endCoord.getLetter();\r\n\t\t\r\n\t\treturn (\r\n\t\t\t\t(Math.abs(nb1 - nb2) == size-1)\r\n\t\t\t\t|| \r\n\t\t\t\t(Math.abs(letter1 - letter2) == size-1 ));\r\n\t}", "@Test\n public void testLength(){\n assertEquals(5, largeMaze.length());\n }", "@Test\n public void testGetSize() {\n assertEquals(r1.getSize(), new Dimension2D(7, 4));\n assertEquals(r2.getSize(), new Dimension2D(0, 4));\n assertEquals(r3.getSize(), new Dimension2D(7, 0));\n assertEquals(r4.getSize(), new Dimension2D(0, 0));\n }", "boolean hasTotalSize();", "@Test\n public void testGetSize() {\n int expResult = 2;\n int result = this.dummyDigitSize.getSize();\n assertEquals(expResult, result);\n }", "public boolean isFull() {\n return size == k;\n}", "private static int findGoodStepSize(int collectionSize, int sampleSize) {\n int i = (int) Math.sqrt(collectionSize);\n if (sampleSize < i) {\n i = collectionSize / sampleSize;\n }\n do {\n i = findNextPrimeAfter(i);\n } while (collectionSize % i == 0);\n return i;\n }", "private void checkSize(int desiredSize)\n {\n if (desiredSize > MAX_SIZE)\n throw new IllegalStateException(\"Attempt to create a hash table \" +\n \"array whose size exceeds \" +\n \"allowed maximum.\");\n }", "@Test\n public void lastSize() throws Exception{\n rf.insert(maxBlocks-1, testBlock);\n Assert.assertEquals(1, rf.size());\n }", "@Test\n\tpublic void testLength()throws Exception {\n\n\t\t\t SET setarray= new SET( new int[]{6,7,8,10});\n\t\t\t int returnedValue =setarray.Size(); \n\t\t\t int expectedValue = 4;\n\t\t\t Assert.assertEquals( expectedValue, returnedValue );\n\t}", "@Test\r\n\tvoid testSize() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\tint output = test.size();\r\n\t\tassertEquals(10, output);\r\n\t}", "@Test\r\n public void teamListTooLargeTest(){\r\n int tooBigListSize = 15;\r\n\r\n int expectedResult = extractor.extractXDriversOrTeams(tooBigListSize, \"table.msr_season_team_results\", \"td.msr_team\").size();\r\n\r\n assertEquals(\"expected results = \" + expectedResult, expectedResult, extractor.extractXDriversOrTeams(tooBigListSize, \"table.msr_season_team_results\", \"td.msr_team\").size());\r\n System.out.println(\"\");\r\n }", "@Test\n public void testLargeALargeM() {\n assertEquals(11479907, PiGenerator.powerMod(123456, 2, 42423131));\n }", "private void arraySize(MyArrayList list, Results results) {\r\n int size = -123;\r\n size = list.size();\r\n if(size != -123) {\r\n results.storeNewResult(\"ArraySize test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArraySize test case: FAILED\");\r\n }\r\n }", "@DisplayName(\"Get the size and test if it is correct\")\n @Test\n public void testGetSize() {\n Assertions.assertEquals(5, graph.getNumberVertices());\n }", "public long estimateSize() {\n/* 1338 */ return this.est;\n/* */ }", "@Test\n public void testSize() {\n testAdd();\n assertEquals(9, list1.size());\n }", "public long estimateSize() {\n/* 1558 */ return this.est;\n/* */ }", "public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }", "public void checkCapacity(String target, long size) throws Exception;", "public long estimateSize() {\n/* 1668 */ return this.est;\n/* */ }", "@Test\n public void testSizeOnEmpty() {\n assertEquals(\"The size of integer PQ is: \",\n 0, this.iPQ.size());\n assertEquals(\"The size of string PQ is: \",\n 0, this.sPQ.size());\n }", "@Test\n public void oneSize() throws Exception{\n rf.insert(testBlock);\n Assert.assertEquals(1, rf.size());\n }", "public abstract int getMaxIntermediateSize();", "@Override public long getSimulatedSize() {\n return 1;\n }", "@Test\n public void partitionCorrectness() {\n List<Integer> ns = new Node<>(5, new Node<>(3,\n new Node<>(7, new Node<>(1, new Empty<>()))));\n List<Integer> empty = new Empty<>();\n assertFalse(DP.bupartition(ns, 2));\n assertTrue(DP.bupartition(ns, 8));\n assertTrue(DP.bupartition(ns, 6));\n assertTrue(DP.bupartition(ns,4));\n assertTrue(DP.bupartition(ns,11));\n assertFalse(DP.bupartition(empty, 6));\n }", "@Test\n public void testSumActualAddedModifiedSize()\n {\n assertEquals(this.linealRegressionCalculator.sumActualAddedModifiedSize(), 6389.0, 0.01);\n }", "@Test\n public void testSumEstimatedProxySizeActualAddedModifiedSize()\n {\n assertEquals(this.linealRegressionCalculator.sumEstimatedProxySizeActualAddedModifiedSize(), 4303108.0, 0.01);\n }", "@Test\n public void testBLength() {\n LOGGER.info(\"testBLength\");\n final int actual = new AtomString().bLength();\n final int expected = 2;\n assertEquals(expected, actual);\n }", "@Test\n public void sizeTest() {\n assertThat(4, is(this.queue.size()));\n }", "private boolean ifTooEmpty() {\n if (items.length <= 8) {\n return false;\n }\n float efficiency = (float) size / (float) items.length;\n return efficiency < 0.25;\n }", "public void ensureMessageArraySizes(Message message){\n assertTrue(\"Expected array size to be less or equal to 10,000\", message.getHouse().size() <= 10000);\n assertTrue(\"Expected array size to be less or equal to 10,000\", message.getHouses().size() <= 10000);\n }", "@Test\n public void testSize() {\n System.out.println(\"size\");\n instance = new Stack();\n int expResult = 10;\n for (int i = 0; i < 10; i++) {\n instance.push(i*3);\n }\n assertEquals(expResult, instance.size());\n }", "public void testSize(Method m) {\n String newCacheName = \"repl-size\";\n startCaches(newCacheName);\n List<HotRodClient> newClients = createClients(newCacheName);\n try {\n TestSizeResponse sizeStart = newClients.get(0).size();\n assertStatus(sizeStart, Success);\n assertEquals(0, sizeStart.size);\n for (int i = 0; i < 20; i++) {\n newClients.get(1).assertPut(m, \"k-\" + i, \"v-\" + i);\n }\n TestSizeResponse sizeEnd = newClients.get(1).size();\n assertStatus(sizeEnd, Success);\n assertEquals(20, sizeEnd.size);\n } finally {\n newClients.forEach(HotRodClient::stop);\n }\n }", "public static void testbed() {\n int s[] = {5, 1, 0, 4, 2, 3};\n int y = length_easy(s, 3);\n\n System.out.println(\"length_easy y = \" + y);\n u.myassert(y == 4);\n int b[] = {5, 1, 0, 4, 2, 3};\n int x = length(s, 3);\n System.out.println(\"length x = \" + x);\n u.myassert(x == y);\n for (int i = 0; i < s.length; ++i) {\n u.myassert(s[i] == b[i]);\n }\n System.out.println(\"Assert passed\");\n }", "public void testResize()\n {\n cover.resize(5, 5, 90);\n assertEquals(5.0, cover.getTop(), .1);\n assertEquals(5.0, cover.getLeft(), .1);\n }", "public DynamicTest generateSizeTest(int limit) {\n\t\t\tList<BigInteger> actual = FibonacciGenerator.fibonacciNumbers(limit);\n\t\t\treturn dynamicTest(\"size for limit = \" + limit, () -> {\n\t\t\t\tassertEquals(limit, actual.size());\n\t\t\t});\n\t\t}", "@Test\n public void testLargeB() {\n assertEquals(12, PiGenerator.powerMod(2, 42, 13));\n }", "int getTribeSize();", "@Test\n public void shouldNotScaleImageWhenSameSize() {\n givenIHaveAnImage();\n\n whenIScaleImageWidthTo(14.999f);\n\n thenTheImageWidthIs(15);\n }", "@Test\n public void testEnsureBufferSizeExpandsToMaxBufferSize() {\n assertEnsureBufferSizeExpandsToMaxBufferSize(false);\n }", "@Test\n public void testSizeRandomBinaryData() throws Exception {\n /* Test with valid value */\n int[] result = NoiseGenerator.randomBinaryData(5,0.50);\n Assert.assertFalse(result == null);\n\n /* Test with invalid value */\n result = NoiseGenerator.randomBinaryData(-1,0.50);\n Assert.assertTrue(result == null);\n }", "@Test\r\n public void NegativeTestSize1() {\r\n Assert.assertNotEquals(1, set1.size());\r\n }", "public static int size_skew_cmp() {\n return (32 / 8);\n }", "@Override\n public long estimateSize() {\n return baseSpliterator.estimateSize() / 2;\n }", "void size() {\n assertEquals(words.size(), trie.size());\n }", "public int getTestSize(){\n return testSetSize;\n }", "@Test(expected = BoundedQueueException.class)\r\n\tpublic void permutationsTestSize6() throws BoundedQueueException {\r\n\t\tbq.enqueue(1);\r\n\t\tbq.enqueue(2);\r\n\t\tbq.enqueue(3);\r\n\t\tbq.enqueue(4);\r\n\t\tbq.enqueue(5);\r\n\t\tbq.enqueue(6);\r\n\t\tbq.permutations();\r\n\t}", "public static int size_min() {\n return (8 / 8);\n }", "public int calculateSize( int numSamples )\n {\n return numSamples * 2;\n }", "@Test\n public void testSize() {\n System.out.println(\"size\");\n al.add(1);\n assertEquals(1, al.size());\n }", "private void ensureCapacity() {\n if(size() >= (0.75 * data.length)) // size() == curSize\n resize(2 * size());\n }" ]
[ "0.74117166", "0.6775492", "0.66929007", "0.66769755", "0.66504663", "0.6585696", "0.65576756", "0.6549643", "0.6504975", "0.64809316", "0.6392281", "0.63728464", "0.63554436", "0.62352103", "0.62093467", "0.6200719", "0.61847204", "0.6168296", "0.6154943", "0.6136343", "0.6134617", "0.6109447", "0.61074007", "0.6100118", "0.6086575", "0.6076574", "0.60610044", "0.60277045", "0.6023012", "0.602167", "0.601981", "0.6017227", "0.59932864", "0.59669375", "0.5965024", "0.5942153", "0.59272236", "0.5918666", "0.59166014", "0.5912315", "0.5900439", "0.5899112", "0.589522", "0.5893632", "0.5893632", "0.5893632", "0.5893632", "0.58925164", "0.58886504", "0.5877929", "0.5876528", "0.5869705", "0.5868864", "0.58659077", "0.58645463", "0.5848529", "0.58444196", "0.5830214", "0.58260685", "0.5822478", "0.5804408", "0.58040327", "0.58006245", "0.5797084", "0.5795125", "0.57880545", "0.5776238", "0.5764818", "0.5751036", "0.57451314", "0.5745041", "0.57412267", "0.5736497", "0.5730276", "0.57244605", "0.5723761", "0.57173204", "0.5716311", "0.57133627", "0.57127637", "0.5711717", "0.5701127", "0.5685381", "0.56825465", "0.56816524", "0.5676213", "0.56706303", "0.5668948", "0.56684864", "0.56649286", "0.566178", "0.566169", "0.566042", "0.56482315", "0.5646751", "0.5645999", "0.5643384", "0.5635249", "0.56245065", "0.56168747", "0.56127334" ]
0.0
-1
InitReve initReve = new InitReve();
@Override public void init(ServletConfig config) throws ServletException { //初始化定时任务 // initSysTask(); super.init(config); try { ServiceBeanContext.getInstance().loadContext(Constants.Env.BASE_HOME+"applicationContext.xml"); //启动代理服务器 //ProxyServer.startProxy(); //initReve.init(); } catch (Exception e) { log.error("启动初始化applicationContext.xml失败", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void init() {\n\n }", "public InitService() {\n super(\"InitService\");\n }", "private void init() {\n\n\t}", "public void init(){}", "private void initService() {\r\n\t}", "public void init() {}", "public void init() {}", "public static void init() {\n\t\t\n\t}", "public void init();", "public void init();", "public void init();", "public void init();", "private void init() {\n\n\n\n }", "@Override\n public void initialize(URL url, ResourceBundle rb)\n {\n \n try\n {\n //The modelfacade gets instantieted here.\n modelfacade = ModelFacade.getInstance();\n isPaidNum = 1;\n }\n catch (Exception ex) //This exception happens if for some reason the program is unable to get the instance of modelfacade, this is probably unnecessary\n {\n Logger.getLogger(AddClientController.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Couldn't get the instance of modelfacade\" + ex,\"ERROR!\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void service_INIT(){\n }", "public void init() {\n\n }", "public void init() {\n\n }", "public void init() {\n\r\n\t}", "public void init() {\n\r\n\t}", "public void init(){\n System.out.println(\"调用init\");\n }", "public void init(){\n \n }", "void init();", "void init();", "void init();", "void init();", "void init();", "void init();", "void init();", "void init();", "void init();", "void init();", "void init();", "void init();", "void init();", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init(){\n \n }", "protected void _init(){}", "@Override\n public void initialize() {\n swerve = SwerveControl.getInstance();\n }", "public void init() {\r\n\r\n\t}", "public static void init() {}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void _init() {\n }", "public void init(){\r\n\t\t\r\n\t}", "public void init()\n { \t\n }", "public void init() {\n\r\n }", "static void init() {}", "public void init() {\n\t\n\t}", "public void init() {\n\t\t\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "private void initializeRecallServiceManager() {\n\n }", "protected void init(){\n }", "public void init() { }", "public void init() { }", "public void init()\n {\n }", "public static void init() {\n\n\t\tsnapshot = new SnapshotService();\n\t\tlog.info(\"App init...\");\n\t}", "public static void init() {\n }", "public static void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void initReloj(){\r\n Thread r1 = new Thread(this,\"Reloj\");\r\n r1.start();\r\n }", "public Repo() {\n //this.app = Init.application;\n }", "@Stub\n\tpublic void init()\n\t{\n\t\t//\n\t}", "public void initControles(){\n\n }", "@ServiceInit\n public void init() {\n }", "public static void initial(){\n\t}", "public StartUp(){\r\n \r\n }", "public void initial(){\t\t\r\n\t\tfundRateService=new FundRateService();\r\n\t}", "@Override\n public void runInit() {\n }", "public abstract void init();", "public abstract void init();", "public abstract void init();", "public abstract void init();", "public abstract void init();", "public abstract void init();", "public abstract void init();", "public abstract void init();", "public abstract void init();", "public abstract void init();", "public void init() {\n \n }", "public void initMethod(){\n\t}", "@PostConstruct\n public void init() {\n c=new Cliente();\n lc=null;\n }", "protected void init() {\n\t}", "protected void init() {\n\t}", "public void init() throws ServletException\n {\n // Put your code here\n }", "public void init() {\n\t\t}", "private void _init() throws Exception {\n }", "private ClientController(){\n\n }", "private RecipleazBackendService() {\n }", "public void init() {\r\n // nothing to do\r\n }", "protected void init() {\n }", "private void init(){\n Slider.init(new PicassoImageLoadingService());\n restaurantApi = RetrofitClient.getInstance(Common.API_RESTAURANT_ENDPOINT).create(RestaurantApi.class);\n dialog = new Dialog(this);\n\n }" ]
[ "0.6398554", "0.63586557", "0.63476956", "0.6334189", "0.6326165", "0.6324014", "0.6324014", "0.6316039", "0.63159305", "0.63159305", "0.63159305", "0.63159305", "0.6307025", "0.63008267", "0.6298878", "0.6273249", "0.6273249", "0.6272786", "0.6272786", "0.6267456", "0.6257855", "0.6255321", "0.6255321", "0.6255321", "0.6255321", "0.6255321", "0.6255321", "0.6255321", "0.6255321", "0.6255321", "0.6255321", "0.6255321", "0.6255321", "0.6255321", "0.6248667", "0.6248667", "0.6248667", "0.6246526", "0.6242206", "0.62399304", "0.6237805", "0.6234208", "0.62097156", "0.620792", "0.620792", "0.620792", "0.620792", "0.62036365", "0.61870295", "0.61818355", "0.61804515", "0.61736566", "0.61731476", "0.6157847", "0.61526155", "0.61526155", "0.61526155", "0.614463", "0.61333436", "0.61304134", "0.61304134", "0.6124009", "0.6119353", "0.6103125", "0.6103125", "0.60847753", "0.60847753", "0.60847753", "0.60847753", "0.60830253", "0.6071008", "0.60619426", "0.6047027", "0.6037515", "0.6002881", "0.59905404", "0.59797895", "0.59605664", "0.59554106", "0.59554106", "0.59554106", "0.59554106", "0.59554106", "0.59554106", "0.59554106", "0.59554106", "0.59554106", "0.59554106", "0.5953299", "0.5952736", "0.5950272", "0.59389186", "0.59389186", "0.59274024", "0.59271663", "0.59209865", "0.5916473", "0.59154844", "0.5901095", "0.5897502", "0.58850247" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == android.R.id.home) { onBackPressed(); return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\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\n onBackPressed();\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 == 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 {\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\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\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79044175", "0.7806529", "0.77667165", "0.772694", "0.76315796", "0.76219255", "0.75851756", "0.75312436", "0.7488551", "0.7458599", "0.7458599", "0.74389243", "0.74213", "0.7403157", "0.7392013", "0.73872125", "0.73794484", "0.73704696", "0.73621285", "0.7356082", "0.7345742", "0.7341443", "0.733088", "0.7328954", "0.7325907", "0.7318753", "0.73168504", "0.7313684", "0.73043704", "0.73043704", "0.7301908", "0.72984296", "0.72936225", "0.72864836", "0.7283677", "0.7281339", "0.72789717", "0.7260108", "0.72600895", "0.72600895", "0.72600895", "0.72596836", "0.72502226", "0.72242427", "0.7219611", "0.7216851", "0.72045827", "0.7200463", "0.72004086", "0.7193572", "0.7185226", "0.71783286", "0.7168776", "0.71676975", "0.7153915", "0.7153821", "0.7136652", "0.71351427", "0.71351427", "0.7129448", "0.7129297", "0.71242833", "0.71234435", "0.7123295", "0.712224", "0.7117563", "0.7117515", "0.7116721", "0.7115215", "0.71125", "0.7110011", "0.71090037", "0.71059626", "0.71001154", "0.70987624", "0.709587", "0.70940375", "0.70940375", "0.70865333", "0.7082614", "0.70814234", "0.70805097", "0.7073973", "0.7068661", "0.7062176", "0.70607156", "0.70603514", "0.7051818", "0.7038252", "0.7038252", "0.7036113", "0.703577", "0.703577", "0.7033174", "0.7031257", "0.70298326", "0.7018852" ]
0.71176934
68
private ScriptEngine scriptEngine ;// scriptEngineManager.getEngineByName("nashorn");
@Override public void run() { // logger.warn("正在执行mqtttask "+":"+message); // jedis = JedisUtil.getInstance().getJedis(); AnaUtil.handlemqttMessage(message); // logger.warn("执行mqtttask结束 "+":"+message); // JedisUtil.getInstance().returnJedis(jedis); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createScript(final Script script, final String scriptName)\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal ScriptEngine scriptEngine = new ScriptEngineManager().getEngineByName(\"nashorn\");\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (scriptEngine != null)\n\t\t\t{\n\t\t\t\tscript.setName(scriptName);\t\t\t\n\t\t\t\tscript.setStatusAndNotify(ScriptRunningState.NOT_STARTED);\n\t\t\t\tscript.setScriptEngine(scriptEngine);\t\t\n\t\t\t\t\n\t\t\t\tpopulateEngineVariables(script);\n\t\t\t\n//\t\t\tfinal MqttScriptIO scriptIO = new MqttScriptIO(connection, eventManager, script, executor); \n//\t\t\t//script.setScriptIO(scriptIO);\n//\t\t\t\n//\t\t\tfinal Map<String, Object> scriptVariables = new HashMap<String, Object>();\n//\t\t\t\n//\t\t\t// This should be considered deprecated\n//\t\t\tscriptVariables.put(\"mqttspy\", scriptIO);\n//\t\t\t// This should be used for general script-related actions\n//\t\t\tscriptVariables.put(\"spy\", scriptIO);\n//\t\t\t// Going forward, this should only have mqtt-specific elements, e.g. pub/sub\n//\t\t\tscriptVariables.put(\"mqtt\", scriptIO);\n//\t\t\t\n//\t\t\tscriptVariables.put(\"logger\", LoggerFactory.getLogger(ScriptRunner.class));\n//\t\t\t\n//\t\t\tfinal IMqttMessageLogIO mqttMessageLog = new MqttMessageLogIO();\n//\t\t\t// Add it to the script IO so that it gets stopped when requested\n//\t\t\tscript.addTask(mqttMessageLog);\t\t\t\n//\t\t\tscriptVariables.put(\"messageLog\", mqttMessageLog);\n//\t\t\t\n//\t\t\tputJavaVariablesIntoEngine(scriptEngine, scriptVariables);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new CriticalException(\"Cannot instantiate the nashorn javascript engine - most likely you don't have Java 8 installed. \"\n\t\t\t\t\t\t+ \"Please either disable scripts in your configuration file or install the appropriate JRE/JDK.\");\n\t\t\t}\n\t\t}\n\t\tcatch (SpyException e)\n\t\t{\n\t\t\tthrow new CriticalException(\"Cannot initialise the script objects\");\n\t\t}\n\t}", "private native void eval(String script) /*-{\n \t try {\n \t eval(\"{ var document = $doc; var window = $wnd; \"+ script + \"}\");\n \t } catch (e) {\n \t }\n \t }-*/;", "ScriptEvaluator createScriptEvaluator();", "private static native void eval(String script)\n /*-{\n try {\n \t if (script != null) \n eval(\"{ var document = $doc; var window = $wnd; \"+ script + \"}\");\n } catch (e) {\n }\n }-*/;", "public interface IScript {\n\n}", "public final String getScriptEngine() {\n return properties.get(SCRIPT_ENGINE_PROPERTY);\n }", "public interface Scripting {\n\n String NAME = \"cuba_Scripting\";\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param policies policies for script execution {@link ScriptExecutionPolicy}\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding, ScriptExecutionPolicy... policies);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param context map of parameters to pass to the expression, same as Binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Map<String, Object> context);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Binding binding);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param context map of parameters to pass to the script, same as Binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Map<String, Object> context);\n\n /**\n * Returns the dynamic classloader.\n * <p>Actually it is the GroovyClassLoader which parent is {@link com.haulmont.cuba.core.sys.javacl.JavaClassLoader}.\n * For explanation on class loading sequence see {@link #loadClass(String)}\n * </p>\n * @return dynamic classloader\n */\n ClassLoader getClassLoader();\n\n /**\n * Loads class by name using the following sequence:\n * <ul>\n * <li>Search for a Groovy source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a Java source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a class in classpath</li>\n * </ul>\n * It is possible to change sources in <em>conf</em> directory at run time, affecting the returning class,\n * with the following restrictions:\n * <ul>\n * <li>You can not change source from Groovy to Java</li>\n * <li>If you had Groovy source and than removed it, you'll still get the class compiled from those sources\n * and not from classpath</li>\n * </ul>\n * You can bypass these restrictions if you invoke {@link #clearCache()} method, e.g. through JMX interface\n * CachingFacadeMBean.\n * @param name fully qualified class name\n * @return class or null if not found\n */\n @Nullable\n Class<?> loadClass(String name);\n\n /**\n * Loads a class by name using the sequence described in {@link #loadClass(String)}.\n *\n * @param name fully qualified class name\n * @return class\n * @throws IllegalStateException if the class is not found\n */\n Class<?> loadClassNN(String name);\n\n /**\n * Remove compiled class from cache\n * @return true if class removed from cache\n */\n boolean removeClass(String name);\n\n /**\n * Clears compiled classes cache\n */\n void clearCache();\n\n}", "Script createScript();", "@Override\r\n public void asyncExecute(String script)\r\n {\n\r\n }", "private static native void eval(String script)\n /*-{\n try {\n if (script == null) return;\n $wnd.eval(script);\n } catch (e) {\n }\n }-*/;", "public DefaultScriptExecutor(String language) {\n\t\tScriptEngineManager manager = new ScriptEngineManager();\n\t\tif (log.isDebugEnabled()){\n\t\t\tfor (ScriptEngineFactory factory: manager.getEngineFactories()) {\n\t\t\t\tlog.debug(factory.getNames());\n\t\t\t}\n\t\t}\n\t\t\n\t\tscriptEngine = manager.getEngineByName(language);\n\t\tAssert.notNull(scriptEngine,\"JVM cannot create a script engine for name [\" + language + \"]\"); \n\t\t\n\t}", "@Override\r\n\tpublic void engine() {\n\t\t\r\n\t}", "public String getScript() { \n\t\treturn null;\n\t}", "public GroovyScriptEvaluator() {\n\t}", "@Override\r\n\tpublic void engine() {\r\n\t\t// TODO Auto-generated method stub\t\t\r\n\t}", "@Override\n public void initEngine() {\n \n }", "@Override\n public void initEngine() {\n \n }", "@Override\r\npublic void start(Stage arg0) throws Exception {\n\t\r\n\t webComponent = new WebView();\r\n webEngine=webComponent.getEngine();\r\n \r\n /* JSObject jsobj = (JSObject)webEngine.executeScript(\"window\");\r\n jsobj.setMember(\"android\", new HelloWorld());*/\r\n \r\n// Util.list.add(url);\r\n // loadUrl(url);\r\n // webComponent.getEngine().getLoadWorker().stateProperty().add\r\n System.out.println(\"RUN2\");\r\n webEngine.getLoadWorker().stateProperty()\r\n .addListener((obs, oldValue, newValue) -> {\r\n if (newValue == Worker.State.SUCCEEDED) {\r\n\r\n JSObject jsobj = (JSObject) webEngine.executeScript(\"window\");\r\n jsobj.setMember(\"android\", new HelloWorld());\r\n }\r\n });\r\n\t mainFrame = new ApplicationFrame(webEngine,webComponent);\r\n mainFrame.setVisible(true);\r\n System.out.println(\"RUN\");\r\n}", "public interface Scriptable {\r\n\tpublic int start();\r\n\tpublic int update();\r\n\tpublic void stop();\r\n}", "Value eval(String script, String name, String contentType, boolean interactive) throws Exception;", "public interface IWebEngine {\n\n /**\n * Executes the specified JavaScript Command\n *\n * @param command The command to execute\n * @return The object returned by the script (if any).\n */\n public Object executeScript(String command);\n\n /**\n * Gets a worked which will be notified when a web page has finished\n * loading.\n *\n * @return The worker\n */\n public Worker<Void> getLoadWorker();\n\n /**\n * Loads the specified URL\n *\n * @param url The URL to load in the engine.\n */\n public void load(String url);\n\n}", "@Test\r\n public void testCodeExamples() throws SecurityException, NoSuchMethodException, ScriptException\r\n {\n \t// http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/\r\n \t\r\n \t// Code Example 1: Create a ScriptEngine object using the engine name.\r\n \t//\r\n \tScriptEngineManager mgr = new ScriptEngineManager();\r\n \tScriptEngine jsEngine = mgr.getEngineByName(\"jav8\");\r\n \t\r\n \tjsEngine.put(\"print\", this.getClass().getMethod(\"print\", String.class));\r\n \tjsEngine.put(\"println\", this.getClass().getMethod(\"println\", String.class));\r\n \r\n \tjsEngine.eval(\"print('Hello, world!')\");\r\n \t\r\n \t// Code Example 2: You can retrieve a list of all engines installed to your Java platform.\r\n \t//\r\n \tList<ScriptEngineFactory> factories = mgr.getEngineFactories();\r\n \t\r\n \tassertFalse(factories.isEmpty());\r\n \t\r\n \t// Code Example 3: A ScriptEngineFactory object provides detailed information about the engine it provides.\r\n \t//\r\n \tfor (ScriptEngineFactory factory: factories) {\r\n \t System.out.println(\"ScriptEngineFactory Info\");\r\n \t \r\n \t String engName = factory.getEngineName();\r\n \t String engVersion = factory.getEngineVersion();\r\n \t String langName = factory.getLanguageName();\r\n \t String langVersion = factory.getLanguageVersion();\r\n \t System.out.printf(\"\\tScript Engine: %s (%s)\\n\", engName, engVersion);\r\n \t \r\n \t List<String> engNames = factory.getNames();\r\n \t for(String name: engNames) {\r\n \t System.out.printf(\"\\tEngine Alias: %s\\n\", name);\r\n \t }\r\n \t System.out.printf(\"\\tLanguage: %s (%s)\\n\", langName, langVersion);\r\n \t}\r\n \t \t\r\n \t// Code Example 6: The eval method can read script files.\r\n \t//\r\n \tInputStream is = this.getClass().getResourceAsStream(\"/scripts/F1.js\");\r\n \t/*\r\n \ttry {\r\n \t Reader reader = new InputStreamReader(is);\r\n \t engine.eval(reader);\r\n \t} catch (ScriptException ex) {\r\n \t ex.printStackTrace();\r\n \t}\r\n \t*/\r\n \t// Code Example 7: You can use the Invocable interface to call specific methods in a script.\r\n \t//\r\n \tjsEngine.eval(\"function sayHello() {\" +\r\n \t \" println('Hello, world!');\" +\r\n \t \"}\");\r\n \tInvocable invocableEngine = (Invocable) jsEngine;\r\n \tinvocableEngine.invokeFunction(\"sayHello\");\r\n \t\r\n \t// Code Example 8: Java programming language code adds names to a list.\r\n \t//\r\n \tList<String> namesList = new ArrayList<String>();\r\n \t\r\n \tnamesList.add(\"Jill\");\r\n \tnamesList.add(\"Bob\");\r\n \tnamesList.add(\"Laureen\");\r\n \tnamesList.add(\"Ed\");\r\n \t\r\n \t// Code Example 9: Script code can both access and modify native Java objects.\r\n \t//\r\n \tjsEngine.put(\"namesListKey\", namesList);\r\n \t \r\n \tSystem.out.println(\"Executing in script environment...\");\r\n \t\r\n \tjsEngine.eval(\"var x;\" +\r\n \t \"var names = namesListKey.toArray();\" +\r\n \t \"for(x in names) {\" +\r\n \t //\" println(names[x]);\" +\r\n \t \"}\" +\r\n \t \"namesListKey.add('Dana');\");\r\n \t\r\n \tSystem.out.println(\"Executing in Java environment...\");\r\n \t\r\n \tfor (String name: namesList) {\r\n \t System.out.println(name);\r\n \t} \r\n \t\r\n \t// Code Example 10: Applications can pass values to script using the Invocable interface.\r\n \t// \t \t\r\n \t jsEngine.eval(\"function printNames1(namesList) {\" +\r\n \t \" var x;\" +\r\n \t \" var names = namesList.toArray();\" +\r\n \t \" for(x in names) {\" +\r\n \t \" println(names[x]);\" +\r\n \t \" }\" +\r\n \t \"}\" +\r\n \r\n \t \"function addName(namesList, name) {\" +\r\n \t \" namesList.add(name);\" +\r\n \t \"}\");\r\n \t invocableEngine.invokeFunction(\"printNames1\", namesList);\r\n \t invocableEngine.invokeFunction(\"addName\", namesList, \"Dana\");\r\n }", "public abstract void runScript() throws Exception;", "public interface ScriptBinding\n{\n /**\n * Returns the list of variables this ScriptBinding provides, mapped by variable name.\n * @return The list of variables, or null if no variable is provided.\n */\n public Map<String, Object> getVariables();\n \n /**\n * Returns the list of variables descriptions, mapped by variable name.\n * This list does not have to match the getVariables return value, but the description is used to inform the user of the existence and usability of each variable.\n * @return The list of variables descriptions, or null if no description is provided.\n */\n public Map<String, I18nizableText> getVariablesDescriptions();\n\n /**\n * Allows clean up of variables created during the getVariables call.\n * @param variables The map of variables.\n */\n public void cleanVariables(Map<String, Object> variables);\n \n /**\n * Returns the JavaScript functions to inject at the start of the script, in the form of a single String prepended to the script.\n * @return The functions text, or null if no function is provided.\n */\n public String getFunctions();\n \n /**\n * Returns the list of functions descriptions, mapped by function name.\n * This list does not have to match the functions returned by getFunctions, but the description is used to inform the user of the existence and usability of each function.\n * @return The list of functions descriptions, or null if no description is provided.\n */\n public Map<String, I18nizableText> getFunctionsDescriptions();\n \n /**\n * Process the script result if there are any specificities for this console data.\n * @param result The result\n * @return The result processed, or null if this console data does not have any processing to do. \n * @throws ScriptException If a processing error occurs.\n */\n public Object processScriptResult(Object result) throws ScriptException;\n}", "@Override\r\n public void syncExecute(String script)\r\n {\n\r\n }", "@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }", "public interface Engine {\n\n String run();\n\n}", "default Value eval(String script, String name, boolean literal) throws Exception {\n if (name.endsWith(\".mjs\")) {\n return eval(script, name, \"application/javascript+module\", literal);\n } else {\n return eval(script, name, \"application/javascript\", literal);\n }\n }", "public StaticScript() {\n\n }", "Interpreter getInterpreter();", "public void handleScript(HtmlObjects.Script t)\n {\n }", "public String getScript() {\n return script;\n }", "public final InvokeScriptedProcessor removeScriptEngine() {\n properties.remove(SCRIPT_ENGINE_PROPERTY);\n return this;\n }", "public StandardScriptFactory(String scriptEngineName, String scriptSourceLocator)\n/* */ {\n/* 87 */ this(scriptEngineName, scriptSourceLocator, (Class[])null);\n/* */ }", "public interface JavaScriptInterface {\n\n\n\n}", "<T> T runGroovyScript(String name, Binding binding);", "@Override\n\tpublic boolean isScriptable() {\n\t\treturn false;\n\t}", "private ScriptInstanceManager() {\n\t\tsuper();\n\t}", "public String getEngine() {\n return this.engine;\n }", "abstract public interface Interpreter {\n\n /**\n * Evaluates a given JavaScript expression for a given userid.\n * \n * @param expression the expression to evaluate\n * @return the result of evaluating the expression\n */\n public String evaluate(String expression);\n}", "public ScriptEditor() { \n }", "public void setEngine(Engine engine);", "default Value eval(String script) throws Exception {\n return eval(script, false);\n }", "public interface ExecuteScriptCallback extends CallbackBase {\n\n /**\n * Override this method with the code you want to run after executing script service\n *\n * @param data Result to script\n * @param e NCMBException from NIFTY Cloud mobile backend\n */\n void done(byte[] data, NCMBException e);\n}", "@Override\n\tpublic String getShinyStringServerScript() {\n\t\treturn null;\n\t}", "public String getScriptName() {\n\t\treturn scriptName;\n\t}", "<T> T runGroovyScript(String name, Map<String, Object> context);", "public interface GremlinScriptLiteral {\n\n /**\n * Generate the insert query from source (Vertex, Edge or Graph).\n *\n * @param <T> The type of domain.\n * @param source the gremlin source\n * @return insert script\n */\n <T> List<String> generateInsertScript(GremlinSource<T> source);\n\n /**\n * Generate the deleteAll query from source (Vertex, Edge or Graph).\n *\n * @return deleteAll script\n */\n List<String> generateDeleteAllScript();\n\n /**\n * Generate the deleteAll By Domain Class query from source (Vertex, Edge or Graph).\n *\n * @param <T> The type of domain.\n * @param source the gremlin source\n * @return deleteAllByClass script\n */\n <T> List<String> generateDeleteAllByClassScript(GremlinSource<T> source);\n\n /**\n * Generate the findById query from source (Vertex, Edge).\n *\n * @param <T> The type of domain.\n * @param source the gremlin source\n * @return findById script script\n */\n <T> List<String> generateFindByIdScript(GremlinSource<T> source);\n\n /**\n * Generate the update query from source (Vertex, Edge or Graph).\n *\n * @param <T> The type of domain.\n * @param source the gremlin source\n * @return update script\n */\n <T> List<String> generateUpdateScript(GremlinSource<T> source);\n\n /**\n * Generate the findAll query from source (Vertex, Edge or Graph).\n *\n * @param <T> The type of domain.\n * @param source the gremlin source\n * @return findAll script\n */\n <T> List<String> generateFindAllScript(GremlinSource<T> source);\n\n /**\n * Generate the DeleteById query from source (Vertex, Edge or Graph).\n *\n * @param <T> The type of domain.\n * @param source the gremlin source\n * @return deleteById script\n */\n <T> List<String> generateDeleteByIdScript(GremlinSource<T> source);\n\n /**\n * Generate the Count query from Source (Vertex, Edge)\n *\n * @param <T> The type of domain.\n * @param source the gremlin source\n * @return count query\n */\n <T> List<String> generateCountScript(GremlinSource<T> source);\n}", "Analytics_Engine createAnalytics_Engine();", "public Script(String type){\r\n setType(type);\r\n }", "public interface Script {\n\n /**\n * @return true if the game is over\n */\n boolean isFinished();\n\n /**\n * Perform according to the event.\n * @param event interpreter output event.\n * @return result of perform.\n */\n Answer perform(final String event);\n}", "@SuppressWarnings(\"restriction\")\r\n\tpublic N2kMsgInterceptor() throws Exception {\r\n\t\tsuper();\r\n\t\r\n\t\tString resourceDir = getClass().getClassLoader().getResource(\"n2k-signalk/dist/bundle.js\").toString();\r\n\t\tresourceDir = StringUtils.substringBefore(resourceDir, \"dist/bundle.js\");\r\n\t\tresourceDir = StringUtils.substringAfter(resourceDir, \"file:\");\r\n\t\tif(logger.isDebugEnabled())logger.debug(\"Javascript jsRoot: {}\", resourceDir);\r\n\r\n\t\tFolder rootFolder = null;\r\n\t\tif (new File(resourceDir).exists()) {\r\n\t\t\trootFolder = FilesystemFolder.create(new File(resourceDir), \"UTF-8\");\r\n\t\t} else {\r\n\t\t\trootFolder = ResourceFolder.create(getClass().getClassLoader(), resourceDir, Charsets.UTF_8.name());\r\n\t\t}\r\n\t\t\r\n\t\tif(logger.isDebugEnabled())logger.debug(\"Starting nashorn env from: {}\", rootFolder.getPath());\r\n\t\t\r\n\t\tif(logger.isDebugEnabled())logger.debug(\"Load parser: {}\", \"n2k-signalk/dist/bundle.js\");\r\n\t\t\r\n\t\tengine.eval(IOUtils.toString(getIOStream(\"n2k-signalk/dist/bundle.js\")));\r\n\t\tn2kMapper = engine.get(\"n2kMapper\");\r\n\t\tif(logger.isDebugEnabled())logger.debug(\"Parser: {}\",n2kMapper);\r\n\t\t\r\n\t\t// create an Invocable object by casting the script engine object\r\n\t\tinv = (Invocable) engine;\r\n\t\r\n\t}", "@Test\r\n public void testEval__call__1() throws ScriptException {\r\n Object value = engine.eval(\"java.lang.String()\");\r\n Assert.assertEquals(\"\", value);\r\n }", "public JavaScript(String javaScript) {\n this.javaScript = javaScript;\n }", "public final InvokeScriptedProcessor setScriptEngine(final String scriptEngine) {\n properties.put(SCRIPT_ENGINE_PROPERTY, scriptEngine);\n return this;\n }", "Object eval(String script, int keyCount, String... params);", "public interface BridgeListener {\n\n void getJsInvokeNativeResult(Map<String, String> resultMap);\n}", "@SuppressWarnings(\"unchecked\")\n @CompileStatic\n public <T> T execute(String scriptName) throws NyException {\n return (T) execute(scriptName, EMPTY_MAP);\n }", "public String getSerializableClassName()\n {\n return \"bm.vm.ScriptingClass\";\n }", "LuaScriptEngine(LuaScriptEngineFactory factory) {\n\t\tsuper();\n\t\tthis.factory = factory;\n\t\tluaState = new LuaState();\n\n\t\t// Configuration\n\t\tcontext.setBindings(createBindings(), ScriptContext.ENGINE_SCOPE);\n\t\tluaState.openLibs();\n\t\tluaState.load(\"io.stdout:setvbuf(\\\"no\\\")\", \"setvbuf\");\n\t\tluaState.call(0, 0);\n\t\tluaState.load(\"io.stderr:setvbuf(\\\"no\\\")\", \"setvbuf\");\n\t\tluaState.call(0, 0);\n\t}", "com.google.protobuf.ByteString getScript();", "public static void loadScript(String category, String key) {\r\n try {\r\n String lkey = key;\r\n if (!lkey.endsWith(\".js\"))\r\n lkey += \".js\";\r\n if(!\"\".equals(category))\r\n category += \"/\";\r\n Path path = Paths.get(\"./data/scripts/\" + category + lkey);\r\n String script = new String(Files.readAllBytes(path));\r\n ScriptEngine nashorn = scriptEngineManager.getEngineByName(\"nashorn\");\r\n nashorn.eval(script);\r\n loadedScripts.put(lkey, nashorn);\r\n } catch (Exception ex) { ex.printStackTrace(); }\r\n }", "public static String _process_globals() throws Exception{\nreturn \"\";\n}", "public static String _process_globals() throws Exception{\nreturn \"\";\n}", "public static String _process_globals() throws Exception{\nreturn \"\";\n}", "public static String _process_globals() throws Exception{\nreturn \"\";\n}", "public void compileScript() {\n // find and prepare by extension\n //\n log.info(\"Compiling script...\");\n Timer engineTimer = new Timer();\n \n engine = EngineHelper.findByFileExtension(scriptExtension, dependencyJarFiles != null && !dependencyJarFiles.isEmpty());\n \n if (engine == null) {\n throw new BlazeException(\"Unable to find script engine for file extension \" + scriptExtension + \". Maybe bad file extension or missing dependency?\");\n }\n\n log.debug(\"Using script engine {}\", engine.getClass().getCanonicalName());\n \n if (!engine.isInitialized()) {\n engine.init(context);\n }\n \n script = engine.compile(context);\n \n log.info(\"Compiled script in {} ms\", engineTimer.stop().millis());\n }", "public void jsContructor() {\n }", "InterpreterRuntimeContext createInterpreterRuntimeContext();", "public static Analytic pyEval(Script script) throws ScriptException {\n List<Analytic> analytics = Lists.newArrayListWithCapacity(1);\n PySystemState engineSys = new PySystemState();\n PyObject builtins = engineSys.getBuiltins();\n builtins.__setitem__(\"_script\", Py.java2py(script));\n builtins.__setitem__(\"_analytics\", Py.java2py(analytics));\n Py.setSystemState(engineSys);\n\n // use ruby custom avro data\n AvroMode.GENERIC.override(new PyReaderWriterFactory());\n\n ScriptEngine engine = new ScriptEngineManager().getEngineByName(\"python\");\n Bindings bindings = new SimpleBindings();\n engine.eval(\n new InputStreamReader(new ByteArrayInputStream(script.bytes)),\n bindings);\n\n return analytics.get(0);\n }", "public void setEngine(String engine) {\n this.engine = engine;\n }", "public PyCode compile(String script) {\n return null;\n }", "public StandardScriptFactory(String scriptSourceLocator)\n/* */ {\n/* 65 */ this(null, scriptSourceLocator, (Class[])null);\n/* */ }", "public ScriptActivity() {\n }", "@Override\r\n public EngineInjection createEngineInjection() {\r\n return new Turbofan();\r\n }", "public IRubyObject runInterpreterBody(Node scriptNode) {\n assert scriptNode != null : \"scriptNode is not null\";\n assert scriptNode instanceof RootNode : \"scriptNode is not a RootNode\";\n \n return runInterpreter(((RootNode) scriptNode).getBodyNode());\n }", "public Object executeScript(String command);", "@Override\n protected void postProcessEngineInitialisation() {\n }", "public Engine getEngine() {\n return engine;\n }", "public Scripting getScripting() {\n\t\treturn this.scripting;\n\t}", "public IRubyObject runNormally(Node scriptNode) {\n Script script = null;\n boolean compile = getInstanceConfig().getCompileMode().shouldPrecompileCLI();\n if (compile || config.isShowBytecode()) {\n script = tryCompile(scriptNode, null, new JRubyClassLoader(getJRubyClassLoader()), config.isShowBytecode());\n }\n \n if (script != null) {\n if (config.isShowBytecode()) {\n return getNil();\n }\n \n return runScript(script);\n } else {\n failForcedCompile(scriptNode);\n \n return runInterpreter(scriptNode);\n }\n }", "Hojas eval();", "@java.lang.Override\n public com.google.protobuf.ByteString getScript() {\n return instance.getScript();\n }", "public String getScriptLanguage() { \n\t\treturn null;\n\t}", "public IRubyObject runScriptBody(Script script) {\n ThreadContext context = getCurrentContext();\n \n try {\n return script.__file__(context, getTopSelf(), Block.NULL_BLOCK);\n } catch (JumpException.ReturnJump rj) {\n return (IRubyObject) rj.getValue();\n }\n }", "public void setScriptName(String name) {\n\t\tthis.scriptName = name;\n\t}", "public Object processScriptResult(Object result) throws ScriptException;", "public static void Javascript() {\n\n\t}", "@Override\n\tpublic void hasEngine() {\n\t\t\n\t}", "public ScriptBuilder() {\n }", "boolean supportsScripts();", "@Override\n\tprotected void initScript(Element e, Script parent) throws ScriptException {\n\n\t}", "public ScriptCit getScript(){\n return chapVerse;\n }", "public String getScriptAsString() {\n return this.script;\n }", "public void engineOn(){\n engine = true;\n }", "private Engine() {\n\n }", "public void setEngine(Engine engine) {\n this.engine = engine;\n }", "protected abstract String getScriptKey();", "void start() throws EngineException;", "public TemplateEngine getEngine( String name );", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tCocos2dxJavascriptJavaBridge.evalString(rStr);\n\t\t\t\t\t}" ]
[ "0.63576996", "0.63224816", "0.6233849", "0.6144982", "0.60728616", "0.5998469", "0.59284717", "0.5916345", "0.58753425", "0.58666086", "0.5821066", "0.5784084", "0.57310736", "0.5654522", "0.5635896", "0.5634954", "0.5634954", "0.5623739", "0.5553651", "0.5511906", "0.550942", "0.5473684", "0.54597366", "0.5441619", "0.5420214", "0.53937066", "0.53815913", "0.53665555", "0.5341364", "0.5331904", "0.5299574", "0.5275994", "0.5274473", "0.5261554", "0.52422285", "0.5194812", "0.5182474", "0.5155239", "0.5134548", "0.51265836", "0.512221", "0.51221895", "0.51180685", "0.51166517", "0.5111938", "0.51019067", "0.5101346", "0.5088663", "0.50837225", "0.5063611", "0.5059732", "0.5052264", "0.50367755", "0.5027987", "0.5025011", "0.5022397", "0.5015101", "0.50077784", "0.50036794", "0.49948877", "0.49941763", "0.49873626", "0.49714127", "0.49714127", "0.49714127", "0.49714127", "0.49675018", "0.49454996", "0.49391043", "0.49378717", "0.49364978", "0.49290133", "0.4920726", "0.49141663", "0.49105698", "0.49082318", "0.49067903", "0.48987567", "0.48952675", "0.48946247", "0.4889633", "0.4881074", "0.4877463", "0.48751387", "0.48725042", "0.48479745", "0.4846854", "0.48463878", "0.48454854", "0.48452276", "0.48446012", "0.48337257", "0.48168877", "0.4811902", "0.4811363", "0.48100036", "0.47969708", "0.47943082", "0.47891364", "0.47884512", "0.47824222" ]
0.0
-1
Load your keystore file
private void Initiat_Service(Object serviceAdm,Utilisateur user_en_cours) { log.debug("user_en_cours.trustedApplication:"+user_en_cours.trustedApplication); String filename =propIdentification.getProperty(Long.toString(user_en_cours.trustedApplication)); log.debug("filename:"+filename); //System.out.println("my file "+filename); FileInputStream is=null; try { is = new FileInputStream(filename); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } KeyStore myKeyStore=null; try { myKeyStore = KeyStore.getInstance(KeyStore.getDefaultType()); } catch (KeyStoreException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } String password =propIdentification.getProperty(Long.toString(user_en_cours.trustedApplication)+".password"); try { myKeyStore.load(is, password.toCharArray()); } catch (NoSuchAlgorithmException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } catch (CertificateException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } catch (IOException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } String filenameTrust =prop.getProperty("clienttrustore"); FileInputStream myKeys = null; try { myKeys = new FileInputStream(filenameTrust); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } // Load your TrustedStore KeyStore myTrustedStore=null; try { myTrustedStore = KeyStore.getInstance(KeyStore.getDefaultType()); } catch (KeyStoreException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } try { myTrustedStore.load(myKeys, prop.getProperty("clienttrustore.password").toCharArray()); } catch (NoSuchAlgorithmException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } catch (CertificateException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { WSConnection.setupTLS(serviceAdm, myKeyStore, password, myTrustedStore); } catch (GeneralSecurityException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadStore() throws Exception {\n\t\tkeyStore = KeyStore.getInstance(keyStoreType.toUpperCase());\n\t\tFileInputStream fis = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(keyStorePath);\n\t\t\tkeyStore.load(fis, keyStorePass.toCharArray());\n\t\t} catch (CertificateException | IOException e) {\n\t\t\twriteToLog(\"Error while trying to load the key-store\");\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception(\"Error while trying to load the key-store\", e);\n\t\t} finally {\n\t\t\tif (fis != null) {\n\t\t\t\tfis.close();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public KeyStore loadKeyStore(File file, String keyStoreType, String password) {\n KeyStore keyStore;\n try {\n keyStore = KeyStore.getInstance(keyStoreType);\n } catch (KeyStoreException e) {\n throw new KeyStoreAccessException(\"Unable to get KeyStore instance of type: \" + keyStoreType, e);\n }\n\n try (InputStream keystoreAsStream = new FileInputStream(file)) {\n keyStore.load(keystoreAsStream, password.toCharArray());\n } catch (IOException e) {\n throw new ImportException(\"Unable to read KeyStore from file: \" + file.getName(), e);\n } catch (CertificateException | NoSuchAlgorithmException e) {\n throw new ImportException(\"Error while reading KeyStore\", e);\n }\n\n return keyStore;\n }", "KeyStore loadKeystore(char[] keystorePassword) {\n try {\n // Load the keystore in the user's home directory\n bufferedInputStream.reset();\n keystore.load(bufferedInputStream, keystorePassword);\n return keystore;\n // TODO: EOFException might mean we're skipping guesses\n } catch (CertificateException | NoSuchAlgorithmException | FileNotFoundException e) {\n throw new KeystoreException(e);\n } catch (IOException e) {\n if ((e.getCause() instanceof UnrecoverableKeyException) &&\n (e.getCause().getMessage().contains(\"Password verification failed\"))) return null;\n\n throw new KeystoreException(e);\n }\n }", "private void loadWalletFromKeystore(String password, String keyStoreFileName) {\n mCredentials = Web3jWalletHelper.onInstance(mContext).getWallet(password, walletSuffixDir, keyStoreFileName);\n SharedPref.write(WALLET_ADDRESS, mCredentials.getAddress());\n // SharedPref.write(PUBLIC_KEY, mCredentials.getEcKeyPair().getPublicKey().toString(16));\n SharedPref.write(PRIVATE_KEY, mCredentials.getEcKeyPair().getPrivateKey().toString(16));\n SharedPref.write(PUBLIC_KEY, ECDSA.getHexEncodedPoint(SharedPref.read(PRIVATE_KEY)));\n }", "@Nonnull\n public static KeyStore loadKeyStore(String filename, String password)\n throws IOException, GeneralSecurityException {\n return loadKeyStore(FileUtil.getContextFile(filename), password);\n }", "@Test\n public void testSslJks_loadTrustStoreFromFile() throws Exception {\n final InputStream inputStream = this.getClass().getResourceAsStream(\"/keystore.jks\");\n final String tempDirectoryPath = System.getProperty(\"java.io.tmpdir\");\n final File jks = new File(tempDirectoryPath + File.separator + \"keystore.jks\");\n final FileOutputStream outputStream = new FileOutputStream(jks);\n final byte[] buffer = new byte[1024];\n int noOfBytes = 0;\n while ((noOfBytes = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, noOfBytes);\n }\n\n final MockVault mockVault = new MockVault(200, \"{\\\"data\\\":{\\\"value\\\":\\\"mock\\\"}}\");\n final Server server = VaultTestUtils.initHttpsMockVault(mockVault);\n server.start();\n\n final VaultConfig vaultConfig = new VaultConfig()\n .address(\"https://127.0.0.1:9998\")\n .token(\"mock_token\")\n .sslConfig(new SslConfig().trustStoreFile(jks).build())\n .build();\n final Vault vault = new Vault(vaultConfig);\n final LogicalResponse response = vault.logical().read(\"secret/hello\");\n\n VaultTestUtils.shutdownMockVault(server);\n }", "public KeyStore readKeyStore(File file, char[] password) {\n FileInputStream stream = null;\n try {\n stream = new FileInputStream(file);\n KeyStore ks = KeyStore.getInstance(\"JKS\"); \n ks.load(stream, password);\n return ks;\n } catch (RuntimeException | IOException | GeneralSecurityException e) {\n throw new RuntimeException(\"Failed to read keystore from [\"+file+\"]\", e);\n } finally {\n CloseablesExt.closeQuietly(stream);\n }\n }", "@Nonnull\n public static KeyStore loadKeyStore(File file, String password)\n throws IOException, GeneralSecurityException {\n KeyStore keyStore = KeyStore.getInstance(\"jks\");\n FileInputStream stream = new FileInputStream(file);\n try {\n keyStore.load(stream, password.toCharArray());\n } finally {\n stream.close();\n }\n return keyStore;\n }", "private static KeyStore getLoadKeyStore(File keyStoreFile, String keyStorePwd) throws Exception {\n\t\tKeyStore ks = null;\n\t\tInputStream ksInput = null;\n\t\ttry {\n\t\t\t//ks = KeyStore.getInstance(DEFAULT_KEYSTORE_TYPE, new BouncyCastleProvider());\n\t\t\tks = KeyStore.getInstance(DEFAULT_KEYSTORE_TYPE);\n\t\t\tksInput = new BufferedInputStream(new FileInputStream(keyStoreFile));\n\t\t\tks.load(ksInput, keyStorePwd.toCharArray());\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tthrow new Exception(\"加载证书密钥库[\" + keyStoreFile.getName() + \"]失败,原因[\" + ex.getMessage() + \"]\");\n\t\t} finally {\n\t\t\t//IOUtils.closeQuietly(ksInput);\n\t\t}\n\t\treturn ks;\n\t}", "@SuppressFBWarnings(value = \"EXS_EXCEPTION_SOFTENING_NO_CONSTRAINTS\",\n\t\t\tjustification = \"converting checked to unchecked exceptions that must not be thrown\")\n\tpublic static KeyStore loadKeyStore(final Path jksFilePath, final String password)\n\t\t\tthrows CertificateException, IOException {\n\t\ttry (InputStream inputStream = Files.newInputStream(jksFilePath)) {\n\t\t\tfinal KeyStore keyStore = KeyStore.getInstance(\"JKS\");\n\t\t\tkeyStore.load(inputStream, password.toCharArray());\n\t\t\treturn keyStore;\n\t\t} catch (final KeyStoreException | NoSuchAlgorithmException e) {\n\t\t\tthrow new SneakyException(e);\n\t\t}\n\t}", "private void loadTM() throws ERMgmtException{\n try{\n KeyStore ts = KeyStore.getInstance(KeyStore.getDefaultType());\n //random number generate to generated aliases for the new keystore\n Random generator = new Random();\n \n ts.load(null, null);\n \n if(mCertList.size() > 0){\n for(int i=0; i<mCertList.size(); i++){\n int randomInt = generator.nextInt();\n while(ts.containsAlias(\"certificate\"+randomInt)){\n randomInt = generator.nextInt();\n }\n ts.setCertificateEntry(\"certificate\"+randomInt, (X509Certificate) mCertList.get(i));\n } \n mTrustManagerFactory.init(ts); \n } else { \n mTrustManagerFactory.init((KeyStore) null);\n }\n \n TrustManager[] tm = mTrustManagerFactory.getTrustManagers();\n for(int i=0; i<tm.length; i++){\n if (tm[i] instanceof X509TrustManager) {\n mTrustManager = (X509TrustManager)tm[i]; \n break;\n }\n }\n \n } catch (Exception e){ \n throw new ERMgmtException(\"Trust Manager Error\", e);\n }\n \n }", "private void initKeystore(Properties props) throws KeyStoreInitException {\n\t\tkeystorePassword = props.getProperty(\"keystorePassword\");\n\t\tkeystoreLocation = props.getProperty(\"keystoreLocation\");\n\t\tsecretKeyAlias = props.getProperty(\"secretKeyAlias\");\n\n\t\ttry {\n\t\t\tks = loadKeyStore();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new KeyStoreInitException(e.getMessage());\n\t\t} catch (KeyStoreException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new KeyStoreInitException(e.getMessage());\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new KeyStoreInitException(e.getMessage());\n\t\t} catch (CertificateException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new KeyStoreInitException(e.getMessage());\n\t\t}\n\t}", "public static void load() {\n try {\n File confFile = SessionService.getConfFileByPath(Const.FILE_CONFIGURATION);\n UtilSystem.recoverFileIfRequired(confFile);\n // Conf file doesn't exist at first launch\n if (confFile.exists()) {\n // Now read the conf file\n InputStream str = new FileInputStream(confFile);\n try {\n properties.load(str);\n } finally {\n str.close();\n }\n }\n } catch (Exception e) {\n Log.error(e);\n Messages.showErrorMessage(114);\n }\n }", "public static KeyManagerFactory loadKeyStore( String keyStoreFile, String keyStorePasswordStr ) throws Exception\n {\n char[] keyStorePassword = Strings.isEmpty( keyStorePasswordStr ) ? null : keyStorePasswordStr.toCharArray();\n\n if ( !Strings.isEmpty( keyStoreFile ) )\n {\n // We have a provided KeyStore file: read it\n KeyStore keyStore = KeyStore.getInstance( KeyStore.getDefaultType() );\n\n try ( InputStream is = Files.newInputStream( Paths.get( keyStoreFile ) ) )\n {\n keyStore.load( is, keyStorePassword );\n }\n \n /*\n * Verify key store:\n * * Must only contain one entry which must be a key entry\n * * Must contain a certificate chain\n * * The private key must be recoverable by the key store password\n */\n Enumeration<String> aliases = keyStore.aliases();\n \n if ( !aliases.hasMoreElements() )\n {\n throw new KeyStoreException( \"Key store is empty\" );\n }\n \n String alias = aliases.nextElement();\n \n if ( aliases.hasMoreElements() )\n {\n throw new KeyStoreException( \"Key store contains more than one entry\" );\n }\n \n if ( !keyStore.isKeyEntry( alias ) )\n {\n throw new KeyStoreException( \"Key store must contain a key entry\" );\n }\n \n if ( keyStore.getCertificateChain( alias ) == null )\n {\n throw new KeyStoreException( \"Key store must contain a certificate chain\" );\n }\n \n if ( keyStore.getKey( alias, keyStorePassword ) == null )\n {\n throw new KeyStoreException( \"Private key must be recoverable by the key store password\" );\n }\n \n // Set up key manager factory to use our key store\n String algorithm = Security.getProperty( \"ssl.KeyManagerFactory.algorithm\" );\n \n if ( algorithm == null )\n {\n algorithm = KeyManagerFactory.getDefaultAlgorithm();\n }\n \n KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance( algorithm );\n \n keyManagerFactory.init( keyStore, keyStorePassword );\n \n return keyManagerFactory;\n }\n else\n {\n return null;\n }\n }", "public void importCA(File certfile){\n try {\n File keystoreFile = new File(archivo);\n \n //copia .cer -> formato manipulacion\n FileInputStream fis = new FileInputStream(certfile);\n DataInputStream dis = new DataInputStream(fis);\n byte[] bytes = new byte[dis.available()];\n dis.readFully(bytes);\n ByteArrayInputStream bais = new ByteArrayInputStream(bytes);\n bais.close();\n CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n Certificate certs = cf.generateCertificate(bais);\n //System.out.println(certs.toString());\n //inic keystore\n FileInputStream newib = new FileInputStream(keystoreFile);\n KeyStore keystore = KeyStore.getInstance(INSTANCE);\n keystore.load(newib,ksPass );\n String alias = (String)keystore.aliases().nextElement();\n newib.close();\n \n //recupero el array de certificado del keystore generado para CA\n Certificate[] certChain = keystore.getCertificateChain(alias);\n certChain[0]= certs; //inserto el certificado entregado por CA\n //LOG.info(\"Inserto certifica CA: \"+certChain[0].toString());\n //recupero la clave privada para generar la nueva entrada\n Key pk = (PrivateKey)keystore.getKey(alias, ksPass); \n keystore.setKeyEntry(alias, pk, ksPass, certChain);\n LOG.info(\"Keystore actualizado: [OK]\");\n \n FileOutputStream fos = new FileOutputStream(keystoreFile);\n keystore.store(fos,ksPass);\n fos.close(); \n \n } catch (FileNotFoundException ex) {\n LOG.error(\"Error - no se encuentra el archivo\",ex);\n } catch (IOException | NoSuchAlgorithmException | CertificateException | KeyStoreException ex) {\n LOG.error(\"Error con el certificado\",ex);\n } catch (UnrecoverableKeyException ex) {\n LOG.error(ex);\n }\n }", "public MEKeyTool(File meKeystoreFile)\n throws FileNotFoundException, IOException {\n\n FileInputStream input;\n\n input = new FileInputStream(meKeystoreFile);\n\n try {\n keystore = new PublicKeyStoreBuilderBase(input);\n } finally {\n input.close();\n }\n }", "public static KeyStore getKeyStoreFromFile(String keystoreName, String password,\n String home) throws Exception {\n Path tenantKeystorePath = Paths.get(home, \"repository\", \"resources\", \"security\", keystoreName);\n FileInputStream file = new FileInputStream(tenantKeystorePath.toString());\n KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());\n keystore.load(file, password.toCharArray());\n return keystore;\n }", "public KeyStore getKeyStore(InputStream keystoreIS, String password) throws CertException;", "public void importKeyFromJcaKeystore(String jcakeystoreFilename,\n String keystorePassword,\n String alias, String domain)\n throws IOException, GeneralSecurityException {\n FileInputStream keystoreStream;\n KeyStore jcaKeystore;\n\n // Load the keystore\n keystoreStream = new FileInputStream(new File(jcakeystoreFilename));\n\n try {\n jcaKeystore = KeyStore.getInstance(KeyStore.getDefaultType());\n\n if (keystorePassword == null) {\n jcaKeystore.load(keystoreStream, null);\n } else {\n jcaKeystore.load(keystoreStream,\n keystorePassword.toCharArray());\n }\n } finally {\n keystoreStream.close();\n }\n\n importKeyFromJcaKeystore(jcaKeystore,\n alias,\n domain);\n }", "protected static void setKeyStorePath(String keyStorePath) {\n Program.keyStorePath = keyStorePath;\n Program.authType = AUTH_TYPE.CERT;\n }", "public void loadKey(File in, File privateKeyFile) throws GeneralSecurityException, IOException {\n\t byte[] encodedKey = new byte[(int)privateKeyFile.length()];\n\t FileInputStream is = new FileInputStream(privateKeyFile);\n\t is.read(encodedKey);\n\t \n\t // create private key\n\t PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(encodedKey);\n\t KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n\t PrivateKey pk = kf.generatePrivate(privateKeySpec);\n\t \n\t // read AES key\n\t pkCipher.init(Cipher.DECRYPT_MODE, pk);\n\t aesKey = new byte[256/8];\n\t CipherInputStream cis = new CipherInputStream(new FileInputStream(in), pkCipher);\n\t cis.read(aesKey);\n\t aesKeySpec = new SecretKeySpec(aesKey, \"AES\");\n\t cis.close();\n\t is.close();\n\t }", "private void openKeystoreAndOutputJad() throws Exception {\n File ksfile;\n FileInputStream ksstream;\n\n if (alias == null) {\n usageError(command + \" requires -alias\");\n }\n\n if (outfile == null) {\n usageError(command + \" requires an output JAD\");\n }\n\n if (keystore == null) {\n keystore = System.getProperty(\"user.home\") + File.separator\n + \".keystore\";\n }\n\n try {\n ksfile = new File(keystore);\n // Check if keystore file is empty\n if (ksfile.exists() && ksfile.length() == 0) {\n throw new Exception(\"Keystore exists, but is empty: \" +\n keystore);\n }\n\n ksstream = new FileInputStream(ksfile);\n } catch (FileNotFoundException fnfe) {\n throw new Exception(\"Keystore does not exist: \" + keystore);\n }\n\n try {\n try {\n // the stream will be closed later\n outstream = new FileOutputStream(outfile);\n } catch (IOException ioe) {\n throw new Exception(\"Error opening output JAD: \" +\n outfile);\n }\n\n try {\n // load the keystore into the AppDescriptor\n appdesc.loadKeyStore(ksstream, storepass);\n } catch (Exception e) {\n throw new Exception(\"Keystore could not be loaded: \" +\n e.toString());\n }\n } finally {\n try {\n ksstream.close();\n } catch (IOException e) {\n // ignore\n }\n }\n }", "public MEKeyTool(String meKeystoreFilename)\n throws FileNotFoundException, IOException {\n\n FileInputStream input;\n\n input = new FileInputStream(new File(meKeystoreFilename));\n\n try {\n keystore = new PublicKeyStoreBuilderBase(input);\n } finally {\n input.close();\n }\n }", "@Bean\n public KeyManager keyManager() {\n final Resource storeFile\n = this.resourceLoader.getResource(\"classpath:\" + this.samlProperties.getKeystore().getName());\n final Map<String, String> passwords = new HashMap<>();\n passwords.put(\n this.samlProperties.getKeystore().getDefaultKey().getName(),\n this.samlProperties.getKeystore().getDefaultKey().getPassword()\n );\n return new JKSKeyManager(\n storeFile,\n this.samlProperties.getKeystore().getPassword(),\n passwords,\n this.samlProperties.getKeystore().getDefaultKey().getName()\n );\n }", "private void getKeyAndCerts(String filePath, String pw)\n throws GeneralSecurityException, IOException {\n System.out\n .println(\"reading signature key and certificates from file \" + filePath + \".\");\n\n FileInputStream fis = new FileInputStream(filePath);\n KeyStore store = KeyStore.getInstance(\"PKCS12\", \"IAIK\");\n store.load(fis, pw.toCharArray());\n\n Enumeration<String> aliases = store.aliases();\n String alias = (String) aliases.nextElement();\n privKey_ = (PrivateKey) store.getKey(alias, pw.toCharArray());\n certChain_ = Util.convertCertificateChain(store.getCertificateChain(alias));\n fis.close();\n }", "@PostConstruct\n\tpublic void loadProperties() {\n\t\tproperties.put(PropertyKey.TRANSLATION_FILE_STORE, \"C:\\\\development\\\\projects\\\\mega-translator\\\\store\");\n\t}", "public LocalRsaKeyLoader( CryptoService crypto, KeyStorageApi keyClient, DataStore dataStore )\n throws KodexException {\n if ( crypto == null || dataStore == null || keyClient == null ) {\n throw new KodexException(\n \"Crypto service, key network client, and data store are required to load from disk\" );\n }\n this.keyClient = keyClient;\n this.crypto = crypto;\n this.dataStore = dataStore;\n }", "public static PrivateKey loadPrivateKey(String path, String alias, String storepassword) {\n\n PrivateKey privateKey = null;\n try {\n KeyStore keyStore = KeyStore.getInstance(\"JKS\");\n keyStore.load(new FileInputStream(path), storepassword.toCharArray());\n KeyStore.PrivateKeyEntry prvKeyEntry = (KeyStore.PrivateKeyEntry) keyStore.getEntry(alias, new KeyStore.PasswordProtection(storepassword.toCharArray()));\n privateKey = prvKeyEntry.getPrivateKey();\n } catch (Exception e) {\n Logger.error(\"Error loading private key\");\n } finally {\n return privateKey;\n }\n }", "public void saveKeystore(File meKeystoreFile) throws IOException {\n FileOutputStream output;\n\n output = new FileOutputStream(meKeystoreFile);\n\n keystore.serialize(output);\n output.close();\n }", "@Override\n public void run() throws Exception {\n InputStream in = getClass().getResourceAsStream(\"/keystore.p12\");\n char[] password = \"password\".toCharArray();\n KeyStore keystore = new JavaKeyStore(\"PKCS12\", in, password);\n System.out.println(\"Loaded keystore: \" + keystore);\n\n // create walletapi with loaded one\n WalletApi walletApi = new WalletApiFactory().create(keystore);\n System.out.println(\"Walletapi with loaded keystore: \" + walletApi);\n\n // unlocked key\n Authentication authentication = Authentication.of(new KeyAlias(\"keyalias\"), \"password\");\n boolean unlockResult = walletApi.unlock(authentication);\n System.out.println(\"Unlock result: \" + unlockResult);\n System.out.println(\"Unlocked account: \" + walletApi.getPrincipal());\n }", "private KeyManager getKeyManager() {\n\t\tDefaultResourceLoader loader = new FileSystemResourceLoader();\n\t\tResource storeFile = loader.getResource(\"file:\" + samlProps.get(\"keyStoreFilePath\"));\n\t\tMap<String, String> keyPasswords = new HashMap<String, String>();\n\t\tkeyPasswords.put(samlProps.get(\"keyAlias\"), samlProps.get(\"keyPasswd\"));\n\n\t\treturn new JKSKeyManager(storeFile, samlProps.get(\"keyStorePasswd\"), keyPasswords, samlProps.get(\"keyAlias\"));\n\t}", "public SSLConfig(@NonNull File jksFile, @NonNull String storePassword, @NonNull String keyPassword){\n this.sslCertificateType = JKS;\n this.jksFile = jksFile;\n this.storePassword = storePassword;\n this.keyPassword = keyPassword;\n }", "public static void loadFromFile() {\n\t\tloadFromFile(Main.getConfigFile(), Main.instance.getServer());\n\t}", "public static void createKeyStore(String filename,\n String password, String keyPassword, String alias,\n Key privateKey, Certificate cert)\n throws GeneralSecurityException, IOException {\n KeyStore ks = createEmptyKeyStore();\n ks.setKeyEntry(alias, privateKey, keyPassword.toCharArray(),\n new Certificate[]{cert});\n saveKeyStore(ks, filename, password);\n }", "public KeyStore getKeyStore();", "private static KeyStore buildKeyStore(Context context, int certRawResId) throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException {\n String keyStoreType = KeyStore.getDefaultType();\n KeyStore keyStore = KeyStore.getInstance(keyStoreType);\n keyStore.load(null, null);\n\n // read and add certificate authority\n Certificate cert = readCert(context, certRawResId);\n keyStore.setCertificateEntry(\"ca\", cert);\n\n return keyStore;\n }", "public URL getKeyStore() {\n URL keyStore = null;\n if (keyStoreLocation != null) {\n try {\n keyStore = new URL(\"file:\" + keyStoreLocation);\n }\n catch (Exception e) {\n log.error(\"Keystore has a malformed name: \" + keyStoreLocation, e);\n }\n }\n return keyStore;\n }", "public void init() throws Exception {\n\t\tString trustKeyStore = null;\n\t\tString trustKsPsword = null;\n\t\tString trustKsType = null;\n\t\t\n\t\t// Read ssl keystore properties from file\n\t\tProperties properties = new Properties();\n\t\tInputStream sslCertInput = Resources.getResourceAsStream(\"sslCertification.properties\");\n\t\ttry {\n\t\t\tproperties.load(sslCertInput);\n\t\t\ttrustKeyStore = properties.getProperty(\"trustKeyStore\");\n\t\t\ttrustKsPsword = properties.getProperty(\"trustKeyStorePass\");\n\t\t\ttrustKsType = properties.getProperty(\"trustKeyStoreType\");\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tsslCertInput.close();\n\t\t}\n \n // Set trust key store factory\n KeyStore trustKs = KeyStore.getInstance(trustKsType); \n FileInputStream trustKSStream = new FileInputStream(trustKeyStore);\n try {\n \ttrustKs.load(trustKSStream, trustKsPsword.toCharArray()); \n } catch (Exception e) {\n \tthrow e;\n } finally {\n \ttrustKSStream.close();\n }\n TrustManagerFactory trustKf = TrustManagerFactory.getInstance(\"SunX509\");\n trustKf.init(trustKs); \n \n // Init SSLContext\n SSLContext context = SSLContext.getInstance(\"TLSv1.2\"); \n context.init(null, trustKf.getTrustManagers(), null); \n sslFactory = context.getSocketFactory();\n \n\t\treturn;\n\t}", "@Test\n\tpublic void testAddX509CertificateToKeyStore() throws KeyStoreException, CertificateException, IOException, NoSuchAlgorithmException, InvalidKeySpecException {\n\t\t\n\t\tX509Certificate cert = DbMock.readCert(\"apache-tomcat.pem\");\n\t\t\n\t\tKeyStore keyStore = KeyStore.getInstance(\"JKS\");\n\t\t//initialize keystore\n\t\tkeyStore.load(null, null);\n\t\t\n\t\tJcaUtils.addX509CertificateToKeyStore(keyStore, \"alias1\", cert);\n\t\t\n\t\t// Save the new keystore contents\n\t\tFileOutputStream out = new FileOutputStream(\"/Users/davide/Downloads/ks.dat\");\n\t\tkeyStore.store(out, \"davidedc\".toCharArray());\n\t\tout.close();\n\t}", "@Override\n public void load(String keyWord, String fileName){\n FileReader loadDetails;\n String record;\n try{\n loadDetails=new FileReader(fileName);\n BufferedReader bin=new BufferedReader(loadDetails);\n while (((record=bin.readLine()) != null)){\n if ((record).contentEquals(keyWord)){\n setUsername(record);\n setPassword(bin.readLine());\n setFirstname(bin.readLine());\n setLastname(bin.readLine());\n setDoB((Date)DMY.parse(bin.readLine()));\n setContactNumber(bin.readLine());\n setEmail(bin.readLine());\n setSalary(Float.valueOf(bin.readLine()));\n setPositionStatus(bin.readLine());\n homeAddress.load(bin);\n }//end if\n }//end while\n bin.close();\n }//end try\n catch (IOException ioe){}//end catch\n catch (ParseException ex) {\n Logger.getLogger(Product.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void importKeyPair() {\n\t\t/*\n\t\t * Let the user choose a PKCS #12 file (keystore) containing a public\n\t\t * and private key pair to import\n\t\t */\n\t\tFile importFile = selectImportExportFile(\n\t\t\t\t\"PKCS #12 file to import from\", // title\n\t\t\t\tnew String[] { \".p12\", \".pfx\" }, // array of file extensions\n\t\t\t\t// for the file filter\n\t\t\t\t\"PKCS#12 Files (*.p12, *.pfx)\", // description of the filter\n\t\t\t\t\"Import\", // text for the file chooser's approve button\n\t\t\t\t\"keyPairDir\"); // preference string for saving the last chosen directory\n\n\t\tif (importFile == null)\n\t\t\treturn;\n\n\t\t// The PKCS #12 keystore is not a file\n\t\tif (!importFile.isFile()) {\n\t\t\tshowMessageDialog(this, \"Your selection is not a file\",\n\t\t\t\t\tALERT_TITLE, WARNING_MESSAGE);\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the user to enter the password that was used to encrypt the\n\t\t// private key contained in the PKCS #12 file\n\t\tGetPasswordDialog getPasswordDialog = new GetPasswordDialog(this,\n\t\t\t\t\"Import key pair entry\", true,\n\t\t\t\t\"Enter the password that was used to encrypt the PKCS #12 file\");\n\t\tgetPasswordDialog.setLocationRelativeTo(this);\n\t\tgetPasswordDialog.setVisible(true);\n\n\t\tString pkcs12Password = getPasswordDialog.getPassword();\n\n\t\tif (pkcs12Password == null) // user cancelled\n\t\t\treturn;\n\t\telse if (pkcs12Password.isEmpty()) // empty password\n\t\t\t// FIXME: Maybe user did not have the password set for the private key???\n\t\t\treturn;\n\n\t\ttry {\n\t\t\t// Load the PKCS #12 keystore from the file\n\t\t\t// (this is using the BouncyCastle provider !!!)\n\t\t\tKeyStore pkcs12Keystore = credManager.loadPKCS12Keystore(importFile,\n\t\t\t\t\tpkcs12Password);\n\n\t\t\t/*\n\t\t\t * Display the import key pair dialog supplying all the private keys\n\t\t\t * stored in the PKCS #12 file (normally there will be only one\n\t\t\t * private key inside, but could be more as this is a keystore after\n\t\t\t * all).\n\t\t\t */\n\t\t\tNewKeyPairEntryDialog importKeyPairDialog = new NewKeyPairEntryDialog(\n\t\t\t\t\tthis, \"Credential Manager\", true, pkcs12Keystore, dnParser);\n\t\t\timportKeyPairDialog.setLocationRelativeTo(this);\n\t\t\timportKeyPairDialog.setVisible(true);\n\n\t\t\t// Get the private key and certificate chain of the key pair\n\t\t\tKey privateKey = importKeyPairDialog.getPrivateKey();\n\t\t\tCertificate[] certChain = importKeyPairDialog.getCertificateChain();\n\n\t\t\tif (privateKey == null || certChain == null)\n\t\t\t\t// User did not select a key pair for import or cancelled\n\t\t\t\treturn;\n\n\t\t\t/*\n\t\t\t * Check if a key pair entry with the same alias already exists in\n\t\t\t * the Keystore\n\t\t\t */\n\t\t\tif (credManager.hasKeyPair(privateKey, certChain)\n\t\t\t\t\t&& showConfirmDialog(this,\n\t\t\t\t\t\t\t\"The keystore already contains the key pair entry with the same private key.\\n\"\n\t\t\t\t\t\t\t\t\t+ \"Do you want to overwrite it?\",\n\t\t\t\t\t\t\tALERT_TITLE, YES_NO_OPTION) != YES_OPTION)\n\t\t\t\treturn;\n\n\t\t\t// Place the private key and certificate chain into the Keystore\n\t\t\tcredManager.addKeyPair(privateKey, certChain);\n\n\t\t\t// Display success message\n\t\t\tshowMessageDialog(this, \"Key pair import successful\", ALERT_TITLE,\n\t\t\t\t\tINFORMATION_MESSAGE);\n\t\t} catch (Exception ex) { // too many exceptions to catch separately\n\t\t\tString exMessage = \"Failed to import the key pair entry to the Keystore. \"\n\t\t\t\t\t+ ex.getMessage();\n\t\t\tlogger.error(exMessage, ex);\n\t\t\tshowMessageDialog(this, exMessage, ERROR_TITLE, ERROR_MESSAGE);\n\t\t}\n\t}", "private void initializeStoreFromPersistedData() throws IOException\r\n {\r\n loadKeys();\r\n\r\n if (keyHash.isEmpty())\r\n {\r\n dataFile.reset();\r\n }\r\n else\r\n {\r\n final boolean isOk = checkKeyDataConsistency(false);\r\n if (!isOk)\r\n {\r\n keyHash.clear();\r\n keyFile.reset();\r\n dataFile.reset();\r\n log.warn(\"{0}: Corruption detected. Resetting data and keys files.\", logCacheName);\r\n }\r\n else\r\n {\r\n synchronized (this)\r\n {\r\n startupSize = keyHash.size();\r\n }\r\n }\r\n }\r\n }", "private void loadProperties() {\n Path path = getSamplePropertiesPath();\n LOG.info(\"Loading Properties from {}\", path.toString());\n try {\n FileInputStream fis = new FileInputStream(getSamplePropertiesPath().toFile());\n Properties properties = new Properties();\n properties.load(fis);\n\n String privateKey = properties.getProperty(PRIVATE_KEY);\n this.credentials = Credentials.create(privateKey);\n this.contract1Address = properties.getProperty(CONTRACT1_ADDRESS);\n this.contract2Address = properties.getProperty(CONTRACT2_ADDRESS);\n this.contract3Address = properties.getProperty(CONTRACT3_ADDRESS);\n this.contract4Address = properties.getProperty(CONTRACT4_ADDRESS);\n this.contract5Address = properties.getProperty(CONTRACT5_ADDRESS);\n this.contract6Address = properties.getProperty(CONTRACT6_ADDRESS);\n\n } catch (IOException ioEx) {\n // By the time we have reached the loadProperties method, we should be sure the file\n // exists. As such, just throw an exception to stop.\n throw new RuntimeException(ioEx);\n }\n }", "public void setKeyfile(File keyfile) {\n this.keyfile = keyfile;\n }", "protected void setupHttps(){\n try {\n if (!testKeystoreFile.exists()) {\n // Prepare a temporary directory for the tests\n BioUtils.delete(this.testDir, true);\n this.testDir.mkdir();\n // Copy the keystore into the test directory\n Response response = new Client(Protocol.CLAP)\n .handle(new Request(Method.GET,\n \"clap://class/org/restlet/test/engine/dummy.jks\"));\n\n if (response.getEntity() != null) {\n OutputStream outputStream = new FileOutputStream(\n testKeystoreFile);\n response.getEntity().write(outputStream);\n outputStream.flush();\n outputStream.close();\n } else {\n throw new Exception(\n \"Unable to find the dummy.jks file in the classpath.\");\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }", "public SecKeyRing(File file) throws IOException, PGPException {\r\n\r\n\t\tload(file);\r\n\t}", "void loadOpenWeatherApiKey(String fileName) throws IllegalStateException {\n\t\tFileInputStream propertiesFile = null;\n\t\t\n\t\ttry {\n\t\t\tpropertiesFile = new FileInputStream(fileName);\n\t\t\tProperties properties = new Properties();\n\t\t\tproperties.load(propertiesFile);\n\t\t\topenWeatherApiKey = properties.getProperty(API_KEY_PROPERTY);\n\t\t\t\n\t\t\tif (openWeatherApiKey == null) {\n\t\t\t\tthrow new IllegalStateException(\"Could not find Open Weather API key of format \\\"API_KEY=<value>\\\" from \" + fileName);\n\t\t\t}\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new IllegalStateException(\"File with name \" + fileName + \" does not exist.\", e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalStateException(\"Could not read from \" + fileName, e);\n\t\t}\n\t\tfinally {\n\t\t\tif (propertiesFile != null) {\n\t\t\t\ttry {\n\t\t\t\t\tpropertiesFile.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tLOG.warn(\"Could not close input stream for file \" + fileName, e);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t}", "@Override\n\tpublic PrivateKey readPrivateKey(String file, String alias, String password) {\n\t\tKeyStore ks;\n\t\ttry {\n\t\t\tks = KeyStore.getInstance(\"JKS\", \"SUN\");\n\t\t\tBufferedInputStream in = new BufferedInputStream(new FileInputStream(file));\n\t\t\tks.load(in, password.toCharArray());\n\n\t\t\tif (ks.isKeyEntry(alias)) {\n\t\t\t\tPrivateKey pk = (PrivateKey) ks.getKey(alias, password.toCharArray());\n\t\t\t\treturn pk;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (KeyStoreException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (NoSuchProviderException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (CertificateException 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 (UnrecoverableKeyException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t}", "public KeyStore initializeUser(UserInfo userInfo, String keyPassword) throws CertException;", "protected void loadStore() throws IOException {\n // auto create starting directory if needed\n if (!fileStore.exists()) {\n LOG.debug(\"Creating filestore: {}\", fileStore);\n File parent = fileStore.getParentFile();\n if (parent != null && !parent.exists()) {\n boolean mkdirsResult = parent.mkdirs();\n if (!mkdirsResult) {\n LOG.warn(\"Cannot create the filestore directory at: {}\", parent);\n }\n }\n boolean created = FileUtil.createNewFile(fileStore);\n if (!created) {\n throw new IOException(\"Cannot create filestore: \" + fileStore);\n }\n }\n\n LOG.trace(\"Loading to 1st level cache from state filestore: {}\", fileStore);\n\n cache.clear();\n try (Scanner scanner = new Scanner(fileStore, null, STORE_DELIMITER)) {\n while (scanner.hasNext()) {\n String line = scanner.next();\n int separatorIndex = line.indexOf(KEY_VALUE_DELIMITER);\n String key = line.substring(0, separatorIndex);\n String value = line.substring(separatorIndex + KEY_VALUE_DELIMITER.length());\n cache.put(key, value);\n }\n } catch (IOException e) {\n throw RuntimeCamelException.wrapRuntimeCamelException(e);\n }\n\n LOG.debug(\"Loaded {} to the 1st level cache from state filestore: {}\", cache.size(), fileStore);\n }", "public SecretKey LoadAESKey(String keyFile) {\n\t\t\tObject[] keyb = null;\n\t\t\tbyte[] kb = null;\n\t\t\ttry {\n\t\t\t\t//keyb = Files.readAllBytes(Paths.get(keyFile));\n\t\t\t\tkeyb = this.ProcessAfterBytes(new File(keyFile), 16);\n\t\t\t\tkb = new byte[keyb.length];\n\t\t\t\tfor(int i=0; i<keyb.length;i+=1)\n\t\t\t\t\tkb[i]=(byte)keyb[i];\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\tSecretKeySpec skey = new SecretKeySpec(kb, \"AES\");\n\t\t\treturn skey;\n\t\t}", "@Override\n public void saveKeyStore(File file, KeyStore keyStore, String keystorePassword) {\n try (FileOutputStream fos = new FileOutputStream(file)) {\n keyStore.store(fos, keystorePassword.toCharArray());\n } catch (CertificateException | NoSuchAlgorithmException | IOException | KeyStoreException e) {\n throw new KeyStoreAccessException(\"Unable to save KeyStore to file: \" + file.getName(), e);\n }\n }", "public void secure (\n String keystoreFile, String keystorePassword,\n String truststoreFile, String truststorePassword) {\n\n if (keystoreFile == null)\n throw new IllegalArgumentException (\"Must provide a keystore to run secured\");\n\n this.keystoreFile = keystoreFile;\n this.keystorePassword = keystorePassword;\n this.truststoreFile = truststoreFile;\n this.truststorePassword = truststorePassword;\n }", "private SSLContext initSSLContext() {\n KeyStore ks = KeyStoreUtil.loadSystemKeyStore();\n if (ks == null) {\n _log.error(\"Key Store init error\");\n return null;\n }\n if (_log.shouldLog(Log.INFO)) {\n int count = KeyStoreUtil.countCerts(ks);\n _log.info(\"Loaded \" + count + \" default trusted certificates\");\n }\n\n File dir = new File(_context.getBaseDir(), CERT_DIR);\n int adds = KeyStoreUtil.addCerts(dir, ks);\n int totalAdds = adds;\n if (adds > 0 && _log.shouldLog(Log.INFO))\n _log.info(\"Loaded \" + adds + \" trusted certificates from \" + dir.getAbsolutePath());\n if (!_context.getBaseDir().getAbsolutePath().equals(_context.getConfigDir().getAbsolutePath())) {\n dir = new File(_context.getConfigDir(), CERT_DIR);\n adds = KeyStoreUtil.addCerts(dir, ks);\n totalAdds += adds;\n if (adds > 0 && _log.shouldLog(Log.INFO))\n _log.info(\"Loaded \" + adds + \" trusted certificates from \" + dir.getAbsolutePath());\n }\n dir = new File(System.getProperty(\"user.dir\"));\n if (!_context.getBaseDir().getAbsolutePath().equals(dir.getAbsolutePath())) {\n dir = new File(_context.getConfigDir(), CERT_DIR);\n adds = KeyStoreUtil.addCerts(dir, ks);\n totalAdds += adds;\n if (adds > 0 && _log.shouldLog(Log.INFO))\n _log.info(\"Loaded \" + adds + \" trusted certificates from \" + dir.getAbsolutePath());\n }\n if (_log.shouldLog(Log.INFO))\n _log.info(\"Loaded total of \" + totalAdds + \" new trusted certificates\");\n\n try {\n SSLContext sslc = SSLContext.getInstance(\"TLS\");\n TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());\n tmf.init(ks);\n X509TrustManager defaultTrustManager = (X509TrustManager)tmf.getTrustManagers()[0];\n _stm = new SavingTrustManager(defaultTrustManager);\n sslc.init(null, new TrustManager[] {_stm}, null);\n /****\n if (_log.shouldLog(Log.DEBUG)) {\n SSLEngine eng = sslc.createSSLEngine();\n SSLParameters params = sslc.getDefaultSSLParameters();\n String[] s = eng.getSupportedProtocols();\n Arrays.sort(s);\n _log.debug(\"Supported protocols: \" + s.length);\n for (int i = 0; i < s.length; i++) {\n _log.debug(s[i]);\n }\n s = eng.getEnabledProtocols();\n Arrays.sort(s);\n _log.debug(\"Enabled protocols: \" + s.length);\n for (int i = 0; i < s.length; i++) {\n _log.debug(s[i]);\n }\n s = params.getProtocols();\n if (s == null)\n s = new String[0];\n _log.debug(\"Default protocols: \" + s.length);\n Arrays.sort(s);\n for (int i = 0; i < s.length; i++) {\n _log.debug(s[i]);\n }\n s = eng.getSupportedCipherSuites();\n Arrays.sort(s);\n _log.debug(\"Supported ciphers: \" + s.length);\n for (int i = 0; i < s.length; i++) {\n _log.debug(s[i]);\n }\n s = eng.getEnabledCipherSuites();\n Arrays.sort(s);\n _log.debug(\"Enabled ciphers: \" + s.length);\n for (int i = 0; i < s.length; i++) {\n _log.debug(s[i]);\n }\n s = params.getCipherSuites();\n if (s == null)\n s = new String[0];\n _log.debug(\"Default ciphers: \" + s.length);\n Arrays.sort(s);\n for (int i = 0; i < s.length; i++) {\n _log.debug(s[i]);\n }\n }\n ****/\n return sslc;\n } catch (GeneralSecurityException gse) {\n _log.error(\"Key Store update error\", gse);\n } catch (ExceptionInInitializerError eiie) {\n // java 9 b134 see ../crypto/CryptoCheck for example\n // Catching this may be pointless, fetch still fails\n _log.error(\"SSL context error - Java 9 bug?\", eiie);\n }\n return null;\n }", "public void setKeyStore(KeyStore keyStore) {\n this.keyStore = keyStore;\n }", "private static void readPrivateKeyFromPKCS11() throws KeyStoreException {\n String configFileName = jarPath + \"pkcs11.cfg\";\r\n\r\n Provider p = null;\r\n try {\r\n p = new SunPKCS11(configFileName);\r\n Security.addProvider(p);\r\n } catch (ProviderException e) {\r\n LanzaError( \"no es correcto el fichero de configuración de la tarjeta\" );\r\n }\r\n \r\n KeyStore ks = null;\r\n try {\r\n ks = KeyStore.getInstance(\"pkcs11\", p);\r\n ks.load(null, clave );\r\n } catch (NoSuchAlgorithmException e) {\r\n LanzaError( \"leyendo la tarjeta (n.1)\" );\r\n } catch (CertificateException e) {\r\n LanzaError( \"leyendo la tarjeta (n.2)\" );\r\n } catch (IOException e) {\r\n LanzaError( \"leyendo la tarjeta (n.3)\" );\r\n }\r\n\r\n String alias = \"\";\r\n try {\r\n alias = (String) ks.aliases().nextElement();\r\n privateKey = (PrivateKey) ks.getKey(alias, clave);\r\n } catch (NoSuchElementException e) {\r\n LanzaError( \"leyendo la clave de la tarjeta (n.1)\" );\r\n } catch (NoSuchAlgorithmException e) {\r\n LanzaError( \"leyendo la clave de la tarjeta (n.2)\" );\r\n } catch (UnrecoverableKeyException e) {\r\n LanzaError( \"leyendo la clave de la tarjeta (n.3)\" );\r\n }\r\n certificateChain = ks.getCertificateChain(alias);\r\n }", "public void setUserCertificatesPath(String path);", "private Certificate loadcert(final String filename) throws FileNotFoundException, IOException, CertificateParsingException {\n final byte[] bytes = FileTools.getBytesFromPEM(FileTools.readFiletoBuffer(filename), \"-----BEGIN CERTIFICATE-----\",\n \"-----END CERTIFICATE-----\");\n return CertTools.getCertfromByteArray(bytes, Certificate.class);\n\n }", "void loadPropertiesFile()\n\t{\n\t\tlogger.info(\"Fetching the properties files\");\n\t\t\n\t\tconfigProp=new Properties(); \n\t\ttry{\tconfigProp.load(loadFile(\"Config.properties\"));\t\t} \n\t\tcatch (IOException e){\tAssert.assertTrue(\"Cannot initialise the Config properties file, Check if the file is corrupted\", false);\t}\t\t\t\n\t}", "public URL getKeystoreLocation() {\n return keystoreLocation;\n }", "@Override\n public void setKeyStore(KeyStore keyStore) {\n this.keyStore = keyStore;\n }", "public static void loadProperties(String filename) {\n\n if (filename.equals(\"\")) {\n return;\n }\n propfilename = userhome + FS + filename;\n File f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n } else {\n propfilename = userhome + FS + \"Properties\" + FS + filename;\n f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n }\n }\n\n try {\n try (FileInputStream i = new FileInputStream(propfilename)) {\n prop.load(i);\n //prtProperties();\n }\n } catch (FileNotFoundException e) {\n System.out.println(\" ** Properties file not found=\" + propfilename + \" userhome=\" + userhome + \" \" + System.getProperty(\"user.home\"));\n saveProperties();\n } catch (IOException e) {\n System.out.println(\"IOException reading properties file=\" + propfilename);\n System.exit(1);\n }\n }", "private void importTrustedCertificate() {\n\t\t// Let the user choose a file containing trusted certificate(s) to\n\t\t// import\n\t\tFile certFile = selectImportExportFile(\n\t\t\t\t\"Certificate file to import from\", // title\n\t\t\t\tnew String[] { \".pem\", \".crt\", \".cer\", \".der\", \"p7\", \".p7c\" }, // file extensions filters\n\t\t\t\t\"Certificate Files (*.pem, *.crt, , *.cer, *.der, *.p7, *.p7c)\", // filter descriptions\n\t\t\t\t\"Import\", // text for the file chooser's approve button\n\t\t\t\t\"trustedCertDir\"); // preference string for saving the last chosen directory\n\t\tif (certFile == null)\n\t\t\treturn;\n\n\t\t// Load the certificate(s) from the file\n\t\tArrayList<X509Certificate> trustCertsList = new ArrayList<>();\n\t\tCertificateFactory cf;\n\t\ttry {\n\t\t\tcf = CertificateFactory.getInstance(\"X.509\");\n\t\t} catch (Exception e) {\n\t\t\t// Nothing we can do! Things are badly misconfigured\n\t\t\tcf = null;\n\t\t}\n\n\t\tif (cf != null) {\n\t\t\ttry (FileInputStream fis = new FileInputStream(certFile)) {\n\t\t\t\tfor (Certificate cert : cf.generateCertificates(fis))\n\t\t\t\t\ttrustCertsList.add((X509Certificate) cert);\n\t\t\t} catch (Exception cex) {\n\t\t\t\t// Do nothing\n\t\t\t}\n\n\t\t\tif (trustCertsList.size() == 0) {\n\t\t\t\t// Could not load certificates as any of the above types\n\t\t\t\ttry (FileInputStream fis = new FileInputStream(certFile);\n\t\t\t\t\t\tPEMReader pr = new PEMReader(\n\t\t\t\t\t\t\t\tnew InputStreamReader(fis), null, cf\n\t\t\t\t\t\t\t\t\t\t.getProvider().getName())) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Try as openssl PEM format - which sligtly differs from\n\t\t\t\t\t * the one supported by JCE\n\t\t\t\t\t */\n\t\t\t\t\tObject cert;\n\t\t\t\t\twhile ((cert = pr.readObject()) != null)\n\t\t\t\t\t\tif (cert instanceof X509Certificate)\n\t\t\t\t\t\t\ttrustCertsList.add((X509Certificate) cert);\n\t\t\t\t} catch (Exception cex) {\n\t\t\t\t\t// do nothing\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (trustCertsList.size() == 0) {\n\t\t\t/* Failed to load certifcate(s) using any of the known encodings */\n\t\t\tshowMessageDialog(this,\n\t\t\t\t\t\"Failed to load certificate(s) using any of the known encodings -\\n\"\n\t\t\t\t\t\t\t+ \"file format not recognised.\", ERROR_TITLE,\n\t\t\t\t\tERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\n\t\t// Show the list of certificates contained in the file for the user to\n\t\t// select the ones to import\n\t\tNewTrustCertsDialog importTrustCertsDialog = new NewTrustCertsDialog(this,\n\t\t\t\t\"Credential Manager\", true, trustCertsList, dnParser);\n\n\t\timportTrustCertsDialog.setLocationRelativeTo(this);\n\t\timportTrustCertsDialog.setVisible(true);\n\t\tList<X509Certificate> selectedTrustCerts = importTrustCertsDialog\n\t\t\t\t.getTrustedCertificates(); // user-selected trusted certs to import\n\n\t\t// If user cancelled or did not select any cert to import\n\t\tif (selectedTrustCerts == null || selectedTrustCerts.isEmpty())\n\t\t\treturn;\n\n\t\ttry {\n\t\t\tfor (X509Certificate cert : selectedTrustCerts)\n\t\t\t\t// Import the selected trusted certificates\n\t\t\t\tcredManager.addTrustedCertificate(cert);\n\n\t\t\t// Display success message\n\t\t\tshowMessageDialog(this, \"Trusted certificate(s) import successful\",\n\t\t\t\t\tALERT_TITLE, INFORMATION_MESSAGE);\n\t\t} catch (CMException cme) {\n\t\t\tString exMessage = \"Failed to import trusted certificate(s) to the Truststore\";\n\t\t\tlogger.error(exMessage, cme);\n\t\t\tshowMessageDialog(this, exMessage, ERROR_TITLE, ERROR_MESSAGE);\n\t\t}\n\t}", "public MEKeyTool(InputStream meKeystoreStream)\n throws IOException {\n keystore = new PublicKeyStoreBuilderBase(meKeystoreStream);\n }", "public void setSslKeystore(String keystore) {\n\t\tsslKeystore = keystore;\n\t}", "public static void main(String args[]) throws Exception{\n\t KeyStore keyStore = KeyStore.getInstance(\"JCEKS\");\r\n\r\n //Cargar el objeto KeyStore \r\n char[] password = \"changeit\".toCharArray();\r\n java.io.FileInputStream fis = new FileInputStream(\r\n \t\t \"/usr/lib/jvm/java-11-openjdk-amd64/lib/security/cacerts\");\r\n \r\n keyStore.load(fis, password);\r\n \r\n //Crear el objeto KeyStore.ProtectionParameter \r\n ProtectionParameter protectionParam = new KeyStore.PasswordProtection(password);\r\n\r\n //Crear el objeto SecretKey \r\n SecretKey mySecretKey = new SecretKeySpec(\"myPassword\".getBytes(), \"DSA\");\r\n \r\n //Crear el objeto SecretKeyEntry \r\n SecretKeyEntry secretKeyEntry = new SecretKeyEntry(mySecretKey);\r\n keyStore.setEntry(\"AliasClaveSecreta\", secretKeyEntry, protectionParam);\r\n\r\n //Almacenar el objeto KeyStore \r\n java.io.FileOutputStream fos = null;\r\n fos = new java.io.FileOutputStream(\"newKeyStoreName\");\r\n keyStore.store(fos, password);\r\n \r\n //Crear el objeto KeyStore.SecretKeyEntry \r\n SecretKeyEntry secretKeyEnt = (SecretKeyEntry)keyStore.getEntry(\"AliasClaveSecreta\", protectionParam);\r\n\r\n //Crear el objeto SecretKey \r\n SecretKey mysecretKey = secretKeyEnt.getSecretKey(); \r\n System.out.println(\"Algoritmo usado para generar la clave: \"+mysecretKey.getAlgorithm()); \r\n System.out.println(\"Formato usado para la clave: \"+mysecretKey.getFormat());\r\n }", "public void loadProperties(){\n\n\ttry{\n\t prop.load(file);\n // get the property value and print it out\n host = prop.getProperty(\"host\");\n\t port = prop.getProperty(\"port\");\n\t sslmode = prop.getProperty(\"sslmode\");\n\t source = prop.getProperty(\"source\");\n dbname = prop.getProperty(\"dbname\");\n help_url_prefix = prop.getProperty(\"base.help.url\");\n password = prop.getProperty(\"password\");\n\t user = prop.getProperty(\"user\");\t \n\t temp_dir = new File(System.getProperty(\"java.io.tmpdir\")).toString();\n\t working_dir = new File(System.getProperty(\"user.dir\")).toString();\n\t file.close();\n\t}catch(IOException ioe){\n\t\t\n\t} \n\t \n }", "protected static String getKeyStorePath() {\n return keyStorePath;\n }", "@Bean(name = \"keyManager\")\n\tpublic KeyManager keyManager() {\n\t\tDefaultResourceLoader loader = new DefaultResourceLoader();\n\t\tResource storeFile = loader\n\t\t\t\t.getResource(\"classpath:samlKeystoreDev.jks\");\n\t\tString storePass = \"nalle123\";\n\t\tMap<String, String> passwords = new HashMap<String, String>();\n\t\tpasswords.put(\"localhost\", \"nalle123\");\n\t\tString defaultKey = \"localhost\";\n\t\treturn new JKSKeyManager(storeFile, storePass, passwords, defaultKey);\n\t}", "public MEKeyTool() {\n keystore = new PublicKeyStoreBuilderBase();\n }", "public void readPrivateKey(String filename) {\n FileHandler fh = new FileHandler();\n Map<String, BigInteger> skMap= fh.getKeyFromFile(filename);\n this.n = skMap.get(\"n\");\n this.d = skMap.get(\"key\");\n }", "public boolean loadDictionary(String fileName) throws IOException;", "private void loadData() {\n\n \tInputStream inputStream = this.getClass().getResourceAsStream(propertyFilePath);\n \n //Read configuration.properties file\n try {\n //prop.load(new FileInputStream(propertyFilePath));\n \tprop.load(inputStream);\n //prop.load(this.getClass().getClassLoader().getResourceAsStream(\"configuration.properties\"));\n } catch (IOException e) {\n System.out.println(\"Configuration properties file cannot be found\");\n }\n \n //Get properties from configuration.properties\n browser = prop.getProperty(\"browser\");\n testsiteurl = prop.getProperty(\"testsiteurl\");\n defaultUserName = prop.getProperty(\"defaultUserName\");\n defaultPassword = prop.getProperty(\"defaultPassword\");\n }", "private void init(String propFilePath) {\n properties = new Properties();\n try {\n properties.load(new FileInputStream(new File(propFilePath)));\n } catch (FileNotFoundException e1) {\n logger.error(\"External properties file not found!\", e1);\n System.exit(1);\n } catch (IOException e2) {\n logger.error(\"Error while reading External properties file!\", e2);\n System.exit(1);\n }\n }", "protected static void setKeyStorePassword(String keyStorePassword) {\n Program.keyStorePassword = keyStorePassword;\n }", "void load() {\n\t\ttry {\n\t\t\tfinal FileInputStream fis = new FileInputStream(propertyFile);\n\t\t\tfinal Properties newProperties = new Properties();\n\t\t\tnewProperties.load(fis);\n\t\t\ttimeLastRead = propertyFile.lastModified();\n\t\t\tproperties = newProperties;\n\t\t\tfis.close();\n\t\t} catch (final Exception e) {\n\t\t\tlogger.info(\"Property file \" + propertyFile + \" \" + e.getMessage());\n\t\t}\n\t}", "public void load()\n\t{\n\t\ttry {\n\t\t\tIFile file = project.getFile(PLAM_FILENAME);\n\t\t if (file.exists()) {\n\t\t\t\tInputStream stream= null;\n\t\t\t\ttry {\n\t\t\t\t\tstream = new BufferedInputStream(file.getContents(true));\n\t\t\t\t SAXReader reader = new SAXReader();\n\t\t\t\t Document document = reader.read(stream);\n\t\t\t\t \n\t\t\t\t Element root = document.getRootElement();\n\n\t\t\t\t String url = root.elementTextTrim(\"server-url\");\n\t\t\t\t setServerURL((url != null) ? new URL(url) : null);\n\t\t\t\t \n\t\t\t\t setUserName(root.elementTextTrim(\"username\"));\n\t\t\t\t setPassword(root.elementTextTrim(\"password\"));\n\t\t\t\t setProductlineId(root.elementTextTrim(\"pl-id\"));\n \n\t\t\t\t} catch (CoreException e) {\n\t\t\t\t\t\n\t\t\t\t} finally {\n\t\t\t\t if (stream != null)\n\t\t\t\t stream.close();\n\t\t\t\t}\n\t\t }\n\t\t} catch (DocumentException e) {\n\t\t\tlogger.info(\"Error while parsing PLAM config.\", e);\n\t\t} catch (IOException e) {\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n private void loadProperties()\n {\n File f = getPropertiesFile();\n if (!f.exists())\n return;\n \n m_props = (Map<String, Object>) PSConfigUtils.loadObjectFromFile(f);\n }", "private void loadPropertiesFile(String propertiesFile) {\n\n\t\t//open the properties file.\n\t\t_props = new Properties();\n\n\t\t//sanity check the properties file\n\t\tFile f = new File(propertiesFile);\n\t\tif (!f.canRead()) {\n\t\t\t//print an error - can't read the props file.\n\t\t\tSystem.err.println(\"Properties file \" + propertiesFile + \" cannot be read.\");\n\t\t}\n\n\t\ttry {\n\t\t\t_props.load(new FileInputStream(f));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public MyKeyManager(Parameters p) throws Exception {\n\t\tparms = p;\n\t\tKeyManager[] keymanager = null; \n\t\tint printKeyManager = parms.getPrintKeyStore(); // if the key store should be printed\n\t\tString keyStoreName = parms.getKeystoreName();\n\t\tString keyStorePassword = parms.getKeyStorePassword();\n\t\tString keyStoreType = parms.getKeystoreType();\n\t\t\n\t\tSystem.out.println(\"==KeyManager KeyStore name:\" +keyStoreName + \", type:\" + keyStoreType );\n\t\t// AlgorithmConstraints a = new AlgorithmConstraints();\n\t\ttry {\n\t\t\t// standard stuff \n\t\t\tkeyStore = KeyStore.getInstance(keyStoreType );\n\t\t\tkeyStore.load(new FileInputStream(keyStoreName), keyStorePassword.toCharArray());\n\t\t\t\n\t\t\tSystem.out.println(\"==KeyManager provider:\" + keyStore.getProvider().toString());\n\t\t\t// list all of the names in the keystore \n\t\t\tif (printKeyManager > 0 )\n\t\t\t\tprintKeyStore(printKeyManager);\n\t\t//\tsummariseKeyStore();\n\t\t\t// set it up - standard stuff\n\t\t\tKeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());\n\n\t\t\t// read the file into the key manager factory\n\t\t\tkeyManagerFactory.init(keyStore, keyStorePassword.toCharArray());\n\t\t\tkeymanager = keyManagerFactory.getKeyManagers();\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"NoSuchAlgorithmException EXCEPTION:\" + e);\n\t\t\t// e.printStackTrace();\n\t\t\tthrow e;\n\t\t} catch (UnrecoverableKeyException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"UnrecoverableKeyException EXCEPTION:\" + e);\n\t\t\t// e.printStackTrace();\n\t\t\tthrow e;\n\t\t} catch (KeyStoreException | CertificateException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t\tmyKeyManager = (X509KeyManager) keymanager[0];\n\t}", "public void loadObjectData(String datafile) {\n\t\tProperties databaseAddData = new Properties();\n\t\ttry {\n\t\t\tdatabaseAddData.load(new FileInputStream(langFile));\n\t\t} catch (Exception e) {}\n\t\t//put values from the properties file into hashmap\n\t\tthis.properties.put(\"PROPERTY\", databaseAddData.getProperty(\"PROPERTY\"));\n\t}", "public void load() {\n Boolean value = permanentStore.getBoolean(key);\n if (value != null) {\n set(value.booleanValue());\n log.info(\"Property \" + key + \" has the non-default value \" + value.booleanValue());\n } else {\n set(defaultValue);\n }\n }", "public void load(Storable storable)/* throws LogFile.LockException */{\n if (dataFile != null) {\n // If the file has been set, synchronize on it.\n synchronized (dataFile) {\n storable.load(properties);\n }\n }\n else {\n storable.load(properties);\n }\n }", "public void init()\n {\n try\n {\n userPasswordsProperties = new Properties();\n userPasswordsProperties.load(new FileInputStream(userPasswordsPropertiesFileName));\n log.info(\"Successfully initialized. UsersPasswords property file is: \" + userPasswordsPropertiesFileName);\n }\n catch (Exception e)\n {\n throw new IllegalArgumentException(\"UserNamesPropertyFile name: \" + userPasswordsPropertiesFileName + \" not valid. Error: \" + e);\n }\n \n }", "public static void load() {\n }", "private static void init()\n {\n try\n {\n ObjectInputStream ois = \n new ObjectInputStream(new FileInputStream(lexFile));\n lexDB = (HashMap)ois.readObject();\n ois.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"File not found: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } catch (IOException e) {\n System.err.println(\"IO Exception: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } catch (ClassNotFoundException e) {\n System.err.println(\"Class Not Found Exception: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } // catch\n }", "public KeyPair loadKeystoreKeyPair(String privateKeyAlias) throws ProviderException {\n try {\n return HwUniversalKeyStoreProvider.loadAndroidKeyStoreKeyPairFromKeystore(this.mKeyStore, privateKeyAlias, this.mEntryUid);\n } catch (UnrecoverableKeyException e) {\n throw new ProviderException(\"Failed to load generated key pair from keystore\", e);\n }\n }", "private void Load( String szFileName )\n throws FileNotFoundException, NullPointerException, AppException\n {\n FileInputStream fs = null;\n File f = null;\n long nFileSize;\n \n f = new File( szFileName );\n if( !f.exists() || !f.canRead() )\n throw new FileNotFoundException( \"File \" + f.getPath() );\n\n try\n {\n nFileSize = f.length();\n fs = new FileInputStream( f );\n\n CharsetDecoder utf8Decoder = Charset.forName( \"UTF-8\" ).newDecoder();\n byte[] Data = null;\n\n // Read user name length and user name in UTF8\n if( nFileSize < 2 )\n throw new AppException( \"Bad file \" + f.getPath() );\n int nLength = (fs.read() << 8) | fs.read();\n nFileSize -= 2;\n if( nFileSize < nLength )\n throw new AppException( \"Bad file \" + f.getPath() );\n nFileSize -= nLength;\n Data = new byte[nLength];\n fs.read( Data );\n m_UserName = utf8Decoder.decode( ByteBuffer.wrap( Data ) ).toString();\n\n // Read user unique ID\n if( nFileSize < 16 )\n throw new AppException( \"Bad file \" + f.getPath() );\n nFileSize -= 16;\n m_Key = new byte[16];\n fs.read( m_Key );\n\n // Read template length and template data\n if( nFileSize < 2 )\n throw new AppException( \"Bad file \" + f.getPath() );\n nLength = (fs.read() << 8) | fs.read();\n nFileSize -= 2;\n if( nFileSize != nLength )\n throw new AppException( \"Bad file \" + f.getPath() );\n m_Template = new byte[nLength];\n fs.read( m_Template );\n fs.close();\n }\n catch( SecurityException e )\n {\n if( f == null )\n throw new AppException( \"Denies read access to the file \" + f.getPath() );\n else {\n throw new AppException( \"Denies read access to the file \" + szFileName );\n }\n }\n catch( IOException e)\n {\n if( f == null )\n throw new AppException( \"Bad file \" + f.getPath() );\n else\n throw new AppException( \"Bad file \" + szFileName );\n }\n }", "private void loadProperties(){\n try {\n input = new FileInputStream(fileName);\n properties.load(input);\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO LOAD GAME ---\");\n e.printStackTrace();\n } finally {\n if (input != null) {\n try {\n input.close();\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO CLOSE INTPUT ---\");\n e.printStackTrace();\n }\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void loadMap(){\r\n\t\t//Datei anlegen, falls nicht vorhanden\r\n\t\ttry {\r\n\t\t\tFile file = new File(homeFileLocation);\r\n\t\t\tif(!file.exists()){\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t\tSystem.out.println(\"Created new File.\");\r\n\r\n\t\t\t\t//Leere Map schreiben\r\n\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(homeFileLocation));\r\n\t\t\t\toos.writeObject(new HashMap<String, String>());\r\n\t\t\t\toos.flush();\r\n\t\t\t\toos.close();\r\n\r\n\t\t\t\tSystem.out.println(\"Wrote empty HashMap.\");\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Map laden\r\n\t\ttry {\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(homeFileLocation));\r\n\t\t\tthis.map = (HashMap<String, String>) ois.readObject();\r\n\t\t\tois.close();\r\n\t\t} catch (ClassNotFoundException 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}", "public static PrivateKey load3tierTestRootCAPrivateKey() {\n return loadPrivateKeyFromResourcePath(\"classpath:attestation/3tier/private/3tier-test-root-CA.der\");\n }", "public void restoreFromFile(String fileName) throws KVException {\n this.resetStore();\n \n File f = new File(fileName);\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder;\n\t\ttry {\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t} catch (ParserConfigurationException e1) {\n\t\t\tKVMessage exceptionMessage = new KVMessage(\"resp\", \"Unknown Error: Parser Configuration Exception\");\n\t\t\tKVException exception = new KVException(exceptionMessage);\n\t\t\tthrow exception;\n\t\t}\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = docBuilder.parse(f);\n\t\t} catch (SAXException e1) {\n\t\t\tKVMessage exceptionMessage = new KVMessage(\"resp\", \"Unknown Error: SAX Exception\");\n\t\t\tKVException exception = new KVException(exceptionMessage);\n\t\t\tthrow exception;\n\t\t} catch (IOException e1) {\n\t\t\tKVMessage exceptionMessage = new KVMessage(\"resp\", \"IO Error\");\n\t\t\tKVException exception = new KVException(exceptionMessage);\n\t\t\tthrow exception;\n\t\t}\n\t\tdoc.getDocumentElement().normalize();\n\t\t\n\t\tNodeList nList = doc.getElementsByTagName(\"KVPair\");\n\t\t\n\t\tfor (int i = 0; i < nList.getLength(); i++) {\n\t\t\tNode curNode = nList.item(i);\n\t\t\t\n\t\t\tif (curNode.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tElement e = (Element) curNode;\n\t\t\t\tString key = e.getElementsByTagName(\"Key\").item(0).getTextContent();\n\t\t\t\tString val = e.getElementsByTagName(\"Value\").item(0).getTextContent();\n\t\t\t\tstore.put(key, val);\n\t\t\t}\n\t\t}\n }", "public static void loadProperties() {\n properties = new Properties();\n try {\n File f = new File(\"system.properties\");\n if (!(f.exists())) {\n OutputStream out = new FileOutputStream(f);\n }\n InputStream is = new FileInputStream(f);\n properties.load(is);\n lastDir = getLastDir();\n if (lastDir == null) {\n lastDir = \"~\";\n setLastDir(lastDir);\n }\n properties.setProperty(\"lastdir\", lastDir);\n\n // Try loading properties from the file (if found)\n properties.load(is);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void loadPropertiesFile() {\n checkNotNull(propertyFileName, \"propertyFileName cannot be null\");\n String currentDir = new File(\"\").getAbsolutePath();\n propertyFile = currentDir + \"/\" + propertyFileName;\n File propFile = new File(propertyFile);\n try {\n propFile.createNewFile();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n\n props = new Properties();\n try {\n FileInputStream fis = new FileInputStream(propertyFile);\n props.load(fis);\n fis.close();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n }", "private Properties loadProperties(String propertyFile) {\n\t\toAuthProperties = new Properties();\n\t\ttry {\n\t\t\toAuthProperties.load(App.class.getResourceAsStream(propertyFile));\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Unable to read \" + propertyFile\n\t\t\t\t\t+ \" configuration. Make sure you have a properly formatted \" + propertyFile + \" file.\");\n\t\t\treturn null;\n\t\t}\n\t\treturn oAuthProperties;\n\t}", "public void newKeystore(String alias,String password, String bodyCert) {\n try {\n CertAndKeyGen keyGen = new CertAndKeyGen(\"RSA\", ALGORITHM, null);\n try {\n keyGen.generate(KEY_LEN);\n PrivateKey pk = keyGen.getPrivateKey();\n X509Certificate cert;\n cert = keyGen.getSelfCertificate(new X500Name(bodyCert), (long) EXPIRATION * 24 * 60 * 60);\n X509Certificate[] chain = new X509Certificate[1];\n chain[0]= cert;\n //creo el request PKCS10\n PKCS10 certreq = new PKCS10 (keyGen.getPublicKey());\n Signature signature = Signature.getInstance(ALGORITHM);\n signature.initSign(pk);\n certreq.encodeAndSign(new X500Name(bodyCert), signature);\n //-creo el archivo CSR-\n //FileOutputStream filereq = new FileOutputStream(\"C:\\\\test\\\\certreq.csr\");\n FileOutputStream filereq = new FileOutputStream(OUTPUTCERT_PATH);\n PrintStream ps = new PrintStream(filereq);\n certreq.print(ps);\n ps.close();\n filereq.close();\n \n this.ks = KeyStore.getInstance(INSTANCE);\n this.ksPass = password.toCharArray();\n try (FileOutputStream newkeystore = new FileOutputStream(archivo)) {\n ks.load(null,null);\n ks.setKeyEntry(alias, pk, ksPass, chain);\n ks.store(newkeystore, ksPass);\n }\n } catch (InvalidKeyException | IOException | CertificateException | SignatureException | KeyStoreException ex) {\n LOG.error(\"Error a manipular el archivo: \"+archivo,ex);\n }\n \n } \n catch (NoSuchAlgorithmException | NoSuchProviderException ex) {\n LOG.error(ex);\n }\n }", "private FileInputStream loadFile(String file)\n\t{\n\t\tlogger.info(\"Fetching File : \"+System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\resources\\\\\"+file);\n\t\ttry \n\t\t{\n\t\t\treturn(new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\resources\\\\\"+file));\n\t\t} catch (FileNotFoundException e) {\t\t\t\t\n\t\t\tAssert.assertTrue(file+\" file is missing\", false);\n\t\t\treturn null;\n\t\t}\n\t}", "private void storeProperties() {\n Path path = getSamplePropertiesPath();\n LOG.info(\"Storing Properties to {}\", path.toString());\n try {\n final FileOutputStream fos = new FileOutputStream(path.toFile());\n final Properties properties = new Properties();\n String privateKey = this.credentials.getEcKeyPair().getPrivateKey().toString(16);\n properties.setProperty(PRIVATE_KEY, privateKey);\n properties.setProperty(CONTRACT1_ADDRESS, this.contract1Address);\n properties.setProperty(CONTRACT2_ADDRESS, this.contract2Address);\n properties.setProperty(CONTRACT3_ADDRESS, this.contract3Address);\n properties.setProperty(CONTRACT4_ADDRESS, this.contract4Address);\n properties.setProperty(CONTRACT5_ADDRESS, this.contract5Address);\n properties.setProperty(CONTRACT6_ADDRESS, this.contract6Address);\n properties.store(fos, \"Sample code properties file\");\n\n } catch (IOException ioEx) {\n // By the time we have reached the loadProperties method, we should be sure the file\n // exists. As such, just throw an exception to stop.\n throw new RuntimeException(ioEx);\n }\n }", "protected SftpPropertyLoad(final String bundleFileName) {\n\n\t\tthis.bundleFileName = bundleFileName;\n\n\t\tfinal Resource res = new ClassPathResource(StringUtil.replace(bundleFileName, \".\", \"/\") + \".properties\");\n\t\tfinal EncodedResource encodedResource = new EncodedResource(res, \"UTF-8\");\n\n\t\ttry {\n\t\t\tprops = PropertiesLoaderUtils.loadProperties(encodedResource);\n\t\t} catch (IOException e) {\n\t\t\tthrow new WebRuntimeException(e);\n\t\t}\n\t}", "protected void loadKeys()\r\n {\r\n log.debug(\"{0}: Loading keys for {1}\", () -> logCacheName, () -> keyFile.toString());\r\n\r\n storageLock.writeLock().lock();\r\n\r\n try\r\n {\r\n // clear a key map to use.\r\n keyHash.clear();\r\n\r\n final HashMap<K, IndexedDiskElementDescriptor> keys = keyFile.readObject(\r\n new IndexedDiskElementDescriptor(0, (int) keyFile.length() - IndexedDisk.HEADER_SIZE_BYTES));\r\n\r\n if (keys != null)\r\n {\r\n log.debug(\"{0}: Found {1} in keys file.\", logCacheName, keys.size());\r\n\r\n keyHash.putAll(keys);\r\n\r\n log.info(\"{0}: Loaded keys from [{1}], key count: {2}; up to {3} will be available.\",\r\n () -> logCacheName, () -> fileName, keyHash::size, () -> maxKeySize);\r\n }\r\n\r\n if (log.isTraceEnabled())\r\n {\r\n dump(false);\r\n }\r\n }\r\n catch (final Exception e)\r\n {\r\n log.error(\"{0}: Problem loading keys for file {1}\", logCacheName, fileName, e);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n }" ]
[ "0.7171067", "0.70470214", "0.6850139", "0.6686363", "0.6677564", "0.6575663", "0.649491", "0.64475167", "0.642696", "0.6390061", "0.6383167", "0.6374125", "0.61789805", "0.6083503", "0.60381305", "0.5959781", "0.5926625", "0.5890648", "0.5866977", "0.5854282", "0.58270794", "0.5714482", "0.5704136", "0.5578667", "0.5560157", "0.5541407", "0.5537105", "0.55283934", "0.5519481", "0.5494947", "0.549101", "0.5481257", "0.5465481", "0.54380363", "0.542635", "0.5408346", "0.540435", "0.54016", "0.5390443", "0.5387163", "0.5382362", "0.5360523", "0.53420144", "0.53382057", "0.53323823", "0.53236234", "0.5318229", "0.5294446", "0.52929205", "0.52712905", "0.52547586", "0.52456975", "0.5229218", "0.52291834", "0.5217913", "0.5210899", "0.519511", "0.5194392", "0.5190671", "0.5184654", "0.51474845", "0.51434135", "0.51169735", "0.5099346", "0.5091113", "0.5074339", "0.5066468", "0.50504947", "0.50496435", "0.5041168", "0.5028968", "0.50232756", "0.5014634", "0.501201", "0.49857765", "0.49834004", "0.49736664", "0.49733472", "0.49637228", "0.4944034", "0.49325493", "0.4932286", "0.49288127", "0.4925459", "0.49252948", "0.49220088", "0.49202988", "0.49075434", "0.4906981", "0.49069318", "0.49034446", "0.48992577", "0.489925", "0.4895518", "0.48948488", "0.48932135", "0.4879255", "0.4876395", "0.48723465", "0.4869396" ]
0.54351753
34
generate custom SQL querry SELECT ENO,ENAME,EADD,SALFROM EMPLOYE WHERE ENAME="?" AND EADD="?"
public List<Employe> findByEnameAndEadd(String name,String add);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String constructSQL() {\n\t\tString sql = \"\";\n\t\tif (!minAgeSet) {\n\t\t\tsql = \"SELECT E.EMP_ID, E.EMP_FULLNAME\" + \" FROM \" + empTable\n\t\t\t+ \" E\";\n\t\t} else {\n\t\t\tsql = \"SELECT E.EMP_ID, E.EMP_FULLNAME\" + \" FROM \" + empTable\n\t\t\t+ \" E WHERE E.EMP_BIRTH_DATE <= ? \";\n\t\t}\n\n\t\toriSqlLength = sql.length();\n\n\t\tStringTokenizer empTok = new StringTokenizer(employee, \",\");\n\t\tStringTokenizer calcTok = new StringTokenizer(calcGroup, \",\");\n\t\tStringTokenizer payTok = new StringTokenizer(payGroup, \",\");\n\t\tStringTokenizer teamTok = new StringTokenizer(team, \",\");\n\n\t\t// check if any of the selects have been used.\n\n\t\tif (empTok.hasMoreTokens() && !empTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"employee\", sql);\n\t\tif (calcTok.hasMoreTokens()\n\t\t\t\t&& !calcTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"calcGroup\", sql);\n\t\tif (payTok.hasMoreTokens() && !payTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"payGroup\", sql);\n\t\tif (teamTok.hasMoreTokens()\n\t\t\t\t&& !teamTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"team\", sql);\n\t\t\n\t\treturn sql;\n\t}", "protected String generateSQL() {\n String fields = generateFieldsJSON();\n return String.format(QUERY_PATTERN, fields, esQuery.generateQuerySQL(), from, size);\n }", "public static void main(String[] args) throws SQLException {\n\t\tConnection conn= DriverManager.getConnection(\"jdbc:oracle:thin:@coestudb.qu.edu.qa:1521/STUD.qu.edu.qa\",\"scott\",\"tiger123\");\n\t\tPreparedStatement stmt = conn.prepareStatement(\"select empno,ename,sal,hiredate from emp where sal>? and job=?\");\n\t\tstmt.setDouble(1, 2000);\n\t\tstmt.setString(2, \"MANAGER\");\n\t\tResultSet rs = stmt.executeQuery();\n\t\twhile (rs.next()){\n\t\t\tint num = rs.getInt(1);\n\t\t\tString name = rs.getString(2);\n\t\t\tdouble sal = rs.getDouble(3);\n\t\t\tDate hire = rs.getDate(4);\n\t\t\tSystem.out.println(num+\" \"+name+\" \"+sal+\" \"+hire);\n\t\t}\n\t\trs.close();\n\t\tconn.close();\n\t}", "protected StringBuilder generateQuery() {\n StringBuilder sb = new StringBuilder();\n sb.append(\" FROM \") \n .append(dao.getParameterClass(0).getName())\n .append(\" d WHERE (:incorrectEvent = '' OR d.incorrectEvent.id = :incorrectEvent) \")\n .append(\"AND (d.createDate BETWEEN :dateFrom AND :dateTo ) \")\n .append(\"AND ( ((:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName) \")\n .append(\" OR (:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName)) \")\n .append(\" OR (:search='' OR d.searchField LIKE :search) ) \");\n return sb;\n }", "public static void main(String[] args) {\n\ntry {\n\t\t\t\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tConnection c= DriverManager.getConnection(\"jdbc:oracle:thin:@artemis.vsnet.gmu.edu:1521/vse18c.vsnet.gmu.edu\",\"spallemp\",\"vortetoa\");\n\t\t\tStatement st = c.createStatement();\n\t\t\tResultSet re = st.executeQuery(\"select e.lname, e.ssn, w.hours from employee e, project p, works_on w where e.ssn=w.essn and w.pno=p.pnumber and e.dno=p.dnum and plocation='Houston' and pname='ProductZ'\");\n\t\t\n\t\t\t\t\twhile (re.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(re.getString(1) + \",\" + re.getString(2)+ \",\" + re.getString(3));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Closing the connection\n\t\t\t\t\tc.close();\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t}\n\t\t\n\t\t\t}", "protected String getSQLWhere()\n \t{\n \t\tStringBuffer sql = new StringBuffer();\n \t\tif (fDocumentNo.getText().length() > 0)\n \t\t\tsql.append(\" AND UPPER(p.DocumentNo) LIKE ?\");\n if (fRoutingNo.getText().length() > 0)\n sql.append(\" AND UPPER(p.RoutingNo) LIKE ?\"); // Marcos Zúñiga\n if (fCheckNo.getText().length() > 0)\n sql.append(\" AND UPPER(p.CheckNo) LIKE ?\"); // Marcos Zúñiga\n if (fA_Name.getText().length() > 0)\n sql.append(\" AND UPPER(p.A_Name) LIKE ?\"); // Marcos Zúñiga\n \t\tif (fDateFrom.getValue() != null || fDateTo.getValue() != null)\n \t\t{\n \t\t\tTimestamp from = (Timestamp)fDateFrom.getValue();\n \t\t\tTimestamp to = (Timestamp)fDateTo.getValue();\n \t\t\tif (from == null && to != null)\n \t\t\t\tsql.append(\" AND TRUNC(p.DateTrx) <= ?\");\n \t\t\telse if (from != null && to == null)\n \t\t\t\tsql.append(\" AND TRUNC(p.DateTrx) >= ?\");\n \t\t\telse if (from != null && to != null)\n \t\t\t\tsql.append(\" AND TRUNC(p.DateTrx) BETWEEN ? AND ?\");\n \t\t}\n \t\t//\n \t\tif (fAmtFrom.getValue() != null || fAmtTo.getValue() != null)\n \t\t{\n \t\t\tBigDecimal from = (BigDecimal)fAmtFrom.getValue();\n \t\t\tBigDecimal to = (BigDecimal)fAmtTo.getValue();\n \t\t\tif (from == null && to != null)\n \t\t\t\tsql.append(\" AND p.PayAmt <= ?\");\n \t\t\telse if (from != null && to == null)\n \t\t\t\tsql.append(\" AND p.PayAmt >= ?\");\n \t\t\telse if (from != null && to != null)\n \t\t\t\tsql.append(\" AND p.PayAmt BETWEEN ? AND ?\");\n \t\t}\n \t\tsql.append(\" AND p.IsReceipt=?\");\n \n \t\t// sql.append(\" AND p.IsReconciled='N'\");\n \n \t\tlog.fine(sql.toString());\n \t\treturn sql.toString();\n \t}", "public String getWhereString()\n {\n String outString = \n \"WHERE lid = '\" + lid + \"'\" \n + \" AND agency_code = '\" + agency_code + \"'\" \n + \" AND office = '\" + office + \"'\" \n ;\n return outString;\n }", "public void makeSql() {\n\t\tfor(int i=0; i<arr_sql.length; i++) {\n\t\t\tarr_sql[i] = new StringBuffer();\n\t\t}\n\t\t\n\t\t/*\n\t\t * 공통코드 쿼리\n\t\t * 대리점구분 : CU006\n\t\t * 직판구분 : CU012\n\t\t * 지역 : SY006\n\t\t * 계약상태 : CU013\n\t\t * 사용유무 : SY011\n\t\t * 보증보험회사 : CU010\n\t\t * 하위대리점여부 : CU011\n\t\t */\n\t\tarr_sql[0].append (\"SELECT\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append (\"\t' ' head, ' ' detail, '전체' detail_nm \\n\")\n\t\t\t\t .append (\"FROM DUAL \\n\")\n\t\t\t\t .append (\"UNION ALL \\n\")\n\t\t\t\t .append (\"SELECT \\n\")\n\t\t\t\t .append (\"\tB.head, B.detail, B.detail_nm \\n\")\n\t\t\t\t .append (\"FROM \\n\")\n\t\t\t\t .append (\"\tSALES.TSY011 A, \\n\")\n\t\t\t\t .append (\"\tSALES.TSY010 B \\n\")\n\t\t\t\t .append (\"WHERE 1=1 \\n\")\n\t\t\t\t .append (\" AND A.head = B.head \\n\")\n\t\t\t\t .append (\" AND B.head = ? \\n\")\n\t\t\t\t .append (\" AND LENGTH (rtrim(B.detail)) > 0 \\n\");\n\t\t\n\t\t/*\n\t\t * 대리점 조회\n\t\t */\n\t\tarr_sql[1].append(\"SELECT T1.client_sid\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t \t\t .append(\"\t\t ,T1.vend_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t \t\t .append(\"\t\t ,T1.client_gu \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처구분 :CU005 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.agen_gu \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t \t\t .append(\"\t\t ,T1.dir_yn \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t \t\t .append(\"\t\t ,T1.area_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\t \t\t .append(\"\t\t ,T1.sal_dam_sid \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t \t\t .append(\"\t\t ,T1.client_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t \t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대전화 \t*/\n\t \t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\t \t\t .append(\"\t\t ,T1.e_mail \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t \t\t .append(\"\t\t ,T1.zip_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 우편번호[TSY110] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.address1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소1 \t*/\n\t \t\t .append(\"\t\t ,T1.address2 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소2 \t*/\n\t \t\t .append(\"\t\t ,T1.commi_rate \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t \t\t .append(\"\t\t ,T1.cunt_status \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t \t\t .append(\"\t\t ,T1.bancod \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행코드 [BANKCODE] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.bank_acc_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행계좌번호 \t*/\n\t \t\t .append(\"\t\t ,T1.bank_acct_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 예금주 \t*/\n\t \t\t .append(\"\t\t ,T1.use_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 사용여부 :SY011 \t*/ \n\t \t\t .append(\"\t\t ,T1.client_url\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 홈페이지 URL\t\t\t\t*/\n\t \t\t .append(\"\t\t ,T2.sal_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자명 \t*/\n\t \t\t .append(\"\t\t ,T3.vend_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 거래처명 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T4.bannam \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행명 \t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU006',T1.agen_gu) AS agen_gu_name \t\t\t\t\t\\n\")\t/* 대리점구분명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU012',T1.dir_yn) AS dir_yn_name \t\t\t\t\t\\n\")\t/* 직판여부명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006',T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\")\t/* 지역명 \t\t\t\t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU013',T1.cunt_status) AS cunt_status_name \t\t\t\\n\")\t/* 계약상태명 \t\t\t\t*/\n\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY011',T1.use_yn) AS use_yn_name \t\t\t\\n\")\t/* 사용여부명 \t\t\t \t*/\n\n\t \t\t .append(\"FROM SALES.TCU030 T1 LEFT OUTER JOIN SALES.TSY410 T2 ON T1.SAL_DAM_SID = T2.SAL_DAM_SID \\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.GCZM_VENDER T3 ON T1.VEND_CD = T3.VEND_CD \t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.BANKCODE T4 ON T1.BANCOD = T4.BANCOD \t\t\t\t\t\\n\")\n\t \t\t .append(\"WHERE 1 = 1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t AND T1.client_GU = '1' \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t/*\n\t\t * 계약정보 조회\n\t\t */\n\t\tarr_sql[2].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,T1.cont_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,T1.expire_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,TO_NUMBER(T1.insur_amt) AS insur_amt\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,T1.insur_comp_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ('CU010',T1.insur_comp_cd) AS insur_comp_cd_name\t\t\\n\") \t/* 보증보험회사명 \t\t*/ \n\t\t\t\t .append(\"FROM SALES.TCU031 T1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"WHERE 1=1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t \n\t\n\t\t/*\n\t\t * 지점정보 조회\n\t\t */\n\t\tarr_sql[3].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.area_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.client_down_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t .append(\"\t\t ,T1.empno \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_url \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006', T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\") \t/* 지역명:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU011',T1.client_down_yn) AS client_down_yn_name \t\\n\")\t/* 하위대리점여부명 \t\t*/\n\t\t\t\t .append(\"FROM SALES.TCU032 T1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t\n\t\t\n\t\t/*\n\t\t * 대리점 등록\n\t\t */\n\n\t\tarr_sql[4].append(\"INSERT INTO SALES.TCU030 (\")\n\t\t\t\t .append(\"\t\t\t\t client_sid \\n\")\t\n\t\t\t\t .append(\"\t\t\t\t,vend_cd \\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_cd \\n\")\t/* 매출처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_nm \\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_gu \\n\")\t/* 매출처구분 :CU005 \t*/\n\t\t\t\t .append(\"\t\t\t\t,agen_gu \\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,dir_yn \\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t\t\t,area_cd \\n\")\t/* 지역코드 :SY006 \t*/\n\t\t\t\t .append(\"\t\t\t\t,sal_dam_sid \\n\")\t/* 영업담당자코드[TSY410] \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_dam_nm \\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t\t\t,tel_no \\n\")\t/* 전화번호 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,mobile_no \\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t\t\t,fax_no \\n\")\t/* FAX번호 \t*/\n\t\t\t\t .append(\"\t\t\t\t,e_mail \\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t\t\t,zip_cd \\n\")\t/* 소재지우편번호[TSY110] */\n\t\t\t\t .append(\"\t\t\t\t,address1 \\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,address2 \\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t\t\t,commi_rate \t\\n\") \t/* 수수료율 \t*/\n\t\t\t\t .append(\"\t\t\t\t,cunt_status \\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t\t\t,bancod\t\t\t\\n\") \t/* 은행코드 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,bank_acc_no \\n\")\t/* 은행계좌번호[BANKCODE] \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,bank_acct_nm\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,use_yn\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t .append(\"\t\t \t\t,u_date \t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t \t\t,u_empno \t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t \t\t,u_ip \\n\")\t/* 최종수정IP */\t\t\t\n\t \t\t .append(\"\t\t\t\t,client_url\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append(\"\t\t\t)\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSALES.SWS_TCU030_ID.NEXTVAL,?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,SYSTIMESTAMP,?,?,?\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\n\t\t\n\t\t/*\n\t\t * 계약정보 등록\n\t\t */\n\t\tarr_sql[5].append(\"INSERT INTO SALES.TCU031 ( \t\\n\")\n\t\t\t\t .append(\" \t client_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,cont_date\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 등록\n\t\t */\n\t\t\n\t\tarr_sql[6].append(\"INSERT INTO SALES.TCU032 ( \t\\n\")\n\t\t\t\t .append(\"\t\t client_SID\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,branch_cd\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_nm \t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append(\"\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\t/*\n\t\t * 대리점 수정\n\t\t */\n\n\t\tarr_sql[7].append(\"UPDATE SALES.TCU030 SET \t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t vend_cd\t\t= ? \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t,client_nm\t\t= ? \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t,agen_gu\t\t= ? \t\t\t\t \t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t .append(\"\t\t,dir_yn\t\t\t= ? \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t,area_cd \t= ? \t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\n\t\t\t\t .append(\"\t\t,sal_dam_sid\t= ? \t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t\t\t\t .append(\"\t\t,client_dam_nm\t= ? \t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t,tel_no = ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t\t\t\t .append(\"\t\t,mobile_no = ?\t\t\t\t\t\t\\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t,fax_no = ?\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\n\t\t\t\t .append(\"\t\t,e_mail = ?\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t,zip_cd = ?\t\t\t\t\t\t\\n\")\t/* 소재지우편번호[TSY110] \t*/\n\t\t\t\t .append(\"\t\t,address1 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t .append(\"\t\t,address2 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t,commi_rate \t= ?\t\t\t\t\t\t\\n\") \t/* 수수료율 \t*/\n\n\t\t\t\t .append(\"\t\t,cunt_status = ?\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t,bancod\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 은행코드\t \t\t\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acc_no = ?\t\t\t\t\t\t\\n\")\t/* 은행계좌번호[BANKCODE]\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acct_nm\t= ?\t\t\t\t\t\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t,use_yn\t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\n\t\t\t\t .append(\"\t\t,u_date \t= SYSTIMESTAMP\t\t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t,u_empno \t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t,u_ip = ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP */\n\t \t\t .append(\"\t,client_url = ?\t\t\t\t\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append (\"WHERE client_sid \t= ? \t\t\t\t\\n\");\n\t\t\t\t \n\t\t/*\n\t\t * 계약정보 수정\n\t\t */\n\t\tarr_sql[8].append(\"UPDATE SALES.TCU031 SET\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t cont_date\t\t\t= ?\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t= ?\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t= ?\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t= ?\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND cont_date = ? \\n\");\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 수정\n\t\t */\n\t\t\n\t\tarr_sql[9].append(\"UPDATE SALES.TCU032 SET \t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t branch_nm \t\t= ?\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t= ?\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t= ?\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t= ?\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t= SYSTIMESTAMP\t\t\t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append (\"WHERE client_sid = ? AND branch_cd \t= ?\t\t\\n\");\n\t\t\n\t\t arr_sql[10].append(\"DELETE FROM SALES.TCU030 WHERE client_sid = ?\");\t\n\t\t arr_sql[11].append(\"DELETE FROM SALES.TCU031 WHERE client_sid = ? AND cont_date = ?\");\n\t\t arr_sql[12].append(\"DELETE FROM SALES.TCU032 WHERE client_sid = ? AND branch_cd = ?\");\n\t\t \n\t\t \n\t\t /*\n\t\t * Client SID 얻어오기\n\t\t */\n\t\t\t\n\t\t\tarr_sql[13].append(\"SELECT client_sid FROM SALES.TCU030 WHERE client_cd = ?\\n\");\n\t\t\t\n\t\t/*\n\t\t * 수수료율 조회\n\t\t */\n\t\t\tarr_sql[14].append(\"SELECT\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t.append(\" T1.CLIENT_SID AS CLIENT_SID\t\\n\") /* 매출처SID */\n\t\t\t\t\t\t.append(\" ,T1.FR_DATE AS FR_DATE \t\\n\") /* 시작일자 */\n\t\t\t\t\t\t.append(\" ,T1.TO_DATE AS TO_DATE \t\\n\") /* 종료일자 */\n\t\t\t\t\t\t.append(\" ,T1.WEEKEND_YN AS WEEKEND_YN \t\\n\") /* 주말여부 */\n\t\t\t\t\t\t.append(\" ,T1.COMMI_RATE AS COMMI_RATE\t\\n\") /* 수수료율 */\n\t\t\t\t\t\t.append(\"FROM SALES.TCU033 T1 \t\\n\")\n\t\t\t\t\t\t.append(\"WHERE 1=1 \t\t\t\t\t\t\t\\n\");\n\t\t\t\t\t\t\n\t\t/*\n\t\t * 수수료율 등록\n\t\t */\n\t\t\t\n\t\t\tarr_sql[15].append(\"INSERT INTO SALES.TCU033 ( \t\\n\")\n\t\t\t\t\t\t .append(\" \t CLIENT_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t\t\t .append(\"\t\t ,FR_DATE\t\t\t\t\\n\") \t/* 시작일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,TO_DATE\t\t\t\\n\")\t/* 종료일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_DATE\t\t\t\t\\n\")\t/* 최종입력일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_EMPNO \t\t\t\t\\n\") \t/* 최종입력자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_IP\t\t\t\t\t\\n\")\t/* 최종입력IP \t*/\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t\t?,?,?,?, ?,\t\t\\n\")\t\n\t\t\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?, SYSTIMESTAMP,?,?\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t)\");\n\t\t/*\n\t\t * 수수료율 수정\n\t\t */\n\t\t\tarr_sql[16].append(\"UPDATE SALES.TCU033 SET\t\t\t\t\t\t\\n\") \n\t\t\t\t\t .append(\"\t\t TO_DATE\t\t\t= ?\t\t\t\t\t\\n\")\t/* 종료일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t= ?\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t= ?\t\t\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND FR_DATE = ? AND WEEKEND_YN=? \\n\"); \n\t\t/*\n\t\t * 수수료율 삭제\n\t\t */\n\t\tarr_sql[17].append(\"DELETE FROM SALES.TCU033 WHERE client_sid = ? AND fr_date = ? AND WEEKEND_YN=? \");\t \n\t\t\t \n\n\t}", "public String f9employee() throws Exception {\r\n\t\t/**\r\n\t\t * BUILD COMPLETE QUERY (ALONG WITH PARAMETERS) WHICH GIVES THE DESIRED\r\n\t\t * OUTPUT ALONG WITH PROFILES\r\n\t\t */\r\n\t\tString query = \"SELECT EMP_TOKEN, EMP_FNAME || ' ' || EMP_MNAME || ' ' || EMP_LNAME,\"\r\n\t\t\t\t+ \" EMP_ID,CENTER_NAME,RANK_NAME\"\r\n\t\t\t\t+ \" FROM HRMS_EMP_OFFC\"\r\n\t\t\t\t+ \" LEFT JOIN HRMS_CENTER ON(HRMS_CENTER.CENTER_ID=HRMS_EMP_OFFC.EMP_CENTER)\"\r\n\t\t\t\t+ \" LEFT JOIN HRMS_RANK ON(HRMS_RANK.RANK_ID=HRMS_EMP_OFFC.EMP_RANK) \";\r\n\r\n\t\tquery += \"\tORDER BY EMP_ID ASC \";\r\n\r\n\t\t/**\r\n\t\t * SET THE HEADER NAMES OF TABLE WHICH IS DISPLAYED IN POP-UP WINDOW. *\r\n\t\t */\r\n\r\n\t\tString[] headers = { getMessage(\"employee.id\"), getMessage(\"employee\") };\r\n\r\n\t\t/**\r\n\t\t * DEFINE THE PERCENT WIDTH OF EACH COLUMN\r\n\t\t */\r\n\t\tString[] headerWidth = { \"15\", \"35\" };\r\n\r\n\t\t/**\r\n\t\t * -SET THE FIELDNAMES INTO WHICH THE VALUES ARE BEING POPULATED AFTER A\r\n\t\t * ROW IS SELECTED. -USEFULL IN CASES WHERE SUBMIT FLAG IS 'false'\r\n\t\t * -PARENT FORM WILL SHOW THE VALUES IN THE FILDS CORRSPONDING TO COLUMN\r\n\t\t * INDEX. NOTE: LENGHT OF COLUMN INDEX MUST BE SAME AS THE LENGTH OF\r\n\t\t * FIELDNAMES\r\n\t\t */\r\n\r\n\t\tString[] fieldNames = { \"searchemptoken\", \"searchempName\",\r\n\t\t\t\t\"searchempId\" };\r\n\r\n\t\t/**\r\n\t\t * SET THE COLUMN INDEX E.G. SUPPOSE THE POP-UP SHOWS 4 COLUMNS, BUT ON\r\n\t\t * CLICKING A ROW ONLY SECOND AND FORTH COLUMN VALUES NEED TO BE SHOWN\r\n\t\t * IN THE PARENT WINDOW FIELDS THEN THE COLUMN INDEX CAN BE {1,3}\r\n\t\t * \r\n\t\t * NOTE: COLUMN NUMBERS STARTS WITH 0\r\n\t\t * \r\n\t\t */\r\n\t\tint[] columnIndex = { 0, 1, 2 };\r\n\r\n\t\t/**\r\n\t\t * WHEN SET TO 'true' WILL SUBMIT THE FORM\r\n\t\t * \r\n\t\t */\r\n\t\tString submitFlag = \"false\";\r\n\r\n\t\t/**\r\n\t\t * IF THE 'submitFlag' IS 'true' , THE FORM WILL SUBMIT AND CALL\r\n\t\t * FOLLOWING METHOD IN THE ACTION * NAMING CONVENSTION: <NAME OF\r\n\t\t * ACTION>_<METHOD TO CALL>.action\r\n\t\t */\r\n\t\tString submitToMethod = \"\";\r\n\r\n\t\t/**\r\n\t\t * CALL THIS METHOD AFTER ALL PARAMETERS ARE DEFINED *\r\n\t\t */\r\n\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}", "public String displayAllEmployees(){\n String p = \" \";\n \n try {\n \n emprs = stmt.executeQuery \n (\"SELECT * FROM JEREMY.EMPLOYEE\");\n p = loopDBEMPInfo(emprs);\n emprs.close();\n } catch (Exception e) {\n System.out.println(\"SQL problem \" + e);\n }\n \n return p;\n}", "protected String buildDataQuery() {\n StringBuilder sql = new StringBuilder(\"select\");\n String delim = \" \";\n for (String vname : getColumnNames()) {\n sql.append(delim).append(vname);\n delim = \", \";\n }\n \n Element ncElement = getNetcdfElement();\n \n String table = ncElement.getAttributeValue(\"dbTable\");\n if (table == null) {\n String msg = \"No database table defined. Must set 'dbTable' attribute.\";\n _logger.error(msg);\n throw new TSSException(msg);\n }\n sql.append(\" from \" + table);\n \n String predicate = ncElement.getAttributeValue(\"predicate\");\n if (predicate != null) sql.append(\" where \" + predicate);\n \n //Order by time.\n String tname = getTimeVarName();\n sql.append(\" order by \"+tname+\" ASC\");\n \n return sql.toString();\n }", "protected String createFindBy(String nume) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"SELECT \");\n\t\tsb.append(\" * \");\n\t\tsb.append(\" FROM \");\n\t\tsb.append(type.getSimpleName());\n\t\tsb.append(\" WHERE \");\n\t\treturn sb.toString();\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tSession session=Utility.getSF().openSession();\r\n\t\tCriteria cr=session.createCriteria(Emp.class);\r\n\t\t\r\n\t\tOrder order=Order.desc(\"eno\");\r\n\t\tcr.addOrder(order);\r\n\t\t\r\n\t\tCriterion crt=Restrictions.between(\"eno\", 1001, 1005);\r\n\t\tcr.add(crt);\r\n\t\t\r\n\t\tProjection proj=Projections.property(\"eno\");\r\n\t\tcr.setProjection(proj);\r\n\t\t\r\n\t\t\r\n\t\tList<Integer> codes=cr.list();\r\n\t\t\r\n\t\tfor(Integer code:codes) {\r\n\t\t\tSystem.out.println(code);\r\n\t\t}\r\n\t\t/*\r\n\t\tProjection proj=Projections.property(\"ename\");\r\n\t\tcr.setProjection(proj);\r\n\t\t\r\n\t\t\r\n\t\tList<String> names=cr.list();\r\n\t\t\r\n\t\tfor(String name:names) {\r\n\t\t\tSystem.out.println(name);\r\n\t\t}\r\n\t\t*/\r\n\t\tsession.close();\r\n\r\n\t}", "private String createSelectWithNameAndAddress() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"SELECT * FROM client\");\n sb.append(\" WHERE name =?\");\n sb.append(\" AND address =?\");\n\n return sb.toString();\n }", "@Override\r\n\tpublic String generate() {\r\n\t\tStringBuilder query = new StringBuilder();\r\n\r\n\t\tquery.append(\"INSERT INTO \").append(tableName).append(\" (\");\r\n\t\tfor (int i = 0; i < fieldNames.size(); i++) {\r\n\t\t\tquery.append(fieldNames.get(i));\r\n\t\t\tif (i < fieldNames.size() - 1) {\r\n\t\t\t\tquery.append(\", \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tquery.append(\") VALUES (\");\r\n\t\tfor (int i = 0; i < fieldValues.size(); i++) {\r\n\t\t\tquery.append(\"'\").append(fieldValues.get(i)).append(\"'\");\r\n\t\t\tif (i < fieldValues.size() - 1) {\r\n\t\t\t\tquery.append(\", \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tquery.append(\");\");\r\n\t\treturn query.toString();\r\n\t}", "public static String todosLosEmpleados(){\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=1;\";\n return query;\n }", "public String insertSelective(Emp record) {\n BEGIN();\n INSERT_INTO(\"emp\");\n \n if (record.getId() != null) {\n VALUES(\"id\", \"#{id,jdbcType=INTEGER}\");\n }\n \n if (record.getName() != null) {\n VALUES(\"name\", \"#{name,jdbcType=VARCHAR}\");\n }\n \n if (record.getSex() != null) {\n VALUES(\"sex\", \"#{sex,jdbcType=CHAR}\");\n }\n \n if (record.getJob() != null) {\n VALUES(\"job\", \"#{job,jdbcType=VARCHAR}\");\n }\n \n if (record.getSalary() != null) {\n VALUES(\"salary\", \"#{salary,jdbcType=DECIMAL}\");\n }\n \n if (record.getHiredate() != null) {\n VALUES(\"hiredate\", \"#{hiredate,jdbcType=DATE}\");\n }\n \n if (record.getDeptno() != null) {\n VALUES(\"deptno\", \"#{deptno,jdbcType=INTEGER}\");\n }\n \n return SQL();\n }", "public static String employeeExists(String eid, String pass){\n return \"select e_fname from employee where e_id = '\"+eid+\"' and e_pass = '\"+pass+\"'\";\n }", "private String getConsulta(int indice) {\r\n\t\tString sql = \"\";\r\n\t\tStringBuffer variables = new StringBuffer();\r\n\t\tinParams = ((TxParams)todo.get(indice)).getParams().entrada;\r\n\t\toutParams = ((TxParams)todo.get(indice)).getParams().salida;\r\n\t\tif ((inParams == null || inParams.size() == 0) && (outParams == null || outParams.size() == 0))\r\n\t\t\tsql = \"{call \" + consultas[indice] + \"}\";\r\n\t\telse {\r\n\t\t\t//Por cada parametro de entrada corresponde un ?\r\n\t\t\t//Ojo que tambien hay que considerar los de salida si es necesario\r\n\t\t\t//pero no esta cubierto en esta primera etapa\r\n\t\t\tif (inParams != null) {\r\n\t\t\t\tfor (int i = 0; i < inParams.size(); i++)\r\n\t\t\t\t\tvariables.append(\"?,\");\r\n\t\t\t}\r\n\t\t\tif (outParams != null) {\r\n\t\t\t\tfor (int i = 0; i < outParams.size(); i++)\r\n\t\t\t\t\tvariables.append(\"?,\");\r\n\t\t\t}\r\n\t\t\tString listaVars = variables.toString();\r\n\t\t\tlistaVars = listaVars.substring(0, listaVars.length() - 1);\r\n\t\t\tsql = \"{call \" + consultas[indice] + \"(\" + listaVars + \")}\";\r\n\t\t}\r\n\t\treturn sql;\r\n\t}", "public String getFindByIdSql() {\r\n\t\treturn getSelectPrefix() + \" and XH=? \";\r\n\t}", "abstract protected String buildSQL(BatchSQLEnum sql);", "String WHERE() { return yyline+\"/\"+yycolumn+\"(\"+yychar+\")\" ;}", "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 }", "protected String getSql(MethylDbQuerier params, String chr) \n\tthrows Exception{\n\t\tString methTable = tablePrefix + chr;\n\t\t//String methTable = params.methylTablePrefix;\n\t\tString sql = String.format(\"select * from %s WHERE \", methTable);\n\t\tsql += \"ABaseRefUpperCase != '0'\";\n\t\tsql += \" AND BBaseRefUpperCase != '0'\";\n\t\t\n\t\tsql += \" AND (ACReads != 0 OR BCReads != 0)\";\n\t\tsql += \" AND (ATReads != 0 OR BTReads != 0)\";\n\t\t//sql += \" AND (ACReads + ATReads)/totalReads >= \" + minAlleleFreq;\n\t\t//sql += \" AND (BCReads + BTReads)/totalReads >= \" + minAlleleFreq;\n\t\t//sql += \" AND (ACReads + ATReads >= \" + minAlleleCount + \")\";\n\t\t//sql += \" AND (BCReads + BTReads >= \" + minAlleleCount + \")\";\n\t\tsql += \" AND aReadsOpposite/totalReadsOpposite <= \" + minOppoAFreq;\n\t\tif (Cpg){\n\t\t\tsql += \" AND nextBaseRefUpperCase = 'G'\";\n\t\t}\n\t\t\t\n\t\t//sql += \" GROUP BY chromPos \"; // If you don't do this, you get multiple instances of the same CpG if it overlaps multiple features.\n\t\tsql += \" ORDER BY chromPos,alleleChromPos ;\";\n\t\t\n\t\treturn sql;\n\t}", "private String getSql(Map map){\n \tStringBuilder sql = new StringBuilder();\n \t\n \tsql.append(\" select account.FNumber number,REPLACE(account.FLongNumber, '!', '.') transLongNumber,account.FLongNumber longNumber,account.FName_l2 name, \");\n \tsql.append(\" account.FLevel level1,account.FIsLeaf isLeaf,account.FId id,account.FParentID parentid, \");\n \tsql.append(\" org.FId fullOrgUnitid,project.FId curProjectid \");\n \tsql.append(\" from T_FDC_CostAccount account \");\n \tsql.append(\" left join T_FDC_CurProject project ON account.FCurProject = project.FID \");\n \tsql.append(\" left join T_FDC_CostAccount parent ON account.FParentID = parent.FID \");\n \tsql.append(\" left join T_ORG_BaseUnit org ON account.FFullOrgUnit = org.FID \");\n \tsql.append(\" where 1=1 \");\n \tsql.append(\" and account.FLongNumber like '5002%' \");//只取科目502开头的科目\n \tif(map.get(\"fullOrgUnit\")!=null){\n OrgStructureInfo oui = (OrgStructureInfo)map.get(\"fullOrgUnit\");\n if(oui != null && oui.getUnit() != null){\n FullOrgUnitInfo info = oui.getUnit();\n \tsql.append(\" and account.FFullOrgUnit = '\"+info.getId().toString()+\"' \");\n }\n \t}\n \tif(map.get(\"curProject\")!=null){\n \t\tCurProjectInfo projectInfo = (CurProjectInfo)map.get(\"curProject\");\n \tsql.append(\" and account.FCurProject = '\"+projectInfo.getId().toString()+\"' \");\n \t}\n \tsql.append(\" order by REPLACE(account.FLongNumber, '!', '.') asc \");\n \t\n \treturn sql.toString();\n }", "public static void main(String[] args) {\n Connection con;\n String url = \"jdbc:oracle:thin:@localhost:1521:orcl\";\n Statement stmt;\n\n try {\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n con = DriverManager.getConnection(url, \"hr\", \"hr\");\n stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(\"select * from employees\");\n while(rs.next())\n {\n System.out.println(rs.getString(1)+\" \"+rs.getString(2)+\" \"+rs.getString(3)+\" \"+rs.getString(4)+\" \"+rs.getString(5));\n }\n\n } catch (ClassNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "static ResultSet dataOphalen(String querry) {\n //declaratie anders kan er niks worden gereturnt\n ResultSet rs = null;\n try {\n Statement stmt = connectieMaken().createStatement(); //\n rs = stmt.executeQuery(querry);\n } catch (SQLException se) {\n se.printStackTrace();\n }\n return rs;\n }", "@Override\n final public String getInputRelation() {\n return \"SELECT * FROM TR1_DB1_PROPHECY_Q5_INNER\";\n }", "public void addEmployee(employee emp){\n try {\n \n \n String insert =\"INSERT INTO JEREMY.EMPLOYEE (NAME, USERNAME, PASSWORD) VALUES \"\n + \"('\"+emp.name+\"','\"\n +emp.username+\"','\"\n +emp.password+\"')\";\n \n System.out.println(insert);\n \n empstmt.executeUpdate(insert);\n\n emprs = stmt.executeQuery(\"SELECT * FROM JEREMY.EMPLOYEE\");\n total();\n } catch (Exception e) {\n System.out.println(\"SQL problem dbEmployee Addmployee()\" + e);\n }\n \n }", "private String produceSQL(String[] cols) {\n StringBuffer buffer = new StringBuffer();\n buffer.append('(');\n buffer.append(cols[0]);\n\n for (int i = 1; i < cols.length; i++){\n buffer.append(',');\n buffer.append(cols[i]);\n }\n buffer.append(')');\n return buffer.toString();\n }", "@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }", "public static void main(String[] args) {\n\t\tString dbur1 = \"jdbc:oracle:thin:@localhost:1521:xe\";// 로컬호스트 본인컴퓨터~ 포트 1521 sid(I) XE\n//\t\tString dbuser = \"C##BITUSER\";\n//\t\tString dbpass = \"bituser\";\n\n\t\tString dbpass = \"hr\";\n\t\tString dbuser = \"hr\";\n\t\tStatement stmt = null;\n\t\tResultSet re = null;\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tconn = DriverManager.getConnection(dbur1, dbuser, dbpass);\n\t\t\tSystem.out.println(conn);\n\t\t\tSystem.out.println(\"접속성공!\");\n\t\t\tstmt = conn.createStatement();\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tSystem.out.print(\"검색할 이름 혹은 성을 입력해주세요 :>\");\n\t\t\tString scc = sc.next();\n\t\t\t\n\t\t\tString sql = \"SELECT first_name|| ' ' || last_name name, email, hire_date \"\n\t\t\t\t\t+ \"FROM employees \"\n\t\t\t\t\t+ \"WHERE first_name LIKE '%\"+scc+\"%'\"\n\t\t\t\t\t\t\t+ \"OR last_name LIKE '%\"+scc+\"%'\";\n\t\t\tre = stmt.executeQuery(sql);\n\n\t\t\twhile (re.next()) {\n\t\t\t\tString deptId = re.getString(\"name\");\n\t\t\t\tString deptName = re.getNString(\"email\");\n\t\t\t\tString date = re.getString(\"hire_date\");\n\t\t\t\tSystem.out.println(deptId + \" \" + deptName + \" \" + date);\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.err.println(\"드라이버로드 실패\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\t// TODO: handle exception\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tconn.close();\n\t\t\t} catch (Exception e2) {\n\t\t\t\te2.printStackTrace();\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}\n\t\t// TODO Auto-generated method stub\n\n\t}", "public static void main(String[] args) {\n\t\tConnection con =null;\r\n\t\ttry {\r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"Driver not found\"+e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tString url=\"jdbc:oracle:thin:@localhost:1521:orcl\";\r\n\t\tString username=\"hr\";\r\n\t\tString password=\"hr\";\r\n\t\t// 2. Get connection\r\n\t\ttry {\r\n\t\t\tcon =DriverManager.getConnection(url,username,password);\r\n\t\t\tDriverManager.getConnection(url,username,password);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Connection failed\"+e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// database metadata\r\n\t\ttry {\r\n\t\t\tDatabaseMetaData dbmeta = con.getMetaData();\r\n\t\t\tSystem.out.println(dbmeta.toString());\r\n\t\t\tSystem.out.println(dbmeta.getDatabaseMajorVersion());\r\n\t\t\tSystem.out.println(dbmeta.getDatabaseProductName());\r\n\t\t\t}catch(SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t// Create statement object\r\n\t\tString sql=\"select employee_id, first_name, last_name from employees\";\r\n\t\ttry {\r\n\t\t\tStatement st =con.createStatement();\r\n\t\t\tResultSet rs=st.executeQuery(sql);\r\n\t\t\t\r\n\t\t\tResultSetMetaData rsmd =rs.getMetaData();\r\n\t\t\tint colcount =rsmd.getColumnCount();\r\n\t\t\tSystem.out.println(\"Colcount:\"+colcount);\r\n\t\t\tint count=0;\r\n\t\t\tint type = rsmd.getColumnType(2);\r\n\t\t\tif(type == Types.INTEGER) {\r\n\t\t\t\tSystem.out.println(\"Col has Intehger type\");\r\n\t\t\t}\r\n\t\t\telse if(type == Types.VARCHAR) {\r\n\t\t\t\tSystem.out.println(\"col is a string (varchar)\");\r\n\t\t\t}else if (type == Types.NUMERIC) {\r\n\t\t\t\tSystem.out.println(\"Col is type numeric\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(rsmd.getColumnTypeName(1));\r\n\t\t\twhile(rs.next()) {\r\n\t\t\t\t\r\n\t\t\t\t//String fname =rs.getString(\"first_name\");\r\n\t\t\t\t\r\n\t\t\t\t//System.out.println(fname);\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(count);\r\n\t\t\trs.close();\r\n\t\t\tst.close();\r\n\t\t\tcon.close();\r\n\r\n\t\t} catch(SQLException sqle) {\r\n\t\t\tSystem.out.println(sqle.getMessage());\r\n\t\t}\r\n\r\n\t}", "private String createFindAll() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"SELECT \");\n\t\tsb.append(\" * \");\n\t\tsb.append(\" FROM \");\n\t\tsb.append(type.getSimpleName());\n\t\treturn sb.toString();\n\t}", "public String generateSQL(String database) {\n//\t\tString sql = \"select requesttext from dbc.tables order by createtimestamp\";\n\t\tString sql = CommonConfig.sqlQueryDDL(database);;\n//\t\tif (database!=null && !database.equals(\"\")) {\n//\t\t\tsql = \"select requesttext from dbc.tables where databasename='\"+database+\"' order by createtimestamp\";\n//\t\t}\n \t\treturn sql;\n \t}", "protected String getSQL (Element sql) {\r\n\r\n //local variables\r\n\r\n String SQL = \"\";\r\n\r\n //code description\r\n \r\n NodeList textlist = sql.getChildNodes();\r\n for (int i = 0; i < textlist.getLength(); i++) {\r\n if (textlist.item(i).getNodeType() == Node.TEXT_NODE) {\r\n SQL += textlist.item(i).getNodeValue();\r\n }\r\n }\r\n return SQL;\r\n\r\n }", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "public String getSQL() throws org.exolab.castor.jdo.QueryException {\r\n if (_expr != null) {\r\n return _expr.getStatement(true);\r\n }\r\n\r\n return _spCall;\r\n }", "private void generateQuery() {\n\t\tString edgeType = \"\";\n\n\t\tif (isUnionTraversal || isTraversal || isWhereTraversal) {\n\t\t\tString previousNode = prevsNode;\n\t\t\tif (isUnionTraversal) {\n\t\t\t\tpreviousNode = unionMap.get(unionKey);\n\t\t\t\tisUnionTraversal = false;\n\t\t\t}\n\n\t\t\tEdgeRuleQuery edgeRuleQuery = new EdgeRuleQuery.Builder(previousNode, currentNode).build();\n\t\t\tEdgeRule edgeRule = null;\n\n\t\t\ttry {\n\t\t\t\tedgeRule = edgeRules.getRule(edgeRuleQuery);\n\t\t\t} catch (EdgeRuleNotFoundException | AmbiguousRuleChoiceException e) {\n\t\t\t}\n\n\t\t\tif (edgeRule == null) {\n\t\t\t\tedgeType = \"EdgeType.COUSIN\";\n\t\t\t} else if (\"none\".equalsIgnoreCase(edgeRule.getContains())){\n\t\t\t\tedgeType = \"EdgeType.COUSIN\";\n\t\t\t}else {\n\t\t\t\tedgeType = \"EdgeType.TREE\";\n\t\t\t}\n\n\t\t\tquery += \".createEdgeTraversal(\" + edgeType + \", '\" + previousNode + \"','\" + currentNode + \"')\";\n\n\t\t}\n\n\t\telse\n\t\t\tquery += \".getVerticesByProperty('aai-node-type', '\" + currentNode + \"')\";\n\t}", "public static void main(String[] args) {\n\t\tConnection conn=SqlConnection.createConnection();\n\t\t\n\t\ttry {\n\t\t\tStatement st=conn.createStatement();\n\t\t\tResultSet result=st.executeQuery(\"select * from emp101\");\n\t\t\t\n\t\t\twhile (result.next()) {\n\t\t\t\tSystem.out.println(result.getString(\"name\")+\"=\"+result.getString(2));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void preparedStatementForEmployeeData() {\n\t\ttry {\n\t\t\tConnection connection = this.getConnection();\n\t\t\tString sql = \"Select * from employee_payroll_2 WHERE name = ?\";\n\t\t\temployeePayrollDataStatement = connection.prepareStatement(sql);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static String getEmployeeName(String id){\n return \"select e_fname from employee where e_id = '\"+id+\"'\";\n }", "private String getQuerySelecaoBonusPulaPula()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" ID_CODIGO_NACIONAL, \" +\n\t\t\t\" VLR_BONUS_MINUTO, \" +\n\t\t\t\" VLR_BONUS_MINUTO_FF \" +\n\t\t\t\"FROM \" +\n\t\t\t\" TBL_GER_BONUS_PULA_PULA \";\n\t\t\n\t\treturn result;\n\t}", "public abstract String toSQL();", "private void appendSelectStatement() {\n builder.append(SELECT).append(getSelectedFields()).append(FROM);\n }", "public String getEmployeeInfo() throws SQLException {\n String SQL = String.format(\"SELECT * FROM %s\", DbSchema.table_employees.name);\n Statement statement = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\n ResultSet results = statement.executeQuery(SQL);\n\n //Prepare format stuff\n String tableHeader = String.format(\"%s %s %s %s %s\\n\", table_employees.cols.id, table_employees.cols.first_name, table_employees.cols.last_name, table_employees.cols.age, table_employees.cols.salary);\n StringBuilder output = new StringBuilder(tableHeader);\n DecimalFormat format = new DecimalFormat(\"#,###.00\");\n\n while (results.next()) {\n //Iterate through each row (employee) and add each bit of info to table\n String row = String.format(\"%s %s %s %s %s\\n\",\n results.getInt(table_employees.cols.id),\n results.getString(table_employees.cols.first_name),\n results.getString(table_employees.cols.last_name),\n results.getInt(table_employees.cols.age),\n format.format(results.getDouble(table_employees.cols.salary)));\n output.append(row);\n }\n return output.toString();\n }", "protected abstract String getEntityExistanceSQL(E entity);", "public static void main(String[] args) {\n\t\tSessionFactory sf=Util.getSessionFactory();\r\n\t\tSession session=sf.openSession();\r\n\t\tString hql=\"from Employee\";\r\n\t\tQuery q=session.createQuery(hql);\r\n\t\tList<Employee> li = q.list();\r\n\t\tfor(Employee e:li)\r\n\t\t\tSystem.out.println(e);\r\n\t\t/*String hql1=\"Update Employee set eName='YYY' sal=30000 where eNo=101\";\r\n\t\tQuery q1=session.createQuery(hql1);\r\n\t\tList<Employee> li1 = q1.list();\r\n\t\tfor(Employee e:li1)\r\n\t\t\tSystem.out.println(e);*/\r\n\t\tsession.close();\r\n\t}", "public void fetchEmployeeDetailsByPromotionCode(EmpCredit empCredit, String promotionCode){\r\n\t\ttry {\r\n\t\t\t String empDetailQuery = \"SELECT HRMS_EMP_OFFC.EMP_TOKEN , HRMS_EMP_OFFC.EMP_FNAME||' '||HRMS_EMP_OFFC.EMP_MNAME||' '||HRMS_EMP_OFFC.EMP_LNAME AS NAME,\" \r\n\t\t\t\t\t+ \" HRMS_CENTER.CENTER_NAME, HRMS_RANK.RANK_NAME,\"\r\n\t\t\t\t\t+ \" NVL(SALGRADE_TYPE,' ') ,SALGRADE_CODE, HRMS_EMP_OFFC.EMP_ID,\" \r\n\t\t\t\t\t+ \" HRMS_SALARY_MISC.GROSS_AMT,DECODE(HRMS_SALARY_MISC.SAL_EPF_FLAG,'Y','true','N','false'), NVL(SAL_ACCNO_REGULAR,' '), \"\r\n\t\t\t\t\t+ \" NVL(SAL_PANNO,' '), NVL(DEPT_NAME,' '), DEPT_ID , TO_CHAR(EMP_REGULAR_DATE,'DD-MM-YYYY'), NVL(CADRE_NAME,' '), HRMS_PROMOTION.PRO_GRADE, NVL(CTC,0)\" \r\n\t\t\t\t\t+ \" FROM HRMS_EMP_OFFC \" \r\n\t\t\t\t\t+ \" INNER JOIN HRMS_PROMOTION ON(HRMS_PROMOTION.EMP_CODE = HRMS_EMP_OFFC.EMP_ID AND HRMS_PROMOTION.PROM_CODE =\"+promotionCode+\")\"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_RANK ON (HRMS_RANK.RANK_ID=HRMS_PROMOTION.PRO_DESG)\" \r\n\t\t\t\t\t+ \" INNER JOIN HRMS_CENTER ON (HRMS_CENTER.CENTER_ID = HRMS_PROMOTION.PRO_BRANCH)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_TITLE ON (HRMS_EMP_OFFC.EMP_TITLE_CODE = HRMS_TITLE.TITLE_CODE)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_DEPT ON (HRMS_DEPT.DEPT_ID = HRMS_PROMOTION.PRO_DEPT )\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_CADRE ON (HRMS_CADRE.CADRE_ID = HRMS_PROMOTION.PRO_GRADE)\"\r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_SALGRADE_HDR ON(HRMS_SALGRADE_HDR.SALGRADE_CODE = HRMS_PROMOTION.PROM_SALGRADE)\"\r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_SALARY_MISC ON(HRMS_SALARY_MISC.EMP_ID = HRMS_EMP_OFFC.EMP_ID)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_FORMULABUILDER_HDR ON(HRMS_FORMULABUILDER_HDR.FORMULA_ID = HRMS_SALARY_MISC.FORMULA_ID)\";\r\n\t\t\tObject empDetailObj[][] = getSqlModel().getSingleResult(empDetailQuery);\r\n\t\t\t\r\n\t\t\tif(empDetailObj!=null && empDetailObj.length>0){\r\n\t\t\t\r\n\t\t\t\tempCredit.setEmpToken(String.valueOf(empDetailObj[0][0]));\r\n\t\t\t\tempCredit.setEmpName(String.valueOf(empDetailObj[0][1]));\r\n\t\t\t\tempCredit.setEmpCenter(String.valueOf(empDetailObj[0][2]));\r\n\t\t\t\tempCredit.setEmpRank(String.valueOf(empDetailObj[0][3]));\r\n\t\t\t\tempCredit.setGradeName(String.valueOf(empDetailObj[0][4]));\r\n\t\t\t\tempCredit.setGradeId(String.valueOf(empDetailObj[0][5]));\r\n\t\t\t\tempCredit.setEmpId(String.valueOf(empDetailObj[0][6]));\r\n\t\t\t\tempCredit.setGrsAmt(String.valueOf(empDetailObj[0][7]));\r\n\t\t\t\tempCredit.setPfFlag(String.valueOf(empDetailObj[0][8]));\r\n\t\t\t\tempCredit.setEmpAccountNo(String.valueOf(empDetailObj[0][9]));\r\n\t\t\t\tempCredit.setEmpPanNo(String.valueOf(empDetailObj[0][10]));\r\n\t\t\t\tempCredit.setEmpDeptName(String.valueOf(empDetailObj[0][11]));\r\n\t\t\t\tempCredit.setEmpDeptId(String.valueOf(empDetailObj[0][12]));\r\n\t\t\t\tempCredit.setJoiningDate(String.valueOf(empDetailObj[0][13]));\r\n\t\t\t\tempCredit.setEmpGradeName(String.valueOf(empDetailObj[0][14]));\r\n\t\t\t\tempCredit.setEmpGradeId(String.valueOf(empDetailObj[0][15]));\r\n\t\t\t\tempCredit.setCtcAmt(String.valueOf(empDetailObj[0][16]));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfetchIncrementPeriod(empCredit);\r\n\t}", "public String getWhereString()\n {\n String outString = \n \"WHERE recip = '\" + recip + \"'\" \n ;\n return outString;\n }", "public static void main(String[] args) {\n\ttry {\r\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\tConnection connection= DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:orcl\",\"hr\",\"hr\");\r\n\t\tStatement statement=connection.createStatement();\r\n\t\tResultSet resultset= statement.executeQuery(\"select * from employees\");\r\n\t\twhile(resultset.next())\r\n\t\t{\r\n\t\t\tint employeeId=resultset.getInt(1);\r\n\t\t\tString firstName=resultset.getString(2);\r\n\t\t\tSystem.out.println(employeeId+\"->\"+firstName);\r\n\t\t}\r\n\t}\r\n\tcatch (ClassNotFoundException e) {\r\n\t\t\r\n\t\tSystem.out.println(e);\r\n\t} catch (SQLException e) {\r\n\t\r\n\t\te.printStackTrace();\r\n\t}\r\n}", "public static void main(String[] args) throws NumberFormatException, IOException, ClassNotFoundException, SQLException {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\tString url=\"jdbc:mysql://localhost:3306/ctspune\";\r\n\t\tConnection conn=DriverManager.getConnection(url,\"root\",\"root\");\r\n\t\t//String query=\"insert into employee values(?,?,?,?,?)\";\r\n\t\t//String query=\"delete from employee where id=?\";\r\n\t\t\r\n\t\tString query=\"select*from employee\";\r\n\t\tPreparedStatement ps=conn.prepareStatement(query);\r\n\t\tResultSet rs=ps.executeQuery(query);\r\n\t\tint i=1;\r\n\t\t\r\n\t\twhile(rs.next())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Employee\"+i+\"Records\");\r\n\t\t\tSystem.out.println(\"Id\"+rs.getInt(1));\r\n\t\t\tSystem.out.println(\"Name\"+rs.getString(2));\r\n\t\t\tSystem.out.println(\"Address\"+rs.getString(3));\r\n\t\t\tSystem.out.println(\"Age\"+rs.getInt(4));\r\n\t\t\tSystem.out.println(\"Phone\"+rs.getLong(5));\r\n\t\t\ti++;\r\n//\t\t\tint id=rs.getInt(1);//instead of 1 we can also write column name linke rs.getInt(\"id\")\r\n//\t\t\tString name=rs.getString(2);\r\n//\t\t\tString address=rs.getString(3);\r\n//\t\t\tint age=rs.getInt(4);\r\n//\t\t\tlong phone=rs.getLong(5);\r\n//\t\t\tSystem.out.println(id +\":\"+name+\":\"+address+\":\"+age+\":\"+phone);\r\n\t\t}\r\n\t\t}", "public static String buildStudentQuery(ArrayList<String> cols,\n StudentRequestModel requestModel){\n\n String SELECT = \"SELECT id\";\n String FROM = \" FROM student\";\n String WHERE = \" WHERE 1=1\";\n\n for(String c:cols){\n SELECT += (\", \" + c);\n }\n\n if (requestModel.getFirstName() != null) {\n WHERE += \" && firstName LIKE '%\" + requestModel.getFirstName() + \"%'\";\n }\n\n if (requestModel.getLastName() != null) {\n WHERE += \" && lastName LIKE '%\" + requestModel.getLastName() + \"%'\";\n }\n\n if (requestModel.getGpa() != null) {\n WHERE += \" && gpa > \" + requestModel.getGpa();\n }\n\n if (requestModel.getMajor() != null) {\n WHERE += \" && major = \" + requestModel.getMajor();\n }\n\n return SELECT + FROM + WHERE;\n }", "private String getQueryString(String searchType) {\n String queryString;\n\n if (searchType.equals(\"employeeId\")) {\n queryString = \"SELECT * FROM employees WHERE emp_id = ?\";\n } else if (searchType.equals(\"firstName\")) {\n queryString = \"SELECT * FROM employees WHERE first_name LIKE ?\";\n } else {\n queryString = \"SELECT * FROM employees WHERE last_name LIKE ?\";\n }\n\n\n return queryString;\n }", "private String buildQuery(String ... sql) {\n\t\tfinal StringBuffer sb = new StringBuffer();\n\t\t\n\t\tfor (String s : sql) {\n\t\t\tsb.append(ParsingUtil.QUERY + \" \" + s + \"\\n\");\n\t\t}\n\t\t\n\t\treturn sb.toString(); \n\t}", "public static void main(String[] args) {\n\t\tConnection con=null;\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tcon=DriverManager.getConnection(\"jdbc:oracle:thin:@apollo.vse.gmu.edu:1521:ite10g\",\"pdatla2\",\"phejyc\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\tint i=0;\n\t\tint j=1;\n\t\ttry\n\t\t{\n\t\t\t//ArrayList<String> l1= new ArrayList<String>();\n\t\t\tStatement st;\n\t\t\tSystem.out.println(\"List of Employees part of the Research Department:\");\n\t\t\tst = con.createStatement();\n\t\t\tResultSet rs=st.executeQuery(\"select E.Lname, E.ssn from Employee E, Department D where E.Dno=D.Dnumber and Dname='Research'\");\n\t\t\t//i=ps.executeUpdate();\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tSystem.out.println(j+\")\");\n\t\t\t\tSystem.out.print(\"Last Name: \"+rs.getString(1));\n\t\t\t\tSystem.out.println(\"\tSSN: \"+rs.getString(2));\n\t\t\t\tj++;\n\t\t\t\t//l1.add(rs.getString(1));\n\t\t\t}\n\t\t} \n\t\t\n\t\tcatch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//System.out.println(\"catch block in studentDAO reached\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"ID:\" + this.empid + \",NAME:\" + this.name;\r\n\t}", "private String getCodeFragmentGenealogyTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CODE_FRAGMENT_GENEALOGY(\");\n \t\tbuilder.append(\"CODE_FRAGMENT_GENEALOGY_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG,\");\n \t\tbuilder.append(\"CODE_FRAGMENTS TEXT NOT NULL,\");\n \t\tbuilder.append(\"CODE_FRAGMENT_LINKS TEXT NOT NULL,\");\n \t\tbuilder.append(\"CHANGES INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "private static StringBuffer generateProvenanceProcedure(String query,\n\t int qIndex) {\n\n\t/*\n\t * First, we need the list of the FROM clause atoms/aliases that we will\n\t * use to augment the SELECT clause with ROWIDs. assume the query is an\n\t * SPJ Select .... From... Where .\n\t */\n\tString uQuery = query.toUpperCase();\n\n\tint fromIndex = uQuery.indexOf(\"FROM\");\n\tint whereIndex = uQuery.indexOf(\"WHERE\");\n\n\tif (whereIndex == -1) {\n\t whereIndex = uQuery.length();\n\t}\n\tString fromClause = query.substring(fromIndex + 4, whereIndex - 1)\n\t\t.trim();\n\t// System.out.println(\"From: \"+fromClause);\n\tStringTokenizer st = new StringTokenizer(fromClause, \",\");\n\n\t// Keep the list of FROM clause atoms\n\tList<String> fromAtoms = new ArrayList<String>();\n\twhile (st.hasMoreTokens()) {\n\t String thisFromAtom = st.nextToken().trim();\n\n\t // System.out.println(\"Atom:\"+thisFromAtom);\n\n\t // bug fixed\n\t // bug: didn't consider \"as\"\n\t if (thisFromAtom.contains(\"as\")) {\n\t\tStringTokenizer atomTok = new StringTokenizer(thisFromAtom,\n\t\t\t\"as\");\n\t\tString atomAlias = atomTok.nextToken();\n\t\tif (atomTok.hasMoreTokens())\n\t\t atomAlias = atomTok.nextToken();\n\t\tfromAtoms.add(atomAlias);\n\t } else if (thisFromAtom.contains(\"AS\")) {\n\t\tStringTokenizer atomTok = new StringTokenizer(thisFromAtom,\n\t\t\t\"AS\");\n\t\tString atomAlias = atomTok.nextToken();\n\t\tif (atomTok.hasMoreTokens())\n\t\t atomAlias = atomTok.nextToken();\n\t\tfromAtoms.add(atomAlias);\n\t } else {\n\t\tStringTokenizer atomTok = new StringTokenizer(thisFromAtom, \" \");\n\t\tString atomAlias = atomTok.nextToken();\n\t\tif (atomTok.hasMoreTokens())\n\t\t atomAlias = atomTok.nextToken();\n\t\tfromAtoms.add(atomAlias);\n\t }\n\n\t // original code from Bogdan\n\t // StringTokenizer atomTok = new StringTokenizer(thisFromAtom,\" \");\n\t // String atomAlias = atomTok.nextToken();\n\t // if(atomTok.hasMoreTokens())\n\t // atomAlias=atomTok.nextToken();\n\t // fromAtoms.add(atomAlias);\n\n\t}\n\n\t// System.out.println(\"FROM atoms:\"+fromAtoms);\n\n\t/*\n\t * the extension to the SELECT clause which will be used to extract the\n\t * ROWIDs of the source tuples (why-provenance)\n\t */\n\tStringBuffer selectExtension = new StringBuffer();\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t String fromAtom = fromAtoms.get(i - 1);\n\t selectExtension.append(\", \" + fromAtom + \".\"\n\t\t + Parameters.ROWID_ATT_NAME);\n\t selectExtension.append(\" as src\" + i + \"_ID\");\n\t}\n\tselectExtension.append(\"\\n\\t\\t \");\n\n\t// System.out.println(\"Select extension: \"+selectExtension);\n\tStringBuffer buffer = new StringBuffer();\n\t// buffer.append(\"DELIMITER !\\n\");\n\tbuffer.append(\"CREATE PROCEDURE \" + Parameters.TRACK_PROV_PROCNAME\n\t\t+ \"()\\n\");\n\tbuffer.append(\"BEGIN\\n\\n\");\n\tbuffer.append(\"\\t declare deriv_no int default 0;\\n\");\n\tbuffer.append(\"\\t declare done int default 0;\\n\\n\");\n\n\t// declare res_id_var, src1_id_var, src2_id_var int;\n\tbuffer.append(\"\\t declare res_id_var\");\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\", src\" + i + \"_id_var\");\n\t}\n\tbuffer.append(\" int;\\n\");\n\t// declare prov_cursor cursor for\n\t// select __ROWID, src1_ID, src2_ID\n\t// from Q1_RES q_result\n\t// natural join\n\t// (\n\t// select r1.A as A, r1.__ROWID as src1_ID, r2.__ROWID as src2_ID\n\t// from R r1, R r2\n\t// where r1.B=r2.A\n\t// ) prov_query;\n\tbuffer.append(\"\\t declare prov_cursor cursor for\\n\");\n\tbuffer.append(\"\\t\\t select \" + Parameters.ROWID_ATT_NAME);\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\", src\" + i + \"_ID\");\n\t}\n\tbuffer.append(\"\\n\");\n\tbuffer.append(\"\\t\\t from \" + Parameters.QUERY_RESULT_PREFIX + qIndex\n\t\t+ Parameters.QUERY_RESULT_SUFFIX);\n\tbuffer.append(\" q_result\\n\");\n\tbuffer.append(\"\\t\\t natural join\\n\");\n\tbuffer.append(\"\\t\\t (\\n\");\n\t// the augmented query here:\n\tStringBuffer queryBuf = new StringBuffer(query);\n\tqueryBuf.insert(fromIndex, selectExtension); // right before the FROM\n\t\t\t\t\t\t // clause\n\tbuffer.append(\"\\t\\t \" + queryBuf + \"\\n\");\n\tbuffer.append(\"\\t\\t ) prov_query;\\n\\n\");\n\tbuffer.append(\"\\t declare continue handler for not found set done = 1;\\n\\n\");\n\tbuffer.append(\"\\t open prov_cursor;\\n\\n\");\n\tbuffer.append(\"\\t read_loop: loop\\n\\n\");\n\tbuffer.append(\"\\t\\t fetch prov_cursor into res_id_var\");\n\t// , src1_id_var, src2_id_var;\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\", src\" + i + \"_id_var\");\n\t}\n\tbuffer.append(\";\\n\\n\");\n\tbuffer.append(\"\\t\\t if done then leave read_loop;\\n\");\n\tbuffer.append(\"\\t\\t end if;\\n\\n\");\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\"\\t\\t insert ignore into PROV values (res_id_var,deriv_no,src\"\n\t\t + i + \"_id_var);\\n\");\n\t}\n\t// insert ignore into PROV values (res_id_var,deriv_no,src1_id_var);\n\t// insert ignore into PROV values (res_id_var,deriv_no,src2_id_var);\n\tbuffer.append(\"\\n\\t\\t set deriv_no = deriv_no + 1;\\n\\n\");\n\tbuffer.append(\"\\t end loop;\\n\\n\");\n\tbuffer.append(\"\\t close prov_cursor;\\n\\n\");\n\tbuffer.append(\"END\\n\");\n\treturn buffer;\n }", "private String buildSelect() {\r\n\t\tString select = \"select all_source.line, ' '||replace(all_source.TEXT,chr(9),' ')|| ' ' line from all_source where 2=2 \";\r\n\t\tString ownerCondition = \"\";\r\n\t\tString ownerInnerCondition = \"\";\r\n\t\tString beginProcedureCondition = \"\";\r\n\r\n\t\tif (!oraJdbcDTO.dbSchema.equals(\"\")) {\r\n\t\t\townerCondition = \" and all_source.OWNER = ? \";\r\n\t\t\townerInnerCondition = \" and all_source1.OWNER = ? \";\r\n\t\t}\r\n\t\tif (!oraJdbcDTO.packageName.equals(\"\")) {\r\n\t\t\t// Procedure in package\r\n\t\t\tbeginProcedureCondition = \"and all_source.name = ?\\n\"\r\n\t\t\t\t\t+ \"and all_source.TYPE = 'PACKAGE'\\n\"\r\n\t\t\t\t\t+ \"and all_source.line >=\\n\"\r\n\t\t\t\t\t+ \" (select min(all_source1.line)\\n\"\r\n\t\t\t\t\t+ \" from all_source all_source1 where 2=2 \"\r\n\t\t\t\t\t+ ownerInnerCondition\r\n\t\t\t\t\t+ \" and all_source1.name = ?\\n\"\r\n\t\t\t\t\t+ \" and all_source1.TYPE = 'PACKAGE'\\n\"\r\n\t\t\t\t\t+ \" and instr(upper(all_source1.TEXT), ?) > 0)\";\r\n\t\t\t;\r\n\t\t} else {\r\n\t\t\t// Single procedure or function\r\n\t\t\tbeginProcedureCondition = \"and all_source.name = ?\\n\"\r\n\t\t\t\t\t+ \"and all_source.TYPE in ('PROCEDURE','FUNCTION')\";\r\n\t\t}\r\n\t\tselect = select + beginProcedureCondition + \" and all_source.line >= ?\"\r\n\t\t\t\t+ ownerCondition + \" order by all_source.line\";\r\n\r\n\t\treturn select;\r\n\t}", "public synchronized static String lista_Dr_regt_equiparaciones() {\n String sql = \"Select a.eqp_sol_numero,a.solte_id,B.solte_nombre,a.eqp_carrera_continuar_est,c.smrprle_program_desc,a.eqp_grado_continuar,a.eqp_fecha_atencion_usuario,a.eqp_fecha_area_rec,a.eqp_fecha_envio_unidad,a.eqp_fecha_recepcion_final,a.eqp_total_pagar,a.eqp_estado,a.eqp_numero_sesion,a.eqp_fecha_sesion,a.eqp_observaciones,a.eqp_periodo, EXTRACT(YEAR FROM TO_DATE (sysdate)) annoActual, a.eqp_fecha_recepcion_orer,b.solte_apellidos_solicitante, b.Solte_nombre_solicitante, b.solte_seg_nombre_solicitante from DR_REGT_EQUIPARACIONES a inner join DR_REGT_SOLICITANTE B ON A.solte_id = B.solte_id inner join SMRPRLE c on REPLACE(a.eqp_carrera_continuar_est,'Ñ','N') = REPLACE(c.smrprle_program,'Ñ','N') WHERE EQP_ESTADO != 3 order by a.EQP_FECHA_ATENCION_USUARIO desc\";\n return (sql);\n }", "public String toString(){\n return \"Name: \"+this.name+\" Salary: \"+this.salary; // returning emp name and salary\r\n }", "String getObjectCheckSql(String name);", "public static String getFullSql(PreparedStatementEx pse) {\r\n if (null == pse) {\r\n return null;\r\n } else {\r\n return pse.getSql();\r\n }\r\n }", "public List<Employees>getEMPMenaning() {\n\tString sql = \"SELECT Id_employees, Name_and_surname, Password, Work_role FROM employees \";\n\t\n\tList<Employees>list = new ArrayList<Employees>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\n\t\twhile(resultSet.next()) {\n\t\t\tEmployees getEMPMenaning = new Employees();\n\t\t\tgetEMPMenaning.setIdEmployees(resultSet.getInt(\"Id_employees\"));\n\t\t getEMPMenaning.setNameAndSurname(resultSet.getString(\"Name_and_surname\"));\n\t\t getEMPMenaning.setPassword(resultSet.getString(\"Password\"));\n\t\t getEMPMenaning.setWorkRole(resultSet.getInt(\"Work_role\"));\n\t\t \n\t\t\tlist.add(getEMPMenaning);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n\n\n\t\n}", "private String getAutoIDEmployee(String adminID) throws SQLException{ \n String IDEmploy = null;\n String Dep = adminID.substring(2); // ADRD.TA\n IDEmploy += \"EM\" + Dep;\n \n // truy van lay thang ID cuoi cung theo phong ban\n \n Connection con = DriverManager.getConnection(url,user,pass);\n String query = \"select TOP 1 * from Employee where Employee.Admin_ID LIKE '%\"+Dep+\"%' order by Employee.Employee_ID desc\";\n PreparedStatement pst = con.prepareStatement(query);\n ResultSet rs = pst.executeQuery();\n rs.next();\n String IDLastFromDB = rs.getString(1);\n \n int IDNext = Integer.parseInt(IDLastFromDB.substring(8));\n String kq = \"\"; \n if (IDNext < 10){ \n kq += \"00\" + ++IDNext;\n } else kq += \"0\" + ++IDNext;\n return IDLastFromDB.substring(0, 7) + kq;\n }", "@Override\n\tprotected String getWhereConditionBaseOnIdRecord()\n\t{\n\t\tStringBuilder whereCondition = new StringBuilder(\"HBLNM='\");\n\t\twhereCondition.append(getMyDataModel().getLanguageCode());\n\t\twhereCondition.append(\"' and HBCFR='\");\n\t\twhereCondition.append(getMyDataModel().getFilePrefix());\n\t\twhereCondition.append(\"' and HBCFL='\");\n\t\twhereCondition.append(getMyDataModel().getFileKey());\n\t\twhereCondition.append(\"' \");\n\t\treturn whereCondition.toString();\n\t}", "public void query(String sql) throws SQLException {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(sql);\r\n\r\n while (rs.next()){\r\n System.out.println(rs.getInt(\"id\")+\" \"+rs.getString(\"name\")+\" \"+rs.getString(\"surname\")+\" \"+rs.getFloat(\"grade\"));\r\n }\r\n\r\n }", "public List<Employe> findByEnoGreaterThanEqualAndEnameEndingWithOrEsalBetween(int Eno,String name,float startSalary,float endSalary);", "public static void main(String[] args) {\n\t\tSystem.out.println(queryporder.querySum(0, 60));\n\t\tSystem.out.println(queryporder.queryName(\"郭靖\"));\n\t\tSystem.out.println(queryporder.queryAll());\n\t\t\n\t\t//List l = queryporder.queryAll();\n\t\t//List l = queryporder.querySum(0, 60);\n\t\tList l = queryporder.queryName(\"郭靖\");\n\t\tfor(Object o : l) {\n\t\t\tporder p = (porder)o;\n\t\t\tSystem.out.println(\n\t\t\t\tp.getId()+\",\"+\n\t\t\t\tp.getName()+\",\"+\n\t\t\t\tp.getProduct1()+\",\"+\n\t\t\t\tp.getProduct2()+\",\"+\n\t\t\t\tp.getProduct3()+\",\"+\n\t\t\t\tp.getSum()+\",\"+\n\t\t\t\tp.getDiscount()\n\t\t\t\t\t\n\t\t\t\t\t);\n\t\t}\n\t\t\n\t}", "private void searchex()\n {\n try\n {\n this.dtm.setRowCount(0);\n \n String a = \"date(now())\";\n if (this.jComboBox1.getSelectedIndex() == 1) {\n a = \"DATE_ADD( date(now()),INTERVAL 10 DAY)\";\n } else if (this.jComboBox1.getSelectedIndex() == 2) {\n a = \"DATE_ADD( date(now()),INTERVAL 31 DAY)\";\n } else if (this.jComboBox1.getSelectedIndex() == 3) {\n a = \"DATE_ADD( date(now()),INTERVAL 90 DAY)\";\n } else if (this.jComboBox1.getSelectedIndex() == 4) {\n a = \"DATE_ADD( date(now()),INTERVAL 180 DAY)\";\n }\n ResultSet rs = this.d.srh(\"select * from stock inner join product on stock.product_id = product.id where exdate <= \" + a + \" and avqty > 0 order by exdate\");\n while (rs.next())\n {\n Vector v = new Vector();\n v.add(rs.getString(\"product_id\"));\n v.add(rs.getString(\"name\"));\n v.add(rs.getString(\"stock.id\"));\n v.add(Double.valueOf(rs.getDouble(\"buyprice\")));\n v.add(Double.valueOf(rs.getDouble(\"avqty\")));\n v.add(rs.getString(\"exdate\"));\n this.dtm.addRow(v);\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "protected String generateQueryString(String where, String orderBy) {\r\n\t\tfinal StringBuffer sb = new StringBuffer(256);\r\n\t\tsb.append(\"FROM \"+Orders.class.getName());\r\n\t\tif (!Strings.isBlank(where)) {\r\n\t\t\tsb.append(\" WHERE \"+where);\r\n\t\t}\r\n\t\tif (!Strings.isBlank(orderBy)) {\r\n\t\t\tsb.append(\" ORDER BY \"+orderBy);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public String generate(){\n\t\tString result = null;\n\t\tKeyGenerator key = new KeyGenerator(name);\n\t\t\n\t\tArrayList<String> isThere = key.getEmployeesName();\n\t\tboolean found = isThere.contains(name);\n\t\t\n\t\tif(!found){\n\t\t\tkey.init();\n\t\t\tHashMap<String, String> getKey = key.getEmployee_Key();\n\t\t\tString value = getKey.get(name);\n\t\t\tresult = \"Id created: \"+value;\n\t\t\t\n\t\t\tString [] columnNames = {\n\t\t\t\t\t\"ID\", \"Name\",\"Salary\",\"Ot/Hour\",\"Industry\"\n\t\t\t};\n\t\t\t\n\t\t\tObject[][] profile = {\n\t\t\t\t\t{value,name,salary,ot,industry}\t\n\t\t\t};\n\t\t\t\n\t\t\t\n\t\t\tJTable table = new JTable(profile, columnNames);\n\t\t\twriteData(table,value);\n\t\t\t\n\t\t}else{\n\t\t\tresult = \"Name is already there\";\n\t\t}\n\t\t\n\t\t\n\t\treturn result;\n\t}", "private String searchAllViewerAccountSQL(){\n\t\tString sql = (\"SELECT username, type From viewer\");\n\t\tString addsql;\n\t\tif(!accountNameViewTextField.getText().equals(\"\")){\n\t\t\taddsql = \" WHERE username = \\'\" + accountNameViewTextField.getText() + \"\\'\";\n\t\t\tsql = sql + addsql;\n\t\t}\n\t\tSystem.out.println(sql);\n\t\treturn sql;\n\t}", "public String toString()\n\t//return employee values\n\t{\n\t\treturn \"Id \" + id + \" Start date \" + start + \" Salary \" + salary + super.toString() + \" Job Title \" + jobTitle;\n\t}", "String getWhereClause();", "public static void main(String[] args) {\n\t\t\n\t\temployeerecords e1 = new employeerecords(\"emp001\",\"John Smith\",\"IT\",150000);\n\t\temployeerecords e2 = new employeerecords(\"emp002\",\"Brenda Kein\",\"FINANCE\",250000);\n\t\temployeerecords e3 = new employeerecords(\"emp003\", \"Clark Hope\",\"HR\",100000);\n\t\temployeerecords e4 = new employeerecords(\"emp004\",\"Diane Garner\",\"IT\",200000);\n\t\temployeerecords e5 = new employeerecords(\"emp005\",\"Julian Aniston\",\"MARKETING\",125000);\n\t\t\n\t\t\n\t\tHashMap hm = new HashMap();\n\t\t\n\t\thm.put(1,e1);\n\t\thm.put(2,e2);\n\t\thm.put(3,e3);\n\t\thm.put(4,e4);\n\t\thm.put(5,e5);\n\t\t\n\t\tIterator trav = hm.entrySet().iterator();\n\t\t\n\t\twhile(trav.hasNext())\n\t\t{\n\t\t\t\n\t\tMap.Entry record = (Map.Entry)trav.next();\n\t\temployeerecords e=(employeerecords)record.getValue();\n\t\tSystem.out.print(record.getKey() + \" \");\n\t\tSystem.out.println(e.employeeid +\" \"+ e.employeename+\" \"+e.officedepartment+\" \"+e.empsalary);\n\t\t}\n\t}", "public String toString(){\n StringBuilder builder = new StringBuilder();\n builder.append(\"Employee :[ Name : \" + name + \", dept : \" + dept + \", salary :\"\n + salary+\", subordinates = \\n\");\n for(Employee e : this.subordinates) {\n builder.append(\"\\t\" + e + \"\\n\");\n }\n builder.append(\" ]\");\n return builder.toString();\n }", "public String enameGet(String emp_id) throws Exception;", "public static String selectDef60CA42CC2D6246D6AF02CFED573960F1_4(ConnectionProvider connectionProvider, String FIN_Payment_IDR) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT ( COALESCE(TO_CHAR(TO_CHAR(COALESCE(TO_CHAR(table2.DocumentNo), ''))), '') || ' - ' || COALESCE(TO_CHAR(TO_CHAR(table2.Paymentdate, 'DD-MM-YYYY')), '') || ' - ' || COALESCE(TO_CHAR(TO_CHAR(COALESCE(TO_CHAR(table3.Name), ''))), '') || ' - ' || COALESCE(TO_CHAR(TO_CHAR(COALESCE(TO_CHAR(table2.Amount), ''))), '') ) as FIN_Payment_ID FROM FIN_Payment left join (select FIN_Payment_ID, DocumentNo, Paymentdate, C_Bpartner_ID, Amount from FIN_Payment) table2 on (FIN_Payment.FIN_Payment_ID = table2.FIN_Payment_ID)left join (select C_BPartner_ID, Name from C_BPartner) table3 on (table2.C_Bpartner_ID = table3.C_BPartner_ID) WHERE FIN_Payment.isActive='Y' AND FIN_Payment.FIN_Payment_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n QueryTimeOutUtil.getInstance().setQueryTimeOut(st, SessionInfo.getQueryProfile());\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, FIN_Payment_IDR);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"fin_payment_id\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + Integer.toString(e.getErrorCode()) + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }", "public String asWhereClause() {\r\n LinkedList<String> whereClause = new LinkedList<>();\r\n \r\n if (noInduk != null && !noInduk.isEmpty())\r\n whereClause.add(noIndukColName + \" LIKE '%\" + noInduk + \"%'\");\r\n \r\n if (currentLevel != null)\r\n whereClause.add(currentLevelColName + \" LIKE '%\" + currentLevel.asWhereClause() + \"%'\");\r\n \r\n if (biodata != null){\r\n String wc = biodata.asWhereClause();\r\n if(wc != null && !wc.isEmpty())\r\n whereClause.add(wc);\r\n }\r\n \r\n if (tanggalMasuk != null)\r\n whereClause.add(tanggalMasukColName + \" LIKE '%\" + tanggalMasuk.asWhereClause(true) + \"%'\");\r\n \r\n if (tanggalLulus != null)\r\n whereClause.add(tanggalLulusColName + \" LIKE '%\" + tanggalLulus.asWhereClause(true) + \"%'\");\r\n if (gelombang != null)\r\n whereClause.add(gelombangColName + \" = '\" + gelombang + \"'\");\r\n if (statusPendaftaran != null)\r\n whereClause.add(statusPendaftaranColName + \" = '\" + statusPendaftaran + \"'\");\r\n if (lastUpdateDate != null)\r\n whereClause.add(lastUpdateDateColName + \" LIKE '%\" + lastUpdateDate.asWhereClause(true) + \"%'\");\r\n return whereClause.isEmpty()? \"\" : StringUtils.join(whereClause, \" AND \");\r\n }", "String getSqlForExternalTool(Alias alias, String sql, SqlParser parser);", "public String toString(){\r\n return getNumber() + \":\" + getLastName() + \",\" + getFirstName() + \",\" + \"Sales Employee\";\r\n }", "public static void main(String[] args) {\n\r\n\t\tEntityManager em = PersistanceManager.INSTANCE.getEntityManager();\r\n\t\tSystem.out.println(\"Print ALL\");\r\n\t\tQuery query = em.createQuery(\"FROM Employee e\");\r\n\t\tArrayList<Employee> result = (ArrayList<Employee>) query.getResultList();\r\n\t\tfor (Employee current : result)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print id = 3\");\r\n\t\tQuery query1 = em.createQuery(\"FROM Employee e where e.id=3\");\r\n\t\tArrayList<Employee> result1 = (ArrayList<Employee>) query1.getResultList();\r\n\t\tfor (Employee current : result1)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print Named Query \");\r\n\t\tArrayList<Employee> result2 = (ArrayList<Employee>) em.createNamedQuery(\"Employee.searchAll\").setParameter(\"empName\", \"D%\")\r\n\t\t\t\t.getResultList();\r\n\t\tfor (Employee current : result2)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t}", "public void queryTransactionDetail(){\n System.out.println(\"-----find transaction detail by condition-----\");\n System.out.println(\"--press enter to skip the input--\");\n String sql = \"select * from TransactionContains join Merchandise on TransactionContains.ProductID = Merchandise.ProductID where TransactionID=\";\n System.out.print(\"TransactionID: \");\n String unuse=scanner.nextLine();\n String id=scanner.nextLine();\n sql+=id;\n try {\n //System.out.println(sql);\n result = statement.executeQuery(sql);\n int cnt=0;\n while (result.next()) {\n cnt++;\n System.out.println(\"\\n=== No.\"+cnt+\" ===\");\n System.out.println(\"transaction id: \"+result.getInt(\"TransactionID\"));\n System.out.println(\"product id: \"+result.getInt(\"ProductID\"));\n System.out.println(\"product name: \"+result.getString(\"ProductName\"));\n System.out.println(\"actual price: \"+result.getDouble(\"ActualPrice\"));\n }\n System.out.println(\"Total rows: \"+cnt);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public SQLQuery _buildQuery(E event) throws SQLException, ErrorResponseException {\n withoutIdField = true;\n return buildQuery(event);\n }", "public String generateSQL(HttpServletRequest request)throws Exception \n\t{\n\t\t//boolean getLog=getQueryParameter(request.getQueryString(),\"searchMode\").contains(\"Log\");\n String SQLString=\"\";\n //String selectStr=\"\";\n\t\ttry {\n\t\t\tJSONObject searchCon=dealQS.condition2Json(request);\n\t\t\tdealQS.validateSearchConditon(searchCon);\n\t\t\t//String select=selectStr;\n\t\t\tList<String> tables=dealQS.getTables(searchCon);\n\t\t\tString condition=dealQS.getWhereCondition(searchCon);\n\t\t\tif(tables.size()==1) \n\t\t\t{\n\t\t\t\tSQLString=\"SELECT COUNT(*) FROM \"+tables.get(0);\n\t\t\t\tif(!condition.isEmpty()) {\n\t\t\t\t\tSQLString+=\" WHERE \"+condition;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t//for(String table:tables) \n\t\t\t\tfor(int i=0;i<tables.size();i++)\n\t\t\t\t{\n\t\t\t\t\t//selectStr=\"SELECT sql_calc_found_rows Slot,Record_Time,PC_Name\";\n\t\t\t\t\tif(!condition.isEmpty()) {\n\t\t\t\t\t\tSQLString+=\"(SELECT COUNT(*) FROM \"+tables.get(i)+\" WHERE \"+condition+\")\";\n\t\t\t\t\t}else {\n\t\t\t\t\t\tSQLString+=\"(SELECT COUNT(*) FROM \"+tables.get(i)+\")\";\n\t\t\t\t\t}\n\t\t\t\t\tif (i!=tables.size()-1) {\n\t\t\t\t\t\tSQLString+=\"+\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSQLString=\"SELECT(\"+SQLString+\") AS sum_count\";\n\t\t\t}\n\t\t}catch(Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t\treturn SQLString;\n\t}", "public String getQuery()\n {\n /**\n * gets mouse marker information from MGD\n\t * includes interim and official nomenclature only\n */\n String stmt = \"select a.accID, m.symbol, m.name, m.chromosome, \" +\n \"t.name as type, a._Object_key \" +\n \"from ACC_Accession a, MRK_Marker m, MRK_Types t \" +\n \"where m._Organism_key = 1 \" +\n \"and m._Marker_Status_key = 1 \" +\n \"and m._Marker_key = a._Object_key \" +\n \"and a._MGIType_key = 2 \" +\n \"and a._LogicalDB_key = 1 \" +\n \"and a.prefixPart = 'MGI:' \" +\n \"and a.preferred = 1 \" +\n \"and m._Marker_Type_key = t._Marker_Type_key\";\n return stmt;\n }", "public ResultSet retrivecompname(String compname)throws Exception {\n\trs=DbConnect.getStatement().executeQuery(\"select compname from company where comp_id=\"+compname+\"\");\r\n\treturn rs;\r\n}", "public static void main(String[] args) throws ClassNotFoundException, SQLException {\n \tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n \t\n \t//2. Baglanti olusturmaliyiz\n \tString url = \"jdbc:oracle:thin:@localhost:1521/xe\";\n \tString kullanici = \"hr\";\n \tString sifre = \"hr\";\n \tConnection con = DriverManager.getConnection(url, kullanici, sifre);\n \t\n \t//3. SQL komutlari icin bir Statement nesnesi olustur\n \tStatement st = con.createStatement();\n \t\n \t//4. Bolumler tablosundaki tum kayitlari listeleyen bir sorgu\n \tString selectQuery = \"SELECT * FROM bolumler\";\n \tResultSet tablo1 = st.executeQuery(selectQuery);\n \t\n \t//5.\n \twhile(tablo1.next()) {\n \t\tSystem.out.println(tablo1.getInt(1)+ \" \" \n \t\t\t\t\t\t + tablo1.getString(2) + \" \"\n \t\t\t\t\t\t +tablo1.getString(3));\n \t}\n \t\n \tSystem.out.println(\"=========================\");\n \t/*=======================================================================\n \t\t\t ORNEK2: SATIS ve MUHASABE bolumlerinde calisan personelin isimlerini ve \n \t \t\t maaslarini maas sirali olarak listeleyiniz\n \t\t\t========================================================================*/\n \tString q2 = \"SELECT personel_isim, maas\"\n \t\t\t+ \" FROM personel\"\n \t\t\t+ \" WHERE bolum_id IN(10,30)\"\n \t\t\t+ \" ORDER BY maas DESC\";\n \t\n \tResultSet tablo2 = st.executeQuery(q2);\n \n \twhile(tablo2.next()) {\n \t\tSystem.out.println(\"Isim: \" + tablo2.getString(1)+ \"\\t\" \n \t\t\t\t\t\t+ \"Maas : \" + tablo2.getInt(2));\n \t} \t\n \t\nSystem.out.println(\"=========================================\");\n\t\t\n\t\t/*=======================================================================\n\t\t ORNEK 3: Tüm bolumlerde calisan personelin isimlerini, bolum isimlerini \n\t\t ve maaslarini, bolum ve maas siraali listeleyiniz. NOT: calisani olmasa \n\t\t bile bolum ismi gosterilmelidir.\n\t\t========================================================================*/\n\t\t\n\t\tString q3 = \"SELECT b.bolum_isim, p.personel_isim, p.maas\"\n\t\t\t\t+ \" FROM personel p\"\n\t\t\t\t+ \" FULL JOIN bolumler b\"\n\t\t\t\t+ \" ON b.bolum_id = p.bolum_id\"\n\t\t\t\t+ \" ORDER BY b.bolum_isim, p.maas\";\n\t\tResultSet sonuc1 = st.executeQuery(q3);\n\t\t\n\t\twhile(sonuc1.next()) {\n\t\t\tSystem.out.println(sonuc1.getString(1)+ \"\\t\" + sonuc1.getString(2) + \"\\t\" + sonuc1.getInt(3));\n\t\t}\n\t\t\t\t\n\t\tSystem.out.println(\"=====================================================\");\n\t\t\n\t\t\n\t\t/*=======================================================================\n\t\t\t\t ORNEK 4: Maasi en yuksek 10 kisinin bolumunu,adini ve maasini listeyiniz\n\t\t========================================================================*/\n\n\t\tString q4 =\"SELECT b.bolum_isim, p.personel_isim, p.maas\"\n\t\t\t\t+ \" FROM personel p\"\n\t\t\t\t+ \" JOIN bolumler b\"\n\t\t\t\t+ \" ON b.bolum_id = p.bolum_id\"\n\t\t\t\t+ \" ORDER BY p.maas DESC\"\n\t\t\t\t+ \" FETCH NEXT 10 ROWS ONLY\";\n\t\t\n\t\t\n\t\tResultSet sonuc2 = st.executeQuery(q4);\n\t\t\n\t\twhile(sonuc2.next()) {\n\t\t\tSystem.out.println(sonuc2.getString(1)+ \" \" + sonuc2.getString(2) + \" \" + sonuc2.getInt(3));\n\t\t}\n \t\n \t//6. Olusturlan nesneleri silelim\n\t\tcon.close();\n\t\tst.close();\n\t\ttablo1.close();\n\t\tsonuc1.close();\n\t\tsonuc2.close();\n \ttablo2.close();\n \t\n\n\t}", "@Override\n\tprotected String getWhereConditionBaseOnIdRecord()\n\t{\n\t\tStringBuilder whereCondition = new StringBuilder(\"GAZOID='\");\n\t\twhereCondition.append(getMyDataModel().getOptionId());\n\t\twhereCondition.append(\"'and GAZFLD='\");\n\t\twhereCondition.append(getMyDataModel().getFieldId());\n\t\twhereCondition.append(\"'and GAZPVN='\");\n\t\twhereCondition.append(getMyDataModel().getPvId());\n\t\twhereCondition.append(\"'and GAZTYP='\");\n\t\twhereCondition.append(getMyDataModel().getType());\n\t\twhereCondition.append(\"'\");\n\t\treturn whereCondition.toString();\n\t}", "public List<Employee> selectAllEmployee() {\n\n\t\t// using try-with-resources to avoid closing resources (boiler plate code)\n\t\tList<Employee> emp = new ArrayList<>();\n\t\t// Step 1: Establishing a Connection\n\t\ttry (Connection connection = dbconnection.getConnection();\n\n\t\t\t\t// Step 2:Create a statement using connection object\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(SELECT_ALL_employe);) {\n\t\t\tSystem.out.println(preparedStatement);\n\t\t\t// Step 3: Execute the query or update query\n\t\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\t\t// Step 4: Process the ResultSet object.\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString employeename = rs.getString(\"employeename\");\n\t\t\t\tString address = rs.getString(\"address\");\n\t\t\t\tint mobile = rs.getInt(\"mobile\");\n\t\t\t\tString position = rs.getString(\"position\");\n\t\t\t\tint Salary = rs.getInt(\"Salary\");\n\t\t\t\tString joineddate = rs.getString(\"joineddate\");\n\t\t\t\tString filename =rs.getString(\"filename\");\n\t\t\t\tString path = rs.getString(\"path\");\n\t\t\t\temp.add(new Employee(id, employeename, address, mobile, position, Salary, joineddate,filename,path));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tdbconnection.printSQLException(e);\n\t\t}\n\t\treturn emp;\n\t}", "public ResultSet edComp(String login_id)throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.comp_id,c.compname,c.address,c.city,c.state,c.offno,c.faxno,c.website,c.email from login l,company c where l.login_id=c.login_id and l.login_id=\"+login_id+\"\");\r\n\treturn rs;\r\n}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Name is \" + empName + \"\\nEmp ID is \" + empID + \"\\nIncome=\" + annualIncome + \"\\nIncome Tax=\" + incomeTax\r\n\t\t\t\t+ \"\";\r\n\t}", "String queryInformation(String tableName,String queryname){\n Connection con = GetDBConnection.connectDB(\"booklibrarymanager\",\"root\",\"HanDong85\");\n String tar;\n if(tableName.equals(\"authorinformation\"))\n tar = \"author\";\n else if(tableName.equals(\"classificationinformation\"))\n tar = \"classification\";\n else tar = \"press\";\n String sql = \"select \" + tar + \"Id\" + \" from \" + tableName + \" where \";\n if(tableName.equals(\"authorinformation\"))\n sql += \"authorName = ?;\";\n else if(tableName.equals(\"classificationinformation\"))\n sql += \"classifcationName = ?;\";\n else sql += \"pressName = ?;\";\n System.out.println(sql);\n PreparedStatement preSQL;\n try{\n preSQL = con.prepareStatement(sql);\n preSQL.setString(1,queryname);\n ResultSet rs = preSQL.executeQuery();\n rs.beforeFirst();\n if(rs.next()){\n String ans = rs.getString(1);\n GetDBConnection.closeCon(con);\n return ans;\n }\n else{\n GetDBConnection.closeCon(con);\n return ERROR_TIP;\n }\n }\n catch (SQLException e){\n GetDBConnection.closeCon(con);\n return ERROR_TIP;\n }\n }", "private String getUnionQuery(TaxChallan taxChallan,Object[][] tdsParameter, String ledgerCode) {\r\n\t\t\r\n\t\tString salaryQuery = \"\";\r\n\t\tString arrearstQuery = \"\";\r\n\t\tString settlementQuery = \"\";\r\n\t\t//String allowanceQuery = \"\";\r\n\t\tString challanQuery = \"\";\r\n\t\tString bonusQuery = \"\";\r\n\t\tString leaveEncashmentQuery = \"\";\r\n\t\tString OverTimeQuery = \"\";\r\n\t\t//-------------------------Start of query---------------------------------------\r\n\t\ttry{\r\n\t\tchallanQuery = \"SELECT EMPID, ETOKEN, ENAME, TO_CHAR(SUM(AMT),9999999990.99) FROM ( \";\r\n\t\t\r\n\t\t\tif(ledgerCode != null && ledgerCode.length() > 0){\r\n\t\t\t\t/**\r\n\t\t\t\t * Query for Salary\r\n\t\t\t\t */\r\n\t\t\t\tsalaryQuery=\"SELECT DISTINCT HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\".EMP_ID AS EMPID,EMP_TOKEN AS ETOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME AS ENAME \"\r\n\t\t\t\t+\" ,TO_CHAR(SUM(NVL(SAL_AMOUNT,0)),9999999990.99) AS AMT \"\r\n\t\t\t\t+\" FROM HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\" \"\r\n\t\t\t\t+\" INNER JOIN HRMS_EMP_OFFC ON HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\".EMP_ID = HRMS_EMP_OFFC.EMP_ID \" \r\n\t\t\t\t+\" INNER JOIN HRMS_SALARY_\"+taxChallan.getYear()+\" ON (HRMS_SALARY_\"+taxChallan.getYear()+\".EMP_ID = HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\".EMP_ID \" \r\n\t\t\t\t+\" and HRMS_SALARY_\"+taxChallan.getYear()+\".SAL_LEDGER_CODE = HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\".SAL_LEDGER_CODE) \"\r\n\t\t\t\t+\" WHERE HRMS_SALARY_\"+taxChallan.getYear()+\".SAL_DIVISION=\"+taxChallan.getDivId()+\" AND SAL_DEBIT_CODE=\"+String.valueOf(tdsParameter[0][0])+\" AND SAL_LEDGER_CODE IN(\"+ledgerCode+\") \" +\r\n\t\t\t\t \" AND HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\".EMP_ID NOT IN(SELECT EMP_ID FROM HRMS_TAX_CHALLAN_DTL \"\r\n\t\t\t\t+\" INNER JOIN HRMS_TAX_CHALLAN ON (HRMS_TAX_CHALLAN.CHALLAN_CODE = HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE ) \"\r\n\t\t\t\t+\" WHERE CHALLAN_MONTH = \"+taxChallan.getMonth()+\" AND CHALLAN_YEAR=\"+taxChallan.getYear()+\" AND CHALLAN_DIVISION_ID=\"+taxChallan.getDivId()+\")\";\r\n\t\t\t\tlogger.info(\"taxChallan.getOnHold()======\"+taxChallan.getOnHold());\r\n\t\t\t\tif(taxChallan.getOnHold().equals(\"Yes\")){\r\n\t\t\t\t\tsalaryQuery += \" AND SAL_ONHOLD='Y' \";\r\n\t\t\t\t} //end of if\r\n\t\t\t\telse if(taxChallan.getOnHold().equals(\"No\")){\r\n\t\t\t\t\tsalaryQuery += \" AND SAL_ONHOLD='N' \";\r\n\t\t\t\t} //end of else if\r\n\t\t\t\tsalaryQuery+=\" GROUP BY HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\".EMP_ID,EMP_TOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME \";\r\n\t\t\t\t\r\n\t\t\t} //end of ledgerCode if\r\n\t\t\t\r\n\t\t\tchallanQuery +=salaryQuery;\r\n\t\t\tif(taxChallan.getIncludeArrears().equals(\"true\")){\r\n\t\t\t\tif(taxChallan.getIncludeSalary().equals(\"true\")){\r\n\t\t\t\t\tarrearstQuery +=\" UNION \";\r\n\t\t\t\t} //end of if\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Query for Arrears \r\n\t\t\t */\r\n\t\t\tarrearstQuery +=\" SELECT ARREARS_EMP_ID AS EMPID,EMP_TOKEN AS ETOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME AS ENAME, \"\r\n\t\t\t\t+\" TO_CHAR(SUM(NVL(ARREARS_AMT,0)),9999999990.99) AS AMT \"\r\n\t\t\t\t+\" FROM HRMS_ARREARS_DEBIT_\"+taxChallan.getYear()+\" \"\r\n\t\t\t\t+\" INNER JOIN HRMS_DEBIT_HEAD ON HRMS_DEBIT_HEAD.DEBIT_CODE = HRMS_ARREARS_DEBIT_\"+taxChallan.getYear()+\".ARREARS_DEBIT_CODE \" \r\n\t\t\t\t+\" INNER JOIN HRMS_EMP_OFFC ON HRMS_ARREARS_DEBIT_\"+taxChallan.getYear()+\".ARREARS_EMP_ID = HRMS_EMP_OFFC.EMP_ID \"\r\n\t\t\t\t+\" WHERE ARREARS_CODE IN (SELECT ARREARS_CODE FROM HRMS_ARREARS_LEDGER WHERE ARREARS_PAID_MONTH = \"+taxChallan.getMonth()+\" \" \r\n\t\t\t\t+\" AND ARREARS_PAID_YEAR = \"+taxChallan.getYear()+\" AND ARREARS_DIVISION = \"+taxChallan.getDivId()+\") AND ARREARS_DEBIT_CODE = \"+String.valueOf(tdsParameter[0][0])+\" \" +\r\n\t\t\t\t \" AND ARREARS_EMP_ID NOT IN (SELECT EMP_ID FROM HRMS_TAX_CHALLAN_DTL \"\r\n\t\t\t\t+\" INNER JOIN HRMS_TAX_CHALLAN ON (HRMS_TAX_CHALLAN.CHALLAN_CODE = HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE AND CHALLAN_ARREARS_FLAG='Y') \"\r\n\t\t\t\t+\" WHERE CHALLAN_MONTH = \"+taxChallan.getMonth()+\" AND CHALLAN_YEAR=\"+taxChallan.getYear()+\" AND CHALLAN_DIVISION_ID=\"+taxChallan.getDivId()+\") \"\r\n\t\t\t\t+\" GROUP BY ARREARS_EMP_ID,EMP_TOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME \";\r\n\t\t\t\r\n\t\t} //end of includeArrears if\r\n\t\t\t\r\n\t\t\tchallanQuery +=arrearstQuery;\r\n\t\t\tif(taxChallan.getIncludeSettlement().equals(\"true\")){\r\n\t\t\t\tif(taxChallan.getIncludeSalary().equals(\"true\")){\r\n\t\t\t\t\tsettlementQuery +=\" UNION \";\r\n\t\t\t\t} //end of if\r\n\t\t\t\tsettlementQuery += \" SELECT SETTL_ECODE AS EMPID,EMP_TOKEN AS ETOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME AS ENAME, \"\r\n\t\t\t\t+\" TO_CHAR(SUM(NVL(SETTL_AMT,0)),9999999990.99)+TO_CHAR(nvl((SETTL_TAX_AMT),0),9999999990.99) AS AMT FROM HRMS_SETTL_DEBITS \"\r\n\t\t\t\t+\" INNER JOIN HRMS_SETTL_HDR ON (HRMS_SETTL_HDR.SETTL_CODE = HRMS_SETTL_DEBITS.SETTL_CODE) \"\r\n\t\t\t\t+\" INNER JOIN HRMS_EMP_OFFC ON (HRMS_EMP_OFFC.EMP_ID = HRMS_SETTL_HDR.SETTL_ECODE) \"\r\n\t\t\t\t+\" INNER JOIN HRMS_RESIGN ON (HRMS_RESIGN.RESIGN_CODE = HRMS_SETTL_HDR.SETTL_RESGNO) \" \r\n\t\t\t\t+\" WHERE (SETTL_MTH_TYPE IN ('OH','CO')) AND RESIGN_WITHDRAWN = 'N' AND EMP_DIV = \"+taxChallan.getDivId()+\" \"\r\n\t\t\t\t+\" AND TO_CHAR(SETTL_SETTLDT,'MM')=\"+taxChallan.getMonth()+\" AND TO_CHAR(SETTL_SETTLDT,'YYYY')=\"+taxChallan.getYear()+\" \"\r\n\t\t\t\t+\" AND SETTL_DEBIT_CODE=\"+String.valueOf(tdsParameter[0][0])+\" \" +\r\n\t\t\t\t \" AND SETTL_ECODE NOT IN (SELECT EMP_ID FROM HRMS_TAX_CHALLAN_DTL \"\r\n\t\t\t\t+\" INNER JOIN HRMS_TAX_CHALLAN ON (HRMS_TAX_CHALLAN.CHALLAN_CODE = HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE) \"\r\n\t\t\t\t+\" WHERE CHALLAN_MONTH = \"+taxChallan.getMonth()+\" AND CHALLAN_YEAR=\"+taxChallan.getYear()+\" AND CHALLAN_DIVISION_ID=\"+taxChallan.getDivId()+\") \" \r\n\t\t\t\t+\" GROUP BY SETTL_ECODE,EMP_TOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,SETTL_TAX_AMT \";\r\n\t\t\t\t\r\n\t\t\t} //end of includeSettlement if\r\n\t\t\t\r\n\t\t\tchallanQuery +=settlementQuery;\r\n\t\t\t\r\n\t\t\t/*if(taxChallan.getIncludeAllowance().equals(\"true\")){\r\n\t\t\t\ttaxChallan.setHidIncludeAllow(\"true\");\r\n\t\t\t\tif(taxChallan.getIncludeSalary().equals(\"true\") || taxChallan.getIncludeSettlement().equals(\"true\")){\r\n\t\t\t\t\tallowanceQuery +=\" UNION \";\r\n\t\t\t\t} //end of if\r\n\t\t\t\tallowanceQuery += \" SELECT HRMS_ALLOWANCE_EMP_DTL.ALLW_EMP_ID AS EMPID,EMP_TOKEN AS ETOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME AS ENAME, \"\r\n\t\t\t\t+\" NVL(SUM(ALLW_TAX_AMT),0) AS AMT \"\r\n\t\t\t\t+\" FROM HRMS_ALLOWANCE_HDR \"\r\n\t\t\t\t+\" INNER JOIN HRMS_ALLOWANCE_EMP_DTL ON (HRMS_ALLOWANCE_EMP_DTL.ALLW_ID = HRMS_ALLOWANCE_HDR.ALLW_ID) \"\r\n\t\t\t\t+\" INNER JOIN HRMS_EMP_OFFC ON (HRMS_EMP_OFFC.EMP_ID = HRMS_ALLOWANCE_EMP_DTL.ALLW_EMP_ID) \"\r\n\t\t\t\t+\" INNER JOIN HRMS_CREDIT_HEAD ON (HRMS_CREDIT_HEAD.CREDIT_CODE = HRMS_ALLOWANCE_HDR.ALLW_CREDIT_HEAD) \"\r\n\t\t\t\t+\" AND TO_CHAR(ALLW_PROCESS_DATE,'MM')=\"+taxChallan.getMonth()+\" \"\r\n\t\t\t\t+\" AND TO_CHAR(ALLW_PROCESS_DATE,'YYYY')=\"+taxChallan.getYear()+\" \" \r\n\t\t\t\t+\" AND HRMS_ALLOWANCE_HDR.ALLW_DIVISION = \"+taxChallan.getDivId()+\" \" +\r\n\t\t\t\t \" AND HRMS_ALLOWANCE_EMP_DTL.ALLW_EMP_ID NOT IN (SELECT EMP_ID FROM HRMS_TAX_CHALLAN_DTL \"\r\n\t\t\t\t+\" INNER JOIN HRMS_TAX_CHALLAN ON (HRMS_TAX_CHALLAN.CHALLAN_CODE = HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE) \"\r\n\t\t\t\t+\" WHERE CHALLAN_MONTH = \"+taxChallan.getMonth()+\" AND CHALLAN_YEAR=\"+taxChallan.getYear()+\" AND CHALLAN_DIVISION_ID=\"+taxChallan.getDivId()+\") \"\r\n\t\t\t\t+\" GROUP BY HRMS_ALLOWANCE_EMP_DTL.ALLW_EMP_ID,EMP_TOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME \";\r\n\t\t\t\t\r\n\t\t\t} //end of includeAllowance if\r\n\t\t\t\r\n\t\t\tchallanQuery +=allowanceQuery;*/\r\n\t\t\tif(taxChallan.getIncludeBonus().equals(\"true\")){\r\n\t\t\t\tif(taxChallan.getIncludeSalary().equals(\"true\")){\r\n\t\t\t\t\tbonusQuery +=\" UNION \";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbonusQuery += \" SELECT HRMS_BONUS_EMP.EMP_ID AS EMPID, NVL(EMP_TOKEN,' ') AS ETOKEN, NVL(EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,' ') AS ENAME, TO_CHAR(SUM(NVL(HRMS_BONUS_EMP.BONUS_TAX_AMT,0)),9999999990.99) AS AMT\" \r\n\t\t\t\t\t+ \" FROM HRMS_BONUS_EMP \"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_BONUS_HDR ON (HRMS_BONUS_HDR.BONUS_CODE = HRMS_BONUS_EMP.BONUS_CODE)\"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_EMP_OFFC ON (HRMS_EMP_OFFC.EMP_ID = HRMS_BONUS_EMP.EMP_ID)\"\r\n\t\t\t\t\t+ \" WHERE HRMS_BONUS_HDR.DIV_CODE=\"+taxChallan.getDivId()+\" AND HRMS_BONUS_HDR.PAY_MONTH=\"+taxChallan.getMonth()+\" AND HRMS_BONUS_HDR.PAY_YEAR = \"+taxChallan.getYear()\r\n\t\t\t\t\t+ \" AND HRMS_BONUS_HDR.PAY_IN_SAL='N' AND HRMS_BONUS_HDR.DEDUCT_TAX='Y'\"\r\n\t\t\t\t\t+ \" GROUP BY HRMS_BONUS_EMP.EMP_ID, NVL(EMP_TOKEN,' '), NVL(EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,' ')\";\r\n\t\t\t\t\r\n\t\t\t} \r\n\t\t\tchallanQuery +=bonusQuery;\r\n\t\t\t\r\n\t\t\tif(taxChallan.getIncludeLeaveEncashment().equals(\"true\")){\r\n\t\t\t\tif(taxChallan.getIncludeSalary().equals(\"true\")){\r\n\t\t\t\t\tleaveEncashmentQuery +=\" UNION \";\r\n\t\t\t\t}\r\n\t\t\t\tleaveEncashmentQuery += \" SELECT HRMS_ENCASHMENT_PROCESS_DTL.EMP_ID AS EMPID, NVL(EMP_TOKEN,' ') AS ETOKEN, NVL(EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,' ') AS ENAME, TO_CHAR(SUM(NVL(ENCASHMENT_TDS_AMOUNT,0)),9999999990.99) AS AMT\"\r\n\t\t\t\t\t+ \" FROM HRMS_ENCASHMENT_PROCESS_DTL \"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_EMP_OFFC ON (HRMS_EMP_OFFC.EMP_ID = HRMS_ENCASHMENT_PROCESS_DTL.EMP_ID) \"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_ENCASHMENT_PROCESS_HDR ON (HRMS_ENCASHMENT_PROCESS_HDR.ENCASHMENT_PROCESS_CODE = HRMS_ENCASHMENT_PROCESS_DTL.ENCASHMENT_PROCESS_CODE)\"\r\n\t\t\t\t\t+ \" WHERE HRMS_ENCASHMENT_PROCESS_HDR.ENCASHMENT_PROCESS_DIVISION =\"+taxChallan.getDivId()+\" AND HRMS_ENCASHMENT_PROCESS_HDR.ENCASHMENT_INCLUDE_SAL_MONTH = \"+taxChallan.getMonth()\r\n\t\t\t\t\t+ \" AND HRMS_ENCASHMENT_PROCESS_HDR.ENCASHMENT_INCLUDE_SAL_YEAR= \"+taxChallan.getYear()+\" AND HRMS_ENCASHMENT_PROCESS_HDR.ENCASHMENT_INCLUDE_SAL_FLAG = 'N'\"\r\n\t\t\t\t\t+ \" GROUP BY HRMS_ENCASHMENT_PROCESS_DTL.EMP_ID, NVL(EMP_TOKEN,' '), NVL(EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,' ')\";\r\n\r\n\t\t\t} \r\n\t\t\tchallanQuery +=leaveEncashmentQuery;\r\n\t\t\t\r\n\t\t\tif(taxChallan.getIncludeOverTime().equals(\"true\")){\r\n\t\t\t\tif(taxChallan.getIncludeSalary().equals(\"true\")){\r\n\t\t\t\t\tOverTimeQuery +=\" UNION \";\r\n\t\t\t\t}\r\n\t\t\t\tOverTimeQuery += \"\";\r\n\t\t\t} \r\n\t\t\tchallanQuery +=OverTimeQuery;\r\n\t\t\t\r\n\t\t\tchallanQuery +=\" ) GROUP BY EMPID, ETOKEN, ENAME\";\r\n\t\t}catch(Exception e){\r\n\t\t\tlogger.error(\"exception in union challan query\",e);\r\n\t\t} //end of catch\r\n\t\treturn challanQuery;\r\n\t}", "private static void testOracle7() throws Exception {\n\t\tClass.forName(\"jdbc.driver.oracle.Oracle7Driver\");\r\n\t\t//DriverManager.registerDriver(new Oracle7Driver());\r\n\r\n\t\t// Connect to the local database\r\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:oracle:thin:@192.168.5.168:1521:RT\", \"stdba\", \"stdba\");\r\n\r\n\t\t// Query the employee names\r\n\t\tStatement stmt = conn.createStatement();\r\n\t\t// stmt.execute(\"create table TEST1(A1 VARCHAR2(50) NOT NULL,A2 DATE, A3 NUMBER(10,2))\");\r\n\t\t// ResultSet rset = stmt.executeQuery(\"SELECT owner, table_name FROM dba_tables\");\r\n\r\n\t\t// String sql = \"SELECT column_name FROM cols WHERE table_name LIKE 'AA%'\";\r\n\t\tResultSet rset = stmt.executeQuery(\"select STAGE_NO,CLIENT_NO,POINT_START,POINT_ADD,POINT_USE from CLIENT_BONUS where STAGE_NO=2012 and CLIENT_NO=1056\");\r\n\t\t// ResultSet rset = stmt.executeQuery(sql);\r\n\t\t// Print the name out\r\n\t\twhile (rset.next())\r\n\t\t\tSystem.out.println(rset.getString(1));\r\n\r\n\t\t// System.out.println(rset.getString(1) + \":\" + rset.getString(2));\r\n\r\n\t}", "private GeneralQueryFormat createQueryFromRow(int rowNum) {\n String fname = this.employee_first_name.get(rowNum);\n String lname = this.employee_last_name.get(rowNum);\n String mname = this.employee_middle_initial.get(rowNum);\n String ssn = this.employee_ssn.get(rowNum);\n String address = this.employee_address.get(rowNum);\n String address2 = this.employee_address2.get(rowNum);\n String city = this.employee_city.get(rowNum);\n String state = this.employee_state.get(rowNum);\n String zip = this.employee_zip.get(rowNum);\n String phone = this.employee_phone.get(rowNum);\n String phone2 = this.employee_phone2.get(rowNum);\n String pager = this.employee_pager.get(rowNum);\n String cell = this.employee_cell.get(rowNum);\n String email = this.employee_email.get(rowNum);\n String bdate = this.employee_birthdate.get(rowNum);\n String branchId = this.branch.getBranchId() + \"\";\n String hireDate = this.employee_hire_date.get(rowNum);\n \n ssn = ssn.replaceAll(\"-\", \"\");\n if(bdate.equals(\"\")) bdate = \"01/01/1000\";\n if(hireDate.equals(\"\")) hireDate = \"NOW()\";\n \n employee_save_query query = new employee_save_query();\n query.setCompany(company.getName());\n //query.update(fname, lname, mname, phone, phone2, cell, pager, address, address2, city, state, zip, ssn, email, hireDate, \"2100-10-10\",\n // \"(CASE WHEN (SELECT (MAX(employee_id) + 1) From employee) IS NULL THEN 1 ELSE (SELECT (MAX(employee_id) + 1) From employee) END)\",\n // \"0\", false, bdate, this.branch.getId());\n return query;\n }", "public String patientsOn10A(){\n String sql = \"SELECT a.patient_id \" +\n \" FROM orders a \" +\n \" JOIN drug_order b ON(a.order_id=b.order_id) \" +\n \" JOIN drug c ON(b.drug_inventory_id=c.drug_id) \" +\n \" JOIN cpad_regimen_drug d ON(c.drug_id=d.drug_id) \" +\n \" JOIN cpad_regimen e ON(d.regimen_id=e.regimen_id) \" +\n \" WHERE (e.name='10A=AZT(300)+DDL(125)+IDV/r (400/100)')\"+\n \" and a.date_created between (:startDate) and (:endDate) \";\n\n return sql;\n }", "@Override\n public String toString() {\n String s = this.empID + \",\" + this.lastName + \",\" + this.firstName;\n s += String.format(\",%09d\", this.ssNum);\n s += \",\" + HRDateUtils.dateToStr(this.hireDate);\n s += String.format(\",%.2f\", this.salary);\n return s;\n\n }" ]
[ "0.6315347", "0.5877575", "0.5808197", "0.5642161", "0.5600146", "0.5599386", "0.5560383", "0.548501", "0.5474146", "0.5464948", "0.53933537", "0.53675747", "0.53298366", "0.532935", "0.5299481", "0.5290981", "0.52894413", "0.5272645", "0.5267781", "0.526551", "0.5234872", "0.5213705", "0.5207772", "0.5178304", "0.51618147", "0.513198", "0.51312834", "0.5127762", "0.51274496", "0.51150763", "0.5103821", "0.50992674", "0.50988454", "0.50780743", "0.50671583", "0.50593084", "0.50591487", "0.50517404", "0.5038862", "0.5036845", "0.5031135", "0.5028006", "0.5024534", "0.5023304", "0.5021659", "0.5010105", "0.4985889", "0.49746618", "0.49466455", "0.49432996", "0.4938041", "0.49355012", "0.49227512", "0.49180257", "0.4896735", "0.48951253", "0.48793128", "0.48786527", "0.48742494", "0.4873212", "0.4872318", "0.48708466", "0.48687837", "0.48680618", "0.48555267", "0.4853809", "0.48423123", "0.48331502", "0.48318872", "0.48283535", "0.4826749", "0.4826285", "0.48255095", "0.48129782", "0.4807162", "0.48069385", "0.4802078", "0.48014924", "0.47945055", "0.47923476", "0.47863635", "0.47832713", "0.47826767", "0.4781439", "0.47791952", "0.47775602", "0.47717118", "0.47558004", "0.47497597", "0.47468522", "0.47465047", "0.47459808", "0.4745389", "0.47356328", "0.4733729", "0.47239313", "0.47231904", "0.4721783", "0.4718806", "0.47174054" ]
0.50433815
38
SELECT ENO,ENAME,EADD,SALFROM EMPLOYE WHERE ESAL BETWEEN ? AND ?
public List<Employe> findByEsalBetween(float startSal,float endSal);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Employe> findByEnoGreaterThanEqualAndEnameEndingWithOrEsalBetween(int Eno,String name,float startSalary,float endSalary);", "@WebMethod\n public List<Employee> getEmployeesBySalary(@WebParam(name = \"arg0\") int emp_sal) {\n Connection conn = null;\n List<Employee> emplyeeList = new ArrayList<Employee>();\n try {\n conn = EmpDBUtil.getConnection();\n PreparedStatement pStmt = conn.prepareStatement(\"select * from EMPLOYEES where SALARY > ?\");\n pStmt.setInt(1, emp_sal);\n ResultSet rSet = pStmt.executeQuery();\n while (rSet.next()) {\n Employee emp = new Employee();\n emp.setEmployee_id(rSet.getInt(\"EMPLOYEE_ID\"));\n emp.setFirst_name(rSet.getString(\"FIRST_NAME\"));\n emp.setLast_name(rSet.getString(\"LAST_NAME\"));\n emp.setEmail(rSet.getString(\"EMAIL\"));\n emp.setPhone_number(rSet.getString(\"PHONE_NUMBER\"));\n emp.setHire_date(rSet.getDate(\"HIRE_DATE\"));\n emp.setJop_id(rSet.getString(\"JOB_ID\"));\n emp.setSalary(rSet.getInt(\"SALARY\"));\n emp.setCommission_pct(rSet.getDouble(\"COMMISSION_PCT\"));\n emp.setManager_id(rSet.getInt(\"MANAGER_ID\"));\n emp.setDepartment_id(rSet.getInt(\"DEPARTMENT_ID\"));\n\n emplyeeList.add(emp);\n \n }\n \n System.out.println(\"done\");\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n EmpDBUtil.closeConnection(conn);\n }\n\n return emplyeeList;\n }", "Salaries selectByPrimaryKey(@Param(\"empNo\") Integer empNo, @Param(\"fromDate\") Date fromDate);", "public static void main(String[] args) throws SQLException {\n\t\tConnection conn= DriverManager.getConnection(\"jdbc:oracle:thin:@coestudb.qu.edu.qa:1521/STUD.qu.edu.qa\",\"scott\",\"tiger123\");\n\t\tPreparedStatement stmt = conn.prepareStatement(\"select empno,ename,sal,hiredate from emp where sal>? and job=?\");\n\t\tstmt.setDouble(1, 2000);\n\t\tstmt.setString(2, \"MANAGER\");\n\t\tResultSet rs = stmt.executeQuery();\n\t\twhile (rs.next()){\n\t\t\tint num = rs.getInt(1);\n\t\t\tString name = rs.getString(2);\n\t\t\tdouble sal = rs.getDouble(3);\n\t\t\tDate hire = rs.getDate(4);\n\t\t\tSystem.out.println(num+\" \"+name+\" \"+sal+\" \"+hire);\n\t\t}\n\t\trs.close();\n\t\tconn.close();\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tSession session=Utility.getSF().openSession();\r\n\t\tCriteria cr=session.createCriteria(Emp.class);\r\n\t\t\r\n\t\tOrder order=Order.desc(\"eno\");\r\n\t\tcr.addOrder(order);\r\n\t\t\r\n\t\tCriterion crt=Restrictions.between(\"eno\", 1001, 1005);\r\n\t\tcr.add(crt);\r\n\t\t\r\n\t\tProjection proj=Projections.property(\"eno\");\r\n\t\tcr.setProjection(proj);\r\n\t\t\r\n\t\t\r\n\t\tList<Integer> codes=cr.list();\r\n\t\t\r\n\t\tfor(Integer code:codes) {\r\n\t\t\tSystem.out.println(code);\r\n\t\t}\r\n\t\t/*\r\n\t\tProjection proj=Projections.property(\"ename\");\r\n\t\tcr.setProjection(proj);\r\n\t\t\r\n\t\t\r\n\t\tList<String> names=cr.list();\r\n\t\t\r\n\t\tfor(String name:names) {\r\n\t\t\tSystem.out.println(name);\r\n\t\t}\r\n\t\t*/\r\n\t\tsession.close();\r\n\r\n\t}", "public List<Emp> queryEmp(Emp emp, int pageNo, int pageSize)\n\t\t\tthrows Exception {\n\t\tList<Emp> empList = null;\n\t\tSession session = null;\n\t\tint beginPos = (pageNo - 1) * pageSize;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tString hql = \"from Emp where 1=1\";\n\t\t\tif (emp != null) {\n\t\t\t\tif (!(\"\").equals(emp.getEname())) {\n\t\t\t\t\thql = hql + \" and ename like '%\" + emp.getEname() + \"%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setFirstResult(beginPos);\n\t\t\tquery.setMaxResults(pageSize);\n\t\t\tempList = query.list();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t\treturn empList;\n\t}", "@Query(\"FROM Employee WHERE name = :name OR location = :location \")\n List<Employee> getEmployeeByNameOrLocation(String name, String location);", "@Test\n public void learnToQueryWithDomainSpecificRangeParam() throws Exception {\n SqlSession session = null;\n\n List<Country> lc = session.selectList(\"getCountryRange3\", new Range(22, 33));\n\n assertEquals(12, lc.size());\n Country finland = lc.get(11);\n assertEquals(\"Finland\", finland.getCountry());\n\n }", "public List<Employe> findByEnameStartingWithAndEaddStartingWith(String name,String addrs);", "public SearchEmpSalary() {\n initComponents();\n con = DatabaseHelper.getConnection();\n Toolkit toolkit = getToolkit();\n Dimension size = toolkit.getScreenSize();\n setLocation(size.width/2 - getWidth()/2, size.height/2 - getHeight()/2);\n lbl_emp.setText(String.valueOf(Emp.empName).toString());\n }", "List<Employee> findByNameAndLocation(String name, String location);", "List<Establishment> searchEstablishments(EstablishmentCriteria criteria, RangeCriteria rangeCriteria);", "@Override\n\tpublic List<Booking> getDetails(String empid) {\n\t\tSession session = factory.getCurrentSession();\n\t\tQuery query = session\n\t\t\t\t.createQuery(\"from Booking where employeeId=\"+empid);\n\t\treturn query.list();\n\t}", "public static void main(String[] args) {\n\ntry {\n\t\t\t\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tConnection c= DriverManager.getConnection(\"jdbc:oracle:thin:@artemis.vsnet.gmu.edu:1521/vse18c.vsnet.gmu.edu\",\"spallemp\",\"vortetoa\");\n\t\t\tStatement st = c.createStatement();\n\t\t\tResultSet re = st.executeQuery(\"select e.lname, e.ssn, w.hours from employee e, project p, works_on w where e.ssn=w.essn and w.pno=p.pnumber and e.dno=p.dnum and plocation='Houston' and pname='ProductZ'\");\n\t\t\n\t\t\t\t\twhile (re.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(re.getString(1) + \",\" + re.getString(2)+ \",\" + re.getString(3));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Closing the connection\n\t\t\t\t\tc.close();\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t}\n\t\t\n\t\t\t}", "public String displayAllEmployees(){\n String p = \" \";\n \n try {\n \n emprs = stmt.executeQuery \n (\"SELECT * FROM JEREMY.EMPLOYEE\");\n p = loopDBEMPInfo(emprs);\n emprs.close();\n } catch (Exception e) {\n System.out.println(\"SQL problem \" + e);\n }\n \n return p;\n}", "@Override\r\n\tpublic Employee getEmployeeBySalary(Long salary) {\n\t\treturn employeeDao.getEmployeeBySalary(salary);\r\n\t}", "public ResultSet getAccno(Long ano)throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select balance from bank where Accno=\"+ano+\"\");\r\n\treturn rs;\r\n}", "public String enameGet(String emp_id) throws Exception;", "public Employee findEmployee(IncomingReport incoming_report) throws IllegalArgumentException, DAOException;", "private ResultSet getResultSetSalaryReport(String departmentId, LocalDate dateFrom, LocalDate dateTo){\n PreparedStatement ps;\n try {\n ps = connection.prepareStatement(SQL_SELECT);\n ps.setString(0, departmentId);\n ps.setDate(1, new java.sql.Date(dateFrom.toEpochDay()));\n ps.setDate(2, new java.sql.Date(dateTo.toEpochDay()));\n return ps.executeQuery();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }", "public static String employeeExists(String eid, String pass){\n return \"select e_fname from employee where e_id = '\"+eid+\"' and e_pass = '\"+pass+\"'\";\n }", "public static void main(String[] args) {\n\t\tSessionFactory sf=HibernateUtility.getSessionFactory();\n\t\tSession s=sf.openSession();\n\t\tCriteria crt=s.createCriteria(Employee.class);\n\t\tcrt.add(Restrictions.between(\"id\", 200, 3000));\n\t\tcrt.add(Restrictions.gt(\"salary\", 40000));\n\t\tList list=crt.list();\n\t\tIterator it =list.iterator();\n\t\twhile(it.hasNext()){\n\t\t\tEmployee e=(Employee)it.next();\n\t\t\tSystem.out.println(\"id= \"+e.getId()+\"Salary = \"+e.getSalary());\n\t\t\t\n\t\t\n\n\t}\n\t\ts.close();\n\t\tsf.close();\n\t}", "List<AccountDetail> findAllByAgeBetween(Integer minAge,Integer maxAge);", "List<SalGrade> selectByExample(SalGradeExample example);", "List<Employee> listByAge(Integer age);", "public void searchEmployee(TaxChallan taxChallan, HttpServletRequest request) {\r\n\t\tObject data[][] = null;\r\n\t\ttry {\r\n\t\t\tString challanQuery = \"SELECT HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE,HRMS_TAX_CHALLAN_DTL.EMP_ID,EMP_TOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,HRMS_TAX_CHALLAN_DTL.CHALLAN_TDS,\"\r\n\t\t\t\t\t+ \" TO_CHAR(NVL(HRMS_TAX_CHALLAN_DTL.CHALLAN_SURCHARGE,0), 9999999990.99),TO_CHAR(NVL(HRMS_TAX_CHALLAN_DTL.CHALLAN_EDU_CESS,0), 9999999990.99),TO_CHAR(NVL(HRMS_TAX_CHALLAN_DTL.CHALLAN_TOTAL_TAX,0), 9999999990.99) \" \r\n\t\t\t\t\t+ \" FROM HRMS_TAX_CHALLAN_DTL \"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_TAX_CHALLAN ON(HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE=HRMS_TAX_CHALLAN.CHALLAN_CODE)\"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_EMP_OFFC ON(HRMS_TAX_CHALLAN_DTL.EMP_ID=HRMS_EMP_OFFC.EMP_ID)\"\r\n\t\t\t\t\t+ \" WHERE HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE=\"\r\n\t\t\t\t\t+ taxChallan.getChallanID()\r\n\t\t\t\t\t+ \" ORDER BY EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME\";\r\n\t\t\tdata = getSqlModel().getSingleResult(challanQuery);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"exception in challanQuery in getChallanRecords method\",e);\r\n\t\t} //end of catch\r\n\t\t\r\n\t\tif(data.length> 0 && data!=null){\r\n\t\t\tint rownum = 0;\r\n\t\t\tfor (int i = 0; i < data.length; i++) {\r\n\t\t\t\tif(String.valueOf(data[i][1]).equals(taxChallan.getSearchForEmpId())){\r\n\t\t\t\t\trownum = i;\r\n\t\t\t\t} //end of if\r\n\t\t\t} //end of loop\r\n\t\t\tlogger.info(\"rownum======\"+rownum);\r\n\t\t\tint recPerPage = 20;\r\n\t\t\tString[] pageIndex = Utility.doPaging(taxChallan.getMyPage(), data.length, recPerPage);\r\n\t\t\tif (pageIndex == null) {\r\n\t\t\t\tpageIndex[0] = \"0\";\r\n\t\t\t\tpageIndex[1] = \"20\";\r\n\t\t\t\tpageIndex[2] = \"1\";\r\n\t\t\t\tpageIndex[3] = \"1\";\r\n\t\t\t\tpageIndex[4] = \"\";\r\n\t\t\t} //end of if\r\n\t\t\trequest.setAttribute(\"totalPage\", Integer.parseInt(String\r\n\t\t\t\t\t.valueOf(pageIndex[2])));\r\n\t\t\t\r\n\r\n\t\t\tif (pageIndex[4].equals(\"1\"))\r\n\t\t\t\ttaxChallan.setMyPage(\"1\");\r\n\t\t\t\r\n\t\t\ttaxChallan.setListFlag(\"true\");\r\n\t\t\tArrayList<Object> chList = new ArrayList<Object>();\r\n\t\t\t\r\n\t\t\tint startRecNo = 0;\r\n\t\t\tint endRecNo = 0;\r\n\t\t\t\r\n\t\t\tint pageDiv = rownum/recPerPage;\r\n\t\t\t\r\n\t\t\tstartRecNo = pageDiv * recPerPage;\r\n\t\t\tendRecNo = startRecNo + recPerPage - 1;\r\n\t\t\t\r\n\t\t\tif(data.length <= endRecNo){\r\n\t\t\t\tendRecNo = data.length-1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlogger.info(\"startRecNo======\"+startRecNo);\r\n\t\t\tlogger.info(\"endRecNo======\"+endRecNo);\r\n\t\t\tint pageRemainder = (rownum+1)%recPerPage;\r\n\t\t\tlogger.info(\"pageRemainder======\"+pageRemainder);\r\n\t\t\t\r\n\t\t\tint highlightRec = 0;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(pageRemainder > 0){\r\n\t\t\t\tpageDiv = pageDiv+1;\r\n\t\t\t\thighlightRec = pageRemainder - 1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tpageDiv = pageDiv+1;\r\n\t\t\t\thighlightRec = recPerPage - 1;\r\n\t\t\t}\r\n\t\t\trequest.setAttribute(\"highlightRec\", highlightRec);\r\n\t\t\tlogger.info(\"highlightRec======\"+highlightRec);\r\n\t\t\trequest.setAttribute(\"pageNo\", pageDiv);\r\n\t\t\ttaxChallan.setMyPage(String.valueOf(pageDiv));\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tfor (int i = startRecNo; i <= endRecNo; i++) {\r\n\t\t\t\t\tTaxChallan bean=new TaxChallan(); \r\n\t\t\t\t\tbean.setChallanCode(String.valueOf(data[i][0]));//Challan Code\r\n\t\t\t\t\tbean.setEmpId(String.valueOf(data[i][1]));//Employee Id\r\n\t\t\t\t\tbean.setEmpToken(String.valueOf(data[i][2]));//Token No.\r\n\t\t\t\t\tbean.setEmpName(String.valueOf(data[i][3]));//Emp Name\r\n\t\t\t\t\tbean.setChallanTax(Utility.twoDecimals(String.valueOf(data[i][4])));//Tds\r\n\t\t\t\t\tbean.setChallanSurcharge(Utility.twoDecimals(String.valueOf(data[i][5])));//Surcharge\r\n\t\t\t\t\tbean.setChallanEduCess(Utility.twoDecimals(String.valueOf(data[i][6])));//Education cess\r\n\t\t\t\t\tbean.setChallanTotTax(Utility.twoDecimals(String.valueOf(data[i][7])));\t//Total Tax\r\n\t\t\t\t\r\n\t\t\t\t\tchList.add(bean);\r\n\t\t\t\t} //end of loop\r\n\t\t\t}catch (Exception e) {\r\n\t\t\t\tlogger.error(\"exception in data loop\",e);\r\n\t\t\t} //end of catch\r\n\t\t\t taxChallan.setChallanList(chList);\r\n\t\t} //end of if\r\n\t\t\r\n\t\tint fromYear=0;\r\n\t\tint toYear=0;\r\n\t\tif(Integer.parseInt(taxChallan.getMonth())>=4 && Integer.parseInt(taxChallan.getMonth())<=12) {\r\n\t\t\tfromYear =Integer.parseInt(taxChallan.getYear());\r\n\t\t\ttoYear=fromYear+1;\r\n\t\t } //end of if\r\n\t\telse if(Integer.parseInt(taxChallan.getMonth())>=1 && Integer.parseInt(taxChallan.getMonth())<=3) {\r\n\t\t fromYear =Integer.parseInt(taxChallan.getYear())-1;\r\n\t\t toYear=Integer.parseInt(taxChallan.getYear());\r\n\t\t} //end of else if\t\r\n\t\t\r\n\t\tString empIncomeQuery = \"SELECT TO_CHAR(NVL(TDS_TAXABLE_INCOME,0), 9999999990.99),TDS_EMP_ID FROM HRMS_TDS \" \r\n\t\t\t+\" LEFT JOIN HRMS_EMP_OFFC ON (HRMS_EMP_OFFC.EMP_ID = HRMS_TDS.TDS_EMP_ID) \"\r\n\t\t\t+\" WHERE TDS_FROM_YEAR=\"+fromYear+\" AND TDS_TO_YEAR=\"+toYear+\" AND EMP_DIV = 22 \"\r\n\t\t\t+\" ORDER BY TDS_EMP_ID\";\r\n\t\t\tObject empTaxIncome[][] = getSqlModel().getSingleResult(empIncomeQuery);\r\n\t\t\t try {\r\n\t\t\t\t\tif(empTaxIncome != null && empTaxIncome.length != 0){\r\n\t\t\t\t\t\t ArrayList<Object> valuesList = new ArrayList<Object>();\r\n\t\t\t\t\t\t for (int i = 0; i < empTaxIncome.length; i++) {\r\n\t\t\t\t\t\t\t\t TaxChallan bean = new TaxChallan();\r\n\t\t\t\t\t\t\t\t bean.setHidListEmpId(String.valueOf(empTaxIncome[i][1]));\r\n\t\t\t\t\t\t\t\t bean.setHidListTdsIncome(String.valueOf(empTaxIncome[i][0]));\r\n\t\t\t\t\t\t\t\t valuesList.add(bean);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttaxChallan.setValuesList(valuesList);\r\n\t\t\t\t\t }\r\n\t\t\t\t} catch (RuntimeException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\ttaxChallan.setEnterTotalTax(\"0\");\r\n\t\t\ttaxChallan.setAddedTds(\"0\");\r\n\t\t\ttaxChallan.setAddedSurcharge(\"0\");\r\n\t\t\ttaxChallan.setAddedEduCess(\"0\");\r\n\t\t\ttaxChallan.setAddEmpId(\"\");\r\n\t\t\ttaxChallan.setAddEmpToken(\"\");\r\n\t\t\ttaxChallan.setAddEmpName(\"\");\r\n\t\t\ttaxChallan.setF9AddEmpFlag(\"false\");\r\n\t\t\r\n\t}", "@Override\r\n\tpublic Vector<Log> get(Employee employee, Timestamp begin, Timestamp end) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tVector<Log> ret = new Vector<Log>();\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GetE);\r\n\t\t\tps.setInt(1, employee.getId());\r\n\t\t\tps.setTimestamp(2, begin);\r\n\t\t\tps.setTimestamp(3, end);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tret.add(generate(rs));\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public void searchAvailability(Connection connection, String hotel_name, int branchID, java.sql.Date from, java.sql.Date to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND date_from >= Convert(datetime, ?) AND date_to <= Convert(datetime, ?)\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n pStmt.setDate(3, from);\n pStmt.setDate(4, to);\n\n try {\n\n System.out.printf(\" Availiabilities at %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getInt(3));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public List<Employee_mst> listEmployeeByBranch(final String branch) {\n final StringBuilder query = new StringBuilder();\n query.append(\"SELECT e FROM Employee_mst e, Authority_mst a WHERE e.emp_delete_flg = 'false' \");\n query.append(\" AND (e.emp_condi_code = '0' OR e.emp_condi_code IS NULL) \");\n query.append(\" AND e.emp_settle_authority=a.aut_code \");\n\n if (SummaryReportConstants.HQ_CODE.equals(branch)) {\n query.append(\" AND a.aut_code = \" + AuthorityLevels.HEAD_QUARTER);\n }\n else if (!StringUtils.isEmpty(branch)) {\n query.append(\" AND a.aut_code = \" + AuthorityLevels.BRANCH).append(\" AND e.emp_adpcode = '\" + branch + \"'\");\n }\n\n query.append(\" ORDER BY e.emp_code\");\n List<Employee_mst> results = super.emMain.createQuery(query.toString(), Employee_mst.class).getResultList();\n return results;\n }", "@Override\n\tString searchEmployee(String snum) {\n\t\treturn null;\n\t}", "@Query(\"name = ? and age = ?\")\n List<PersonDocument> findByNameAndAge(String name, Integer age);", "private static void hqlQuery(Session session) {\n\t\tint departmentId=300;\n\t\tQuery query=session.createQuery(\"from Employee e where e.dp.departmentId<=:\"+DtoConstants.DEPARTMENT_ID+\" order by e.name desc\");\n\t\tquery.setInteger(DtoConstants.DEPARTMENT_ID, departmentId);\n\t\t/**Below query properties used for pagination */\n\t\tquery.setFirstResult(0);\n\t\tquery.setMaxResults(10);\n\t\tList<Employee> empList=(List<Employee>)query.list();\n\t\tint i=1;\n\t\tfor(Employee e:empList){\n\t\t\tSystem.out.println(i+++\") Name:\"+e.getName()+\" Salary:\"+e.getSalary());\n\t\t}\n\t}", "protected String getJPARangeClause(long lowerBound, long upperBound, Map<String, Object> params) {\n params.put(\"lowerBound\", lowerBound);\n params.put(\"upperBound\", upperBound);\n return \"log.id > :lowerBound and log.id <= :upperBound\";\n }", "@GetMapping(value=\"/searchEmpData/{fname}\")\n\tpublic List<Employee> getEmployeeByName(@PathVariable (value = \"fname\") String fname)\n\t{\n\t\treturn integrationClient.getEmployees(fname);\n\t}", "public static void main(String[] args) {\n Connection con;\n String url = \"jdbc:oracle:thin:@localhost:1521:orcl\";\n Statement stmt;\n\n try {\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n con = DriverManager.getConnection(url, \"hr\", \"hr\");\n stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(\"select * from employees\");\n while(rs.next())\n {\n System.out.println(rs.getString(1)+\" \"+rs.getString(2)+\" \"+rs.getString(3)+\" \"+rs.getString(4)+\" \"+rs.getString(5));\n }\n\n } catch (ClassNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public static void main(String[] args) {\n\ttry {\r\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\tConnection connection= DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:orcl\",\"hr\",\"hr\");\r\n\t\tStatement statement=connection.createStatement();\r\n\t\tResultSet resultset= statement.executeQuery(\"select * from employees\");\r\n\t\twhile(resultset.next())\r\n\t\t{\r\n\t\t\tint employeeId=resultset.getInt(1);\r\n\t\t\tString firstName=resultset.getString(2);\r\n\t\t\tSystem.out.println(employeeId+\"->\"+firstName);\r\n\t\t}\r\n\t}\r\n\tcatch (ClassNotFoundException e) {\r\n\t\t\r\n\t\tSystem.out.println(e);\r\n\t} catch (SQLException e) {\r\n\t\r\n\t\te.printStackTrace();\r\n\t}\r\n}", "public List<Employe> findByEnameAndEadd(String name,String add);", "public static void main(String[] args) throws SQLException {\n\t\tint maxSalary=10000;\n\t\tnew EmpStatistics().printStatistics(maxSalary);\n\t\t\n\t\tmaxSalary=15000;\n\t\tnew EmpStatistics().printStatistics(maxSalary);\n\t\t}", "@Transactional(readOnly = true)\n public List<Employee> findBetween(Date firstBirthDate, Date lastBirthDate) {\n logger.debug(\"find employee range : {}\", SearshRange(firstBirthDate, lastBirthDate));\n return employeeDao.findBetween(firstBirthDate, lastBirthDate);\n }", "@WebMethod\n public List<Employee> getAllEmployeesByHireDate() {\n Connection conn = null;\n List<Employee> emplyeeList = new ArrayList<Employee>();\n try {\n conn = EmpDBUtil.getConnection();\n Statement stmt = conn.createStatement();\n ResultSet rSet = stmt.executeQuery(\" select * from employees \\n\" + \n \" where months_between(sysdate,HIRE_DATE) > 200 \");\n while (rSet.next()) {\n Employee emp = new Employee();\n emp.setEmployee_id(rSet.getInt(\"EMPLOYEE_ID\"));\n emp.setFirst_name(rSet.getString(\"FIRST_NAME\"));\n emp.setLast_name(rSet.getString(\"LAST_NAME\"));\n emp.setEmail(rSet.getString(\"EMAIL\"));\n emp.setPhone_number(rSet.getString(\"PHONE_NUMBER\"));\n emp.setHire_date(rSet.getDate(\"HIRE_DATE\"));\n emp.setJop_id(rSet.getString(\"JOB_ID\"));\n emp.setSalary(rSet.getInt(\"SALARY\"));\n emp.setCommission_pct(rSet.getDouble(\"COMMISSION_PCT\"));\n emp.setManager_id(rSet.getInt(\"MANAGER_ID\"));\n emp.setDepartment_id(rSet.getInt(\"DEPARTMENT_ID\"));\n\n emplyeeList.add(emp);\n }\n \n System.out.println(\"done\");\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n EmpDBUtil.closeConnection(conn);\n }\n\n return emplyeeList;\n }", "public void searchHotelReservations(Connection connection, String hotel_name, int branchID, LocalDate checkIn, LocalDate checkOut) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT c_id, res_num, check_in, check_out FROM Booking WHERE hotel_name = ? AND branch_ID = ? AND check_in >= to_date(?, 'YYYY-MM-DD') AND check_out <= to_date(?, 'YYYY-MM-DD')\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n\n if (checkIn == null && checkOut == null){\n pStmt.setString(3, LocalDate.parse(\"2000-01-01\").toString());\n pStmt.setString(4, LocalDate.parse(\"3000-01-01\").toString());\n }\n else if (checkIn == null){\n pStmt.setString(3, checkIn.toString());\n pStmt.setString(4, LocalDate.parse(\"3000-01-01\").toString());\n }\n else if (checkOut == null){\n pStmt.setString(3, LocalDate.parse(\"2000-01-01\").toString());\n pStmt.setString(4, checkOut.toString());\n }\n else {\n pStmt.setString(3, checkIn.toString());\n pStmt.setString(4, checkOut.toString());\n }\n\n try {\n\n System.out.printf(\" Reservations for %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(\" \" + rs.getString(1) + \" \" + rs.getInt(2));\n System.out.println(\" Reservation DATES: \" + rs.getDate(3) + \" TO \" + rs.getDate(4));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }", "List<Employee> findByName(String name);", "@Transactional\n\t@Override\n\tpublic List<Employee> getByName(String name) {\n\t\treturn entityManager.createQuery(\"Select e from Employee e where e.name like ?0\", Employee.class)\n\t\t\t\t.setParameter(0, \"%\"+name+\"%\").getResultList();\n\t\t\n\t\t\n\t}", "Employee(int id, String name, String birthDate, int eage, double esalary){\r\n ID=id; \r\n NAME=name; \r\n BIRTHDATE=birthDate; \r\n age=eage; \r\n salary=esalary; \r\n }", "public static void main(String[] args) {\n\t\t\n\t\tArrayList<Employe> ar=new ArrayList<Employe>();\n\t\t\n\t\tar.add(new Employe(\"chakri\",55000));\n\t\tar.add(new Employe(\"chakravarthi\",75000));\n\t\tar.add(new Employe(\"chak\",85000));\n\t\tar.add(new Employe(\"ec\",95000));\n\t\t\n\tPredicate<Employe> p=s->s.salary>55000;\n\tfor(Employe e1:ar)\n\t{\n\t\tif(p.test(e1))\n\t\t{\n\t\t\tSystem.out.println(e1.name + \"->\" + e1.salary);\n\t\t}\n\t}\n\t\t\n\t\t\n\n\t}", "public List<Hotel> findByPriceBetween(double low, double high);", "Condition between(QueryParameter parameter, Object x, Object y);", "public static Employee [] getEmployeeSalary(Connection conn, int input_emp_no) {\n//\t\t\tWe are using some code from the get employee by last name\n\t\t\tEmployee [] empSalaryQuery = new Employee[1];\n\n\t\t\ttry {\n\n\t\t\t\t// Create an SQL query that uses the procedure stored in the procedures.sql file \n//\t\t\t\tStoring the input from the user into the query\n\t\t\t\tString sql = \"CALL getEmployeeSalary(\\\"\" + input_emp_no + \"\\\")\"; \n\t\t\t\t// Create an SQL query\n\t\t\t\tStatement st = conn.createStatement();\n\t\t\t\t// generate a result \n\t\t\t\tResultSet rs = st.executeQuery(sql);\n\n//\t\t\t\tcalling the database results and printing it to the console\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tint emp_no = rs.getInt(\"emp_no\");\n\t\t\t\t\tint salary = rs.getInt(\"salary\");\n\t\t\t System.out.println(emp_no + \"\\t\" + salary);\n\t\t\t\t}\n\t\t\t\t// close the result and the statement\n\t\t\t\trs.close();\n\n\t\t\t\tst.close();\n\n\t\t\t}\n\n\t\t\tcatch (SQLException e) {\n\n\t\t\t\tSystem.out.println(\"Error in getEmployeeSalary\");\n\n\t\t\t\te.printStackTrace();\n\n\t\t\t}\n\n\t\t\treturn empSalaryQuery;\n\t\t}", "public static void main(String[] args) {\n\r\n\t\tEntityManager em = PersistanceManager.INSTANCE.getEntityManager();\r\n\t\tSystem.out.println(\"Print ALL\");\r\n\t\tQuery query = em.createQuery(\"FROM Employee e\");\r\n\t\tArrayList<Employee> result = (ArrayList<Employee>) query.getResultList();\r\n\t\tfor (Employee current : result)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print id = 3\");\r\n\t\tQuery query1 = em.createQuery(\"FROM Employee e where e.id=3\");\r\n\t\tArrayList<Employee> result1 = (ArrayList<Employee>) query1.getResultList();\r\n\t\tfor (Employee current : result1)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print Named Query \");\r\n\t\tArrayList<Employee> result2 = (ArrayList<Employee>) em.createNamedQuery(\"Employee.searchAll\").setParameter(\"empName\", \"D%\")\r\n\t\t\t\t.getResultList();\r\n\t\tfor (Employee current : result2)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t}", "private static void testOracle7() throws Exception {\n\t\tClass.forName(\"jdbc.driver.oracle.Oracle7Driver\");\r\n\t\t//DriverManager.registerDriver(new Oracle7Driver());\r\n\r\n\t\t// Connect to the local database\r\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:oracle:thin:@192.168.5.168:1521:RT\", \"stdba\", \"stdba\");\r\n\r\n\t\t// Query the employee names\r\n\t\tStatement stmt = conn.createStatement();\r\n\t\t// stmt.execute(\"create table TEST1(A1 VARCHAR2(50) NOT NULL,A2 DATE, A3 NUMBER(10,2))\");\r\n\t\t// ResultSet rset = stmt.executeQuery(\"SELECT owner, table_name FROM dba_tables\");\r\n\r\n\t\t// String sql = \"SELECT column_name FROM cols WHERE table_name LIKE 'AA%'\";\r\n\t\tResultSet rset = stmt.executeQuery(\"select STAGE_NO,CLIENT_NO,POINT_START,POINT_ADD,POINT_USE from CLIENT_BONUS where STAGE_NO=2012 and CLIENT_NO=1056\");\r\n\t\t// ResultSet rset = stmt.executeQuery(sql);\r\n\t\t// Print the name out\r\n\t\twhile (rset.next())\r\n\t\t\tSystem.out.println(rset.getString(1));\r\n\r\n\t\t// System.out.println(rset.getString(1) + \":\" + rset.getString(2));\r\n\r\n\t}", "List<ResultsView2> findByCnoBetween(int min,int max);", "public Empleado SearchOne(String apellido) throws SQLException {\r\n ResultSet rs;\r\n /*Sentencia SQL*/\r\n String sql = \"SELECT * FROM empleados WHERE apellido = ?\";\r\n PreparedStatement sentencia = conexion.prepareStatement(sql);\r\n /*Setteamos los valores de la sentencia*/\r\n sentencia.setString(1, apellido);\r\n /*Ejecutar la sentencia*/\r\n sentencia.execute();\r\n rs = sentencia.getResultSet();\r\n rs.next();\r\n /*Guardamos los datos en el objeto*/\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 return emp;\r\n }", "List<Account> findAllByAgeBetween(Integer age1, Integer age2);", "@Transactional(readOnly = true)\r\n\tpublic Employee getEmployee(String dniEmployee) {\r\n\t\tdniEmployee = dniEmployee.trim();\r\n\t\treturn (Employee) em.createQuery(\"select e from Employee e where e.idemployee='\"+dniEmployee+\"'\").getResultList().get(0);\r\n\t}", "public ResultSet returnAccount(Long demataccountNo)throws Exception {\n\trs=DbConnect.getStatement().executeQuery(\"select BANK_ACC_NO from CUSTOMER_DETAILS where DEMAT_ACC_NO=\"+demataccountNo+\"\");\r\n\treturn rs;\r\n}", "public List<User> findUserEmployeeIdByPartion(String employeeIDpart) {\n\t\tTypedQuery<User> query = em.createQuery(\"select u from User u where u.employeeId like :emplyeID\", User.class);\n\t\tquery.setParameter(\"emplyeID\", \"%\" + employeeIDpart + \"%\");\n\t\treturn query.setFirstResult(0).setMaxResults(10).getResultList();\n\t}", "List<Account> findAccountByAgeBetween(int age1, int age2);", "public List<Employees>getEMPMenaning() {\n\tString sql = \"SELECT Id_employees, Name_and_surname, Password, Work_role FROM employees \";\n\t\n\tList<Employees>list = new ArrayList<Employees>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\n\t\twhile(resultSet.next()) {\n\t\t\tEmployees getEMPMenaning = new Employees();\n\t\t\tgetEMPMenaning.setIdEmployees(resultSet.getInt(\"Id_employees\"));\n\t\t getEMPMenaning.setNameAndSurname(resultSet.getString(\"Name_and_surname\"));\n\t\t getEMPMenaning.setPassword(resultSet.getString(\"Password\"));\n\t\t getEMPMenaning.setWorkRole(resultSet.getInt(\"Work_role\"));\n\t\t \n\t\t\tlist.add(getEMPMenaning);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n\n\n\t\n}", "public static void main(String[] args) {\n\t\tString dbur1 = \"jdbc:oracle:thin:@localhost:1521:xe\";// 로컬호스트 본인컴퓨터~ 포트 1521 sid(I) XE\n//\t\tString dbuser = \"C##BITUSER\";\n//\t\tString dbpass = \"bituser\";\n\n\t\tString dbpass = \"hr\";\n\t\tString dbuser = \"hr\";\n\t\tStatement stmt = null;\n\t\tResultSet re = null;\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tconn = DriverManager.getConnection(dbur1, dbuser, dbpass);\n\t\t\tSystem.out.println(conn);\n\t\t\tSystem.out.println(\"접속성공!\");\n\t\t\tstmt = conn.createStatement();\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tSystem.out.print(\"검색할 이름 혹은 성을 입력해주세요 :>\");\n\t\t\tString scc = sc.next();\n\t\t\t\n\t\t\tString sql = \"SELECT first_name|| ' ' || last_name name, email, hire_date \"\n\t\t\t\t\t+ \"FROM employees \"\n\t\t\t\t\t+ \"WHERE first_name LIKE '%\"+scc+\"%'\"\n\t\t\t\t\t\t\t+ \"OR last_name LIKE '%\"+scc+\"%'\";\n\t\t\tre = stmt.executeQuery(sql);\n\n\t\t\twhile (re.next()) {\n\t\t\t\tString deptId = re.getString(\"name\");\n\t\t\t\tString deptName = re.getNString(\"email\");\n\t\t\t\tString date = re.getString(\"hire_date\");\n\t\t\t\tSystem.out.println(deptId + \" \" + deptName + \" \" + date);\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.err.println(\"드라이버로드 실패\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\t// TODO: handle exception\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tconn.close();\n\t\t\t} catch (Exception e2) {\n\t\t\t\te2.printStackTrace();\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}\n\t\t// TODO Auto-generated method stub\n\n\t}", "public List<Employees> getByBirthDateGreater (Date birthDate);", "public static List<Book> searchBookByNameAndLocation(String name,String location) throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n\r\n Query query = session.getNamedQuery(\"INVENTORY_searchBookByNameAndLocation\").setString(\"name\", name).setString(\"location\", location);\r\n\r\n List<Book> resultList = query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return resultList;\r\n \r\n }", "public List<User> findEmployees(String companyShortName, int start, int rows, String sortBy, String sortHow);", "private String getUnionQuery(TaxChallan taxChallan,Object[][] tdsParameter, String ledgerCode) {\r\n\t\t\r\n\t\tString salaryQuery = \"\";\r\n\t\tString arrearstQuery = \"\";\r\n\t\tString settlementQuery = \"\";\r\n\t\t//String allowanceQuery = \"\";\r\n\t\tString challanQuery = \"\";\r\n\t\tString bonusQuery = \"\";\r\n\t\tString leaveEncashmentQuery = \"\";\r\n\t\tString OverTimeQuery = \"\";\r\n\t\t//-------------------------Start of query---------------------------------------\r\n\t\ttry{\r\n\t\tchallanQuery = \"SELECT EMPID, ETOKEN, ENAME, TO_CHAR(SUM(AMT),9999999990.99) FROM ( \";\r\n\t\t\r\n\t\t\tif(ledgerCode != null && ledgerCode.length() > 0){\r\n\t\t\t\t/**\r\n\t\t\t\t * Query for Salary\r\n\t\t\t\t */\r\n\t\t\t\tsalaryQuery=\"SELECT DISTINCT HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\".EMP_ID AS EMPID,EMP_TOKEN AS ETOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME AS ENAME \"\r\n\t\t\t\t+\" ,TO_CHAR(SUM(NVL(SAL_AMOUNT,0)),9999999990.99) AS AMT \"\r\n\t\t\t\t+\" FROM HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\" \"\r\n\t\t\t\t+\" INNER JOIN HRMS_EMP_OFFC ON HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\".EMP_ID = HRMS_EMP_OFFC.EMP_ID \" \r\n\t\t\t\t+\" INNER JOIN HRMS_SALARY_\"+taxChallan.getYear()+\" ON (HRMS_SALARY_\"+taxChallan.getYear()+\".EMP_ID = HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\".EMP_ID \" \r\n\t\t\t\t+\" and HRMS_SALARY_\"+taxChallan.getYear()+\".SAL_LEDGER_CODE = HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\".SAL_LEDGER_CODE) \"\r\n\t\t\t\t+\" WHERE HRMS_SALARY_\"+taxChallan.getYear()+\".SAL_DIVISION=\"+taxChallan.getDivId()+\" AND SAL_DEBIT_CODE=\"+String.valueOf(tdsParameter[0][0])+\" AND SAL_LEDGER_CODE IN(\"+ledgerCode+\") \" +\r\n\t\t\t\t \" AND HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\".EMP_ID NOT IN(SELECT EMP_ID FROM HRMS_TAX_CHALLAN_DTL \"\r\n\t\t\t\t+\" INNER JOIN HRMS_TAX_CHALLAN ON (HRMS_TAX_CHALLAN.CHALLAN_CODE = HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE ) \"\r\n\t\t\t\t+\" WHERE CHALLAN_MONTH = \"+taxChallan.getMonth()+\" AND CHALLAN_YEAR=\"+taxChallan.getYear()+\" AND CHALLAN_DIVISION_ID=\"+taxChallan.getDivId()+\")\";\r\n\t\t\t\tlogger.info(\"taxChallan.getOnHold()======\"+taxChallan.getOnHold());\r\n\t\t\t\tif(taxChallan.getOnHold().equals(\"Yes\")){\r\n\t\t\t\t\tsalaryQuery += \" AND SAL_ONHOLD='Y' \";\r\n\t\t\t\t} //end of if\r\n\t\t\t\telse if(taxChallan.getOnHold().equals(\"No\")){\r\n\t\t\t\t\tsalaryQuery += \" AND SAL_ONHOLD='N' \";\r\n\t\t\t\t} //end of else if\r\n\t\t\t\tsalaryQuery+=\" GROUP BY HRMS_SAL_DEBITS_\"+taxChallan.getYear()+\".EMP_ID,EMP_TOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME \";\r\n\t\t\t\t\r\n\t\t\t} //end of ledgerCode if\r\n\t\t\t\r\n\t\t\tchallanQuery +=salaryQuery;\r\n\t\t\tif(taxChallan.getIncludeArrears().equals(\"true\")){\r\n\t\t\t\tif(taxChallan.getIncludeSalary().equals(\"true\")){\r\n\t\t\t\t\tarrearstQuery +=\" UNION \";\r\n\t\t\t\t} //end of if\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Query for Arrears \r\n\t\t\t */\r\n\t\t\tarrearstQuery +=\" SELECT ARREARS_EMP_ID AS EMPID,EMP_TOKEN AS ETOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME AS ENAME, \"\r\n\t\t\t\t+\" TO_CHAR(SUM(NVL(ARREARS_AMT,0)),9999999990.99) AS AMT \"\r\n\t\t\t\t+\" FROM HRMS_ARREARS_DEBIT_\"+taxChallan.getYear()+\" \"\r\n\t\t\t\t+\" INNER JOIN HRMS_DEBIT_HEAD ON HRMS_DEBIT_HEAD.DEBIT_CODE = HRMS_ARREARS_DEBIT_\"+taxChallan.getYear()+\".ARREARS_DEBIT_CODE \" \r\n\t\t\t\t+\" INNER JOIN HRMS_EMP_OFFC ON HRMS_ARREARS_DEBIT_\"+taxChallan.getYear()+\".ARREARS_EMP_ID = HRMS_EMP_OFFC.EMP_ID \"\r\n\t\t\t\t+\" WHERE ARREARS_CODE IN (SELECT ARREARS_CODE FROM HRMS_ARREARS_LEDGER WHERE ARREARS_PAID_MONTH = \"+taxChallan.getMonth()+\" \" \r\n\t\t\t\t+\" AND ARREARS_PAID_YEAR = \"+taxChallan.getYear()+\" AND ARREARS_DIVISION = \"+taxChallan.getDivId()+\") AND ARREARS_DEBIT_CODE = \"+String.valueOf(tdsParameter[0][0])+\" \" +\r\n\t\t\t\t \" AND ARREARS_EMP_ID NOT IN (SELECT EMP_ID FROM HRMS_TAX_CHALLAN_DTL \"\r\n\t\t\t\t+\" INNER JOIN HRMS_TAX_CHALLAN ON (HRMS_TAX_CHALLAN.CHALLAN_CODE = HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE AND CHALLAN_ARREARS_FLAG='Y') \"\r\n\t\t\t\t+\" WHERE CHALLAN_MONTH = \"+taxChallan.getMonth()+\" AND CHALLAN_YEAR=\"+taxChallan.getYear()+\" AND CHALLAN_DIVISION_ID=\"+taxChallan.getDivId()+\") \"\r\n\t\t\t\t+\" GROUP BY ARREARS_EMP_ID,EMP_TOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME \";\r\n\t\t\t\r\n\t\t} //end of includeArrears if\r\n\t\t\t\r\n\t\t\tchallanQuery +=arrearstQuery;\r\n\t\t\tif(taxChallan.getIncludeSettlement().equals(\"true\")){\r\n\t\t\t\tif(taxChallan.getIncludeSalary().equals(\"true\")){\r\n\t\t\t\t\tsettlementQuery +=\" UNION \";\r\n\t\t\t\t} //end of if\r\n\t\t\t\tsettlementQuery += \" SELECT SETTL_ECODE AS EMPID,EMP_TOKEN AS ETOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME AS ENAME, \"\r\n\t\t\t\t+\" TO_CHAR(SUM(NVL(SETTL_AMT,0)),9999999990.99)+TO_CHAR(nvl((SETTL_TAX_AMT),0),9999999990.99) AS AMT FROM HRMS_SETTL_DEBITS \"\r\n\t\t\t\t+\" INNER JOIN HRMS_SETTL_HDR ON (HRMS_SETTL_HDR.SETTL_CODE = HRMS_SETTL_DEBITS.SETTL_CODE) \"\r\n\t\t\t\t+\" INNER JOIN HRMS_EMP_OFFC ON (HRMS_EMP_OFFC.EMP_ID = HRMS_SETTL_HDR.SETTL_ECODE) \"\r\n\t\t\t\t+\" INNER JOIN HRMS_RESIGN ON (HRMS_RESIGN.RESIGN_CODE = HRMS_SETTL_HDR.SETTL_RESGNO) \" \r\n\t\t\t\t+\" WHERE (SETTL_MTH_TYPE IN ('OH','CO')) AND RESIGN_WITHDRAWN = 'N' AND EMP_DIV = \"+taxChallan.getDivId()+\" \"\r\n\t\t\t\t+\" AND TO_CHAR(SETTL_SETTLDT,'MM')=\"+taxChallan.getMonth()+\" AND TO_CHAR(SETTL_SETTLDT,'YYYY')=\"+taxChallan.getYear()+\" \"\r\n\t\t\t\t+\" AND SETTL_DEBIT_CODE=\"+String.valueOf(tdsParameter[0][0])+\" \" +\r\n\t\t\t\t \" AND SETTL_ECODE NOT IN (SELECT EMP_ID FROM HRMS_TAX_CHALLAN_DTL \"\r\n\t\t\t\t+\" INNER JOIN HRMS_TAX_CHALLAN ON (HRMS_TAX_CHALLAN.CHALLAN_CODE = HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE) \"\r\n\t\t\t\t+\" WHERE CHALLAN_MONTH = \"+taxChallan.getMonth()+\" AND CHALLAN_YEAR=\"+taxChallan.getYear()+\" AND CHALLAN_DIVISION_ID=\"+taxChallan.getDivId()+\") \" \r\n\t\t\t\t+\" GROUP BY SETTL_ECODE,EMP_TOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,SETTL_TAX_AMT \";\r\n\t\t\t\t\r\n\t\t\t} //end of includeSettlement if\r\n\t\t\t\r\n\t\t\tchallanQuery +=settlementQuery;\r\n\t\t\t\r\n\t\t\t/*if(taxChallan.getIncludeAllowance().equals(\"true\")){\r\n\t\t\t\ttaxChallan.setHidIncludeAllow(\"true\");\r\n\t\t\t\tif(taxChallan.getIncludeSalary().equals(\"true\") || taxChallan.getIncludeSettlement().equals(\"true\")){\r\n\t\t\t\t\tallowanceQuery +=\" UNION \";\r\n\t\t\t\t} //end of if\r\n\t\t\t\tallowanceQuery += \" SELECT HRMS_ALLOWANCE_EMP_DTL.ALLW_EMP_ID AS EMPID,EMP_TOKEN AS ETOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME AS ENAME, \"\r\n\t\t\t\t+\" NVL(SUM(ALLW_TAX_AMT),0) AS AMT \"\r\n\t\t\t\t+\" FROM HRMS_ALLOWANCE_HDR \"\r\n\t\t\t\t+\" INNER JOIN HRMS_ALLOWANCE_EMP_DTL ON (HRMS_ALLOWANCE_EMP_DTL.ALLW_ID = HRMS_ALLOWANCE_HDR.ALLW_ID) \"\r\n\t\t\t\t+\" INNER JOIN HRMS_EMP_OFFC ON (HRMS_EMP_OFFC.EMP_ID = HRMS_ALLOWANCE_EMP_DTL.ALLW_EMP_ID) \"\r\n\t\t\t\t+\" INNER JOIN HRMS_CREDIT_HEAD ON (HRMS_CREDIT_HEAD.CREDIT_CODE = HRMS_ALLOWANCE_HDR.ALLW_CREDIT_HEAD) \"\r\n\t\t\t\t+\" AND TO_CHAR(ALLW_PROCESS_DATE,'MM')=\"+taxChallan.getMonth()+\" \"\r\n\t\t\t\t+\" AND TO_CHAR(ALLW_PROCESS_DATE,'YYYY')=\"+taxChallan.getYear()+\" \" \r\n\t\t\t\t+\" AND HRMS_ALLOWANCE_HDR.ALLW_DIVISION = \"+taxChallan.getDivId()+\" \" +\r\n\t\t\t\t \" AND HRMS_ALLOWANCE_EMP_DTL.ALLW_EMP_ID NOT IN (SELECT EMP_ID FROM HRMS_TAX_CHALLAN_DTL \"\r\n\t\t\t\t+\" INNER JOIN HRMS_TAX_CHALLAN ON (HRMS_TAX_CHALLAN.CHALLAN_CODE = HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE) \"\r\n\t\t\t\t+\" WHERE CHALLAN_MONTH = \"+taxChallan.getMonth()+\" AND CHALLAN_YEAR=\"+taxChallan.getYear()+\" AND CHALLAN_DIVISION_ID=\"+taxChallan.getDivId()+\") \"\r\n\t\t\t\t+\" GROUP BY HRMS_ALLOWANCE_EMP_DTL.ALLW_EMP_ID,EMP_TOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME \";\r\n\t\t\t\t\r\n\t\t\t} //end of includeAllowance if\r\n\t\t\t\r\n\t\t\tchallanQuery +=allowanceQuery;*/\r\n\t\t\tif(taxChallan.getIncludeBonus().equals(\"true\")){\r\n\t\t\t\tif(taxChallan.getIncludeSalary().equals(\"true\")){\r\n\t\t\t\t\tbonusQuery +=\" UNION \";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbonusQuery += \" SELECT HRMS_BONUS_EMP.EMP_ID AS EMPID, NVL(EMP_TOKEN,' ') AS ETOKEN, NVL(EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,' ') AS ENAME, TO_CHAR(SUM(NVL(HRMS_BONUS_EMP.BONUS_TAX_AMT,0)),9999999990.99) AS AMT\" \r\n\t\t\t\t\t+ \" FROM HRMS_BONUS_EMP \"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_BONUS_HDR ON (HRMS_BONUS_HDR.BONUS_CODE = HRMS_BONUS_EMP.BONUS_CODE)\"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_EMP_OFFC ON (HRMS_EMP_OFFC.EMP_ID = HRMS_BONUS_EMP.EMP_ID)\"\r\n\t\t\t\t\t+ \" WHERE HRMS_BONUS_HDR.DIV_CODE=\"+taxChallan.getDivId()+\" AND HRMS_BONUS_HDR.PAY_MONTH=\"+taxChallan.getMonth()+\" AND HRMS_BONUS_HDR.PAY_YEAR = \"+taxChallan.getYear()\r\n\t\t\t\t\t+ \" AND HRMS_BONUS_HDR.PAY_IN_SAL='N' AND HRMS_BONUS_HDR.DEDUCT_TAX='Y'\"\r\n\t\t\t\t\t+ \" GROUP BY HRMS_BONUS_EMP.EMP_ID, NVL(EMP_TOKEN,' '), NVL(EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,' ')\";\r\n\t\t\t\t\r\n\t\t\t} \r\n\t\t\tchallanQuery +=bonusQuery;\r\n\t\t\t\r\n\t\t\tif(taxChallan.getIncludeLeaveEncashment().equals(\"true\")){\r\n\t\t\t\tif(taxChallan.getIncludeSalary().equals(\"true\")){\r\n\t\t\t\t\tleaveEncashmentQuery +=\" UNION \";\r\n\t\t\t\t}\r\n\t\t\t\tleaveEncashmentQuery += \" SELECT HRMS_ENCASHMENT_PROCESS_DTL.EMP_ID AS EMPID, NVL(EMP_TOKEN,' ') AS ETOKEN, NVL(EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,' ') AS ENAME, TO_CHAR(SUM(NVL(ENCASHMENT_TDS_AMOUNT,0)),9999999990.99) AS AMT\"\r\n\t\t\t\t\t+ \" FROM HRMS_ENCASHMENT_PROCESS_DTL \"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_EMP_OFFC ON (HRMS_EMP_OFFC.EMP_ID = HRMS_ENCASHMENT_PROCESS_DTL.EMP_ID) \"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_ENCASHMENT_PROCESS_HDR ON (HRMS_ENCASHMENT_PROCESS_HDR.ENCASHMENT_PROCESS_CODE = HRMS_ENCASHMENT_PROCESS_DTL.ENCASHMENT_PROCESS_CODE)\"\r\n\t\t\t\t\t+ \" WHERE HRMS_ENCASHMENT_PROCESS_HDR.ENCASHMENT_PROCESS_DIVISION =\"+taxChallan.getDivId()+\" AND HRMS_ENCASHMENT_PROCESS_HDR.ENCASHMENT_INCLUDE_SAL_MONTH = \"+taxChallan.getMonth()\r\n\t\t\t\t\t+ \" AND HRMS_ENCASHMENT_PROCESS_HDR.ENCASHMENT_INCLUDE_SAL_YEAR= \"+taxChallan.getYear()+\" AND HRMS_ENCASHMENT_PROCESS_HDR.ENCASHMENT_INCLUDE_SAL_FLAG = 'N'\"\r\n\t\t\t\t\t+ \" GROUP BY HRMS_ENCASHMENT_PROCESS_DTL.EMP_ID, NVL(EMP_TOKEN,' '), NVL(EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,' ')\";\r\n\r\n\t\t\t} \r\n\t\t\tchallanQuery +=leaveEncashmentQuery;\r\n\t\t\t\r\n\t\t\tif(taxChallan.getIncludeOverTime().equals(\"true\")){\r\n\t\t\t\tif(taxChallan.getIncludeSalary().equals(\"true\")){\r\n\t\t\t\t\tOverTimeQuery +=\" UNION \";\r\n\t\t\t\t}\r\n\t\t\t\tOverTimeQuery += \"\";\r\n\t\t\t} \r\n\t\t\tchallanQuery +=OverTimeQuery;\r\n\t\t\t\r\n\t\t\tchallanQuery +=\" ) GROUP BY EMPID, ETOKEN, ENAME\";\r\n\t\t}catch(Exception e){\r\n\t\t\tlogger.error(\"exception in union challan query\",e);\r\n\t\t} //end of catch\r\n\t\treturn challanQuery;\r\n\t}", "String WHERE() { return yyline+\"/\"+yycolumn+\"(\"+yychar+\")\" ;}", "private static void selectEx() throws SQLException {\n ResultSet rs = stmt.executeQuery(\"SELECT name,score FROM students \\n\" +\n \"WHERE score >50;\");\n\n while (rs.next()) {\n System.out.println(rs.getString(\"name\") + \" \" + rs.getInt(\"score\"));\n }\n rs.close();\n }", "public static List<Book> searchBookByNameAndNameOfTheSeller(String name,String nameOfTheSeller) throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n\r\n Query query = session.getNamedQuery(\"INVENTORY_searchBookByNameAndNameOfTheSeller\").setString(\"name\", name).setString(\"nameOfTheSeller\", nameOfTheSeller);\r\n\r\n List<Book> resultList = query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return resultList;\r\n \r\n }", "public void searchAvailabilityType(Connection connection, String hotel_name, int branchID, String type, LocalDate from, LocalDate to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND type >= ? AND date_from <= to_date(?, 'YYYY-MM-DD') AND date_to = to_date(?, 'YYYY-MM-DD')\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n setType(type);\n pStmt.setString(3, getType());\n pStmt.setString(4, from.toString());\n pStmt.setString(5, to.toString());\n\n try {\n\n System.out.printf(\" Availabilities for %S type at %S, branch ID (%d): \\n\", getType(), getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while(rs.next()) {\n System.out.println(rs.getInt(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public Employee(String name, int salary)\n\n\t{\n\t\tthis.name = name;\n\t\tthis.salary = salary;\n\t}", "public int queryAllRows(Emp emp) throws Exception {\n\t\tint result = 0;\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tString sql = \"select count(*) from emp\";\n\t\t\tif (emp != null) {\n\t\t\t\tif (!(\"\").equals(emp.getEname())) {\n\t\t\t\t\tsql = sql + \" where ename like '%\" + emp.getEname() + \"%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tSQLQuery query = session.createSQLQuery(sql);\n\t\t\tList list = query.list();\n//\t\t\tBigInteger count = (BigInteger) list.get(0);\n//\t\t\trows = count.intValue();\n\t\t\tresult=(Integer) list.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t\treturn result;\n\t}", "public Employee(String name, double salary){\r\n\t\tthis.employeeName = name;\r\n\t\tthis.salary = salary;\r\n\t}", "public Employee(String fName, String lName, String gender, double salary) {\n this.fName = fName;\n this.lName = lName;\n this.gender = gender;\n this.salary = salary; \n }", "EmployeeDetail getById(long identifier) throws DBException;", "List<Employee> findAllByName(String name);", "@Query(\"FROM Consulta c WHERE c.fecha BETWEEN :fechaConsulta AND :fechaSgte\")\n\tList<Consulta> buscarFecha(@Param(\"fechaConsulta\") LocalDateTime fechaConsulta,@Param(\"fechaSgte\") LocalDateTime fechaSgte);", "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 }", "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 }", "@Query(value = \"SELECT * FROM account_details WHERE age < ?1\" , nativeQuery = true)\n List<Account> getAccountByAge(int age);", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyEmployee(String search_key) {\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listcust = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N' \"\r\n\t\t\t\t+ \" AND user.role.role_Name <>'\" + constantVal.ROLE_SADMIN + \"' \"\r\n\t\t\t\t+ \" and emp_name LIKE '%\" + search_key + \"%'\").list();\r\n\t\treturn listcust;\r\n\t\t\r\n\t}", "public List<Employee> findEmployee(String name) {\n\t\tCriteriaQuery<Employee> createQuery = emp.getCriteriaBuilder().createQuery(Employee.class);\n\t\tRoot<Employee> root = createQuery.from(Employee.class);\n\t\tcreateQuery.where(root.get(\"name\").in(name));\n\t\treturn emp.createQuery(createQuery).getResultList();\n\t}", "public Empleado ReadOne(int emp_no) throws SQLException {\r\n ResultSet rs;\r\n /*Sentencia SQL*/\r\n String sql = \"SELECT * FROM empleados WHERE emp_no = ?\";\r\n PreparedStatement sentencia = conexion.prepareStatement(sql);\r\n /*Setteamos los valores de la sentencia*/\r\n sentencia.setInt(1, emp_no);\r\n /*Ejecutar la sentencia*/\r\n sentencia.execute();\r\n rs = sentencia.getResultSet();\r\n rs.next();\r\n /*Guardamos los datos en el objeto*/\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 return emp;\r\n }", "public Employee getEmployeeById(Long custId)throws EmployeeException;", "List<Employee> allEmpInfo();", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyeyEmployee(String search_key, int branch_id) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listemp = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE\"\r\n\t\t\t\t+\" branchModel.branch_id = \"+ branch_id\r\n\t\t\t\t+\" and obsolete ='N'\"\r\n\t\t\t\t+\" and emp_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR empcategory LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR emp_address1 LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.location_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.address.city LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.address.district LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.address.state LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR emp_phoneno LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t/*+\" OR emp_email LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR dob LIKE '%\"+ search_key + \"%'\"\r\n\t\t\t\t+\" OR doj LIKE '%\" + search_key + \"%' AND user.role.role_Name <> '\"+ constantVal.ROLE_SADMIN +\"'\"*/).list();\r\n\t\treturn listemp;\r\n\t\t\r\n\t}", "@Query(\"SELECT p FROM Person p WHERE p.name=?1 OR p.age=?2\")\n List<Person> FindByNameOrAge(String name, Integer age);", "public final void query(Connection conn, String input) {\n\n try {\n pstmt = conn.prepareStatement(\"SELECT * FROM EMPLOYEES_INDEX\"\n + \" WHERE UPPER(employee_name) LIKE ?\");\n pstmt.setString(1, input.toUpperCase() + '%');\n rs = pstmt.executeQuery();\n while (rs.next()) {\n int id = rs.getInt(\"employee_id\");\n results.add(id);\n\n }\n } catch (SQLException e) {\n\n System.out.println(\"Could not query the table.\");\n\n }\n\n }", "public static List<Book> searchEBookByName(String name) throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n\r\n Query query = session.getNamedQuery(\"INVENTORY_searchBookByName\").setString(\"name\", name);\r\n\r\n List<Book> resultList = query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return resultList;\r\n \r\n }", "@Override\n\tpublic List<Employee> queryEmp() {\n\t\treturn null;\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyEmployee4SA(String search_key) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listcust = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N' and emp_name LIKE '%\" + search_key + \"%'\").list();\r\n\t\treturn listcust;\r\n\t\t\r\n\t}", "public String patientsOn10A(){\n String sql = \"SELECT a.patient_id \" +\n \" FROM orders a \" +\n \" JOIN drug_order b ON(a.order_id=b.order_id) \" +\n \" JOIN drug c ON(b.drug_inventory_id=c.drug_id) \" +\n \" JOIN cpad_regimen_drug d ON(c.drug_id=d.drug_id) \" +\n \" JOIN cpad_regimen e ON(d.regimen_id=e.regimen_id) \" +\n \" WHERE (e.name='10A=AZT(300)+DDL(125)+IDV/r (400/100)')\"+\n \" and a.date_created between (:startDate) and (:endDate) \";\n\n return sql;\n }", "public static List<Book> searchBookByNameOfSeller(String nameOfSeller) throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n\r\n Query query = session.getNamedQuery(\"INVENTORY_searchBookByNameOfTheSeller\").setString(\"nameOfTheSeller\", nameOfSeller);\r\n\r\n List<Book> resultList = query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return resultList;\r\n \r\n }", "public void retriveSearchSaleDataFromDB(String search1,String search2, String selection) throws SQLException {\r\n\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n\r\n\r\n Character x = '\\'';\r\n String y = \"%\";\r\n ResultSet rs = null;\r\n ResultSet rs2 = null;\r\n\r\n String searchWord = x + y + search1 + y + x;\r\n String searchWord1 = x + search1 + x;\r\n String searchWord2 = x + search2 + x;\r\n\r\n\r\n try (Connection con = DBConnection.getconnection(); Statement stmt = con.createStatement()) {\r\n\r\n // selction of the SQL statment depending on RadioButton clicked by the user\r\n if (selection.equals(\"SaleNumber\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.SaleNumber>=\" + search1 + \" AND \" + \"Sales.SaleNumber<=\" + search2; // filters rows by Sale Number\r\n rs = stmt.executeQuery(SQL);\r\n\r\n\r\n } else if (selection.equals(\"dateSelected\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Date between \" + searchWord1 + \" AND \" + searchWord2; // filters rows by selected date\r\n rs = stmt.executeQuery(SQL);\r\n\r\n\r\n } else if (selection.equals(\"customerName\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Customer like \" + searchWord; // filters rows by typed Customer Name\r\n rs = stmt.executeQuery(SQL);\r\n } else if (selection.equals(\"productName\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Product like \" + searchWord; // filters rows by typed Product Name\r\n rs = stmt.executeQuery(SQL);\r\n } else if (selection.equals(\"category\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Category like \" + searchWord; // filters rows by typed Category\r\n rs = stmt.executeQuery(SQL);\r\n }\r\n\r\n while (rs.next()) {\r\n addSaleToTableList(new Sales(rs.getInt(\"SaleNumber\"), simpleDateFormat.format(rs.getDate(\"Date\")), rs.getString(\"Time\"), rs.getString(\"Customer\"),\r\n rs.getString(\"Product\"), rs.getString(\"Code\"), rs.getString(\"Size\"),\r\n rs.getString(\"Units\"), rs.getString(\"Category\"), rs.getString(\"Quantity\"), rs.getString(\"UnitPrice\"), rs.getString(\"SalePrice\")));\r\n\r\n }\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "private void preparedStatementForEmployeeData() {\n\t\ttry {\n\t\t\tConnection connection = this.getConnection();\n\t\t\tString sql = \"Select * from employee_payroll_2 WHERE name = ?\";\n\t\t\temployeePayrollDataStatement = connection.prepareStatement(sql);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tConnection con=null;\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tcon=DriverManager.getConnection(\"jdbc:oracle:thin:@apollo.vse.gmu.edu:1521:ite10g\",\"pdatla2\",\"phejyc\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\tint i=0;\n\t\tint j=1;\n\t\ttry\n\t\t{\n\t\t\t//ArrayList<String> l1= new ArrayList<String>();\n\t\t\tStatement st;\n\t\t\tSystem.out.println(\"List of Employees part of the Research Department:\");\n\t\t\tst = con.createStatement();\n\t\t\tResultSet rs=st.executeQuery(\"select E.Lname, E.ssn from Employee E, Department D where E.Dno=D.Dnumber and Dname='Research'\");\n\t\t\t//i=ps.executeUpdate();\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tSystem.out.println(j+\")\");\n\t\t\t\tSystem.out.print(\"Last Name: \"+rs.getString(1));\n\t\t\t\tSystem.out.println(\"\tSSN: \"+rs.getString(2));\n\t\t\t\tj++;\n\t\t\t\t//l1.add(rs.getString(1));\n\t\t\t}\n\t\t} \n\t\t\n\t\tcatch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//System.out.println(\"catch block in studentDAO reached\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyeyEmployeeforSA(String search_key) {\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listemp = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N' and emp_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR empcategory LIKE '%\" + search_key + \"%' OR emp_code LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR branchModel.branch_name LIKE '%\" + search_key + \"%' OR emp_address1 LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR emp_address2 LIKE '%\" + search_key + \"%' OR location.location_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR location.address.city LIKE '%\" + search_key + \"%' OR location.address.district LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR location.address.state LIKE '%\" + search_key + \"%' OR emp_phoneno LIKE '%\" + search_key + \"%' OR emp_email LIKE '%\" + search_key + \"%' OR dob LIKE '%\"+ search_key + \"%'\"\r\n\t\t\t\t+ \" OR doj LIKE '%\" + search_key + \"%'\").list();\r\n\t\treturn listemp;\r\n\t\t\r\n\t}", "public void salary(int sal)\n {\n IT it = new IT();\n it.salary(sal);\n System.out.println(\"ECE Faculty: \"+(sal+4500));\n }", "public void generalSearch(Connection connection, LocalDate check_in, LocalDate check_out, int party_size, String city) throws SQLException {\n\n String sql = \"SELECT I.hotel_name, I.branch_ID, I.type, I.price FROM INFORMATION I, ROOM R, HOTEL_ADDRESS HA WHERE R.capacity >= ? AND HA.city = ? AND I.date_from >= to_date(?, 'YYYY-MM-DD') AND I.date_from <= to_date(?,'YYYY-MM-DD') GROUP BY I.date_from, I.date_to HAVING I.num_avail > 0\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setPartySize(party_size);\n pStmt.setInt(1, getPartySize());\n setCity(city);\n pStmt.setString(2, getCity());\n pStmt.setString(3, check_in.toString());\n pStmt.setString(4, check_out.toString());\n\n ResultSet rs = null;\n\n try {\n\n System.out.printf(\" Hotels available: \");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getString(3) + \" \" + rs.getInt(4));\n }\n }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n if (rs != null){\n rs.close();\n }\n }\n }", "List<SrHotelRoomInfo> selectByExample(SrHotelRoomInfoExample example);", "public List<TblPurchaseOrder>getAllDataPurchaseOrder(Date startDate,Date endDate,TblPurchaseOrder po,TblSupplier supplier);", "public static ArrayList<HashMap<String, String>> getSuperAdminLoanBookWithSearch(\r\n\t\t\tint start, int length, String search, String orde, int col) {\r\n\t\tArrayList<HashMap<String, String>> list = new ArrayList<>();\r\n\t\tCallableStatement call = null;\r\n\t\tResultSet rs;\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\r\n\t\t\tcall = con\r\n\t\t\t\t\t.prepareCall(\"{CALL get_loan_book_data_by_search_asc_desc(?,?,?,?,?)}\");\r\n\t\t\tcall.setInt(1, start);\r\n\t\t\tcall.setInt(2, length);\r\n\t\t\tcall.setString(3, search);\r\n\t\t\tcall.setString(4, orde);\r\n\t\t\tcall.setInt(5, col);\r\n\t\t\trs = call.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tHashMap<String, String> map = new HashMap<>();\r\n\t\t\t\tmap.put(\"applianceId\", rs.getInt(\"appliance_id\") + \"\");\r\n\t\t\t\tmap.put(\"customerName\", rs.getString(\"customer_name\"));\r\n\t\t\t\t// map.put(\"loanId\", rs.getInt(\"loan_id\")+\"\");\r\n\t\t\t\tmap.put(\"applianceName\", rs.getString(\"appliance_name\"));\r\n\r\n\t\t\t\tmap.put(\"applianceNumber\", rs.getString(\"imei_number\"));\r\n\r\n\t\t\t\tmap.put(\"cityName\", rs.getString(\"city_name\"));\r\n\t\t\t\tmap.put(\"monthlyPay\", Math.round(rs.getDouble(\"monthly_pay\"))\r\n\t\t\t\t\t\t+ \"\");\r\n\t\t\t\tmap.put(\"installmentScheme\", rs.getInt(\"installment_scheme\")\r\n\t\t\t\t\t\t+ \"\");\r\n\t\t\t\tmap.put(\"downPayment\", Math.round(rs.getDouble(\"down_payment\"))\r\n\t\t\t\t\t\t+ \"\");\r\n\t\t\t\tmap.put(\"cummalativePaid\", rs.getInt(\"cummalative_paid\") + \"\");\r\n\t\t\t\tmap.put(\"statusGet\", rs.getString(\"status_get\"));\r\n\t\t\t\tmap.put(\"cummalativeDue\", rs.getInt(\"cummalative_due\") + \"\");\r\n\t\t\t\t// map.put(\"appliancePrice\",\r\n\t\t\t\t// rs.getDouble(\"appliance_price\")+\"\");\r\n\t\t\t\tmap.put(\"totalPaid\", rs.getInt(\"total_paid\") + \"\");\r\n\t\t\t\tmap.put(\"remainingBalance\",\r\n\t\t\t\t\t\tMath.round(rs.getDouble(\"remaining_balance\")) + \"\");\r\n\t\t\t\tmap.put(\"remaining_days\", rs.getInt(\"remaining_days\") + \"\");\r\n\t\t\t\tif (rs.getInt(\"rating\") == 0) {\r\n\t\t\t\t\tmap.put(\"customer_rating\", \"N/A\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmap.put(\"customer_rating\", rs.getInt(\"rating\") + \" %\");\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(map);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", 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\treturn list;\r\n\t}", "public void setSalaryRange(String salaryRange) {\r\n this.salaryRange = salaryRange;\r\n }" ]
[ "0.6554963", "0.60805786", "0.5917012", "0.5652853", "0.5312912", "0.5309388", "0.5190418", "0.51551396", "0.5152166", "0.51481473", "0.5144514", "0.51241845", "0.5077688", "0.5066793", "0.5050013", "0.5044726", "0.5043904", "0.5036741", "0.50347996", "0.50242156", "0.5004509", "0.5003896", "0.49888718", "0.4960006", "0.4950006", "0.4938594", "0.492794", "0.49147183", "0.4914287", "0.4911317", "0.49094594", "0.4888594", "0.48874304", "0.48596922", "0.48399827", "0.4819483", "0.4817203", "0.48158935", "0.48112425", "0.48061684", "0.48029068", "0.4802235", "0.47998777", "0.47982067", "0.47959554", "0.47926086", "0.47907045", "0.47887912", "0.47708237", "0.4731135", "0.4725369", "0.47233945", "0.4713846", "0.47118697", "0.47030035", "0.4702191", "0.4698986", "0.4687845", "0.4684739", "0.46842664", "0.4680452", "0.46802244", "0.467777", "0.46667263", "0.46623653", "0.46616745", "0.46475148", "0.46446323", "0.46439558", "0.4638237", "0.4635161", "0.4634679", "0.46342066", "0.46204716", "0.46204138", "0.4618309", "0.46157014", "0.4607704", "0.46040818", "0.45917013", "0.45899174", "0.45857728", "0.4583737", "0.45761544", "0.45759776", "0.45721895", "0.4561664", "0.45593807", "0.45565316", "0.45552695", "0.45512637", "0.45512632", "0.454948", "0.45450157", "0.45434538", "0.4529891", "0.45250937", "0.45216236", "0.45188382", "0.4516836" ]
0.68670774
0
SELECT ENO,ENAME,EADD,ESALARY FROM EMPLOYE WHERE ENAME LIKE '?' AND EADD LIKE '?'
public List<Employe> findByEnameStartingWithAndEaddStartingWith(String name,String addrs);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String employeeExists(String eid, String pass){\n return \"select e_fname from employee where e_id = '\"+eid+\"' and e_pass = '\"+pass+\"'\";\n }", "public List<Employe> findByEnameAndEadd(String name,String add);", "@Query(\"FROM Employee WHERE name = :name OR location = :location \")\n List<Employee> getEmployeeByNameOrLocation(String name, String location);", "public List<Employe> findByEnoGreaterThanEqualAndEnameEndingWithOrEsalBetween(int Eno,String name,float startSalary,float endSalary);", "public List<Employe> findByEnameInOrEaddIn(List<String> names,List<String> addresses);", "public List<Emp> queryEmp(Emp emp, int pageNo, int pageSize)\n\t\t\tthrows Exception {\n\t\tList<Emp> empList = null;\n\t\tSession session = null;\n\t\tint beginPos = (pageNo - 1) * pageSize;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tString hql = \"from Emp where 1=1\";\n\t\t\tif (emp != null) {\n\t\t\t\tif (!(\"\").equals(emp.getEname())) {\n\t\t\t\t\thql = hql + \" and ename like '%\" + emp.getEname() + \"%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setFirstResult(beginPos);\n\t\t\tquery.setMaxResults(pageSize);\n\t\t\tempList = query.list();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t\treturn empList;\n\t}", "String WHERE() { return yyline+\"/\"+yycolumn+\"(\"+yychar+\")\" ;}", "@Query(value = \"select * from account_details where name ILIKE concat('%',?1,'%')\"+\n \" or country ILIKE concat('%',?1,'%') or address ILIKE concat('%',?1,'%')\"+\n \" or state ILIKE concat('%',?1,'%')\"+\n \" or city ILIKE concat('%',?1,'%')\",nativeQuery = true)\n List<AccountDetail> retrieveAllBySearchCriteria(String pattern);", "@Override\n\tString searchEmployee(String snum) {\n\t\treturn null;\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyeyEmployee(String search_key, int branch_id) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listemp = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE\"\r\n\t\t\t\t+\" branchModel.branch_id = \"+ branch_id\r\n\t\t\t\t+\" and obsolete ='N'\"\r\n\t\t\t\t+\" and emp_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR empcategory LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR emp_address1 LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.location_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.address.city LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.address.district LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.address.state LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR emp_phoneno LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t/*+\" OR emp_email LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR dob LIKE '%\"+ search_key + \"%'\"\r\n\t\t\t\t+\" OR doj LIKE '%\" + search_key + \"%' AND user.role.role_Name <> '\"+ constantVal.ROLE_SADMIN +\"'\"*/).list();\r\n\t\treturn listemp;\r\n\t\t\r\n\t}", "public List<Employee> findEmployee(String name) {\n\t\tCriteriaQuery<Employee> createQuery = emp.getCriteriaBuilder().createQuery(Employee.class);\n\t\tRoot<Employee> root = createQuery.from(Employee.class);\n\t\tcreateQuery.where(root.get(\"name\").in(name));\n\t\treturn emp.createQuery(createQuery).getResultList();\n\t}", "List<Employee> findByNameAndLocation(String name, String location);", "public ResultSet getCertainRow(String itemname, String tableName, String columnName)\n {\n\n String selectStr;\n ResultSet rs=null;\n String itemn=\"%\"+itemname+\"%\";\n\n try{\n\n selectStr=\"SELECT * FROM \"+tableName+\" WHERE \"+ columnName+\" LIKE \"+quotate(itemn);\n rs = stmt.executeQuery(selectStr);\n\n\n\n\n\n }catch(Exception e){\n System.out.println(\"Error occurred in searchLogin\");\n }\n\n return rs;\n }", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyeyEmployeeforSA(String search_key) {\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listemp = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N' and emp_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR empcategory LIKE '%\" + search_key + \"%' OR emp_code LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR branchModel.branch_name LIKE '%\" + search_key + \"%' OR emp_address1 LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR emp_address2 LIKE '%\" + search_key + \"%' OR location.location_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR location.address.city LIKE '%\" + search_key + \"%' OR location.address.district LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR location.address.state LIKE '%\" + search_key + \"%' OR emp_phoneno LIKE '%\" + search_key + \"%' OR emp_email LIKE '%\" + search_key + \"%' OR dob LIKE '%\"+ search_key + \"%'\"\r\n\t\t\t\t+ \" OR doj LIKE '%\" + search_key + \"%'\").list();\r\n\t\treturn listemp;\r\n\t\t\r\n\t}", "public String enameGet(String emp_id) throws Exception;", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyEmployee(String search_key) {\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listcust = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N' \"\r\n\t\t\t\t+ \" AND user.role.role_Name <>'\" + constantVal.ROLE_SADMIN + \"' \"\r\n\t\t\t\t+ \" and emp_name LIKE '%\" + search_key + \"%'\").list();\r\n\t\treturn listcust;\r\n\t\t\r\n\t}", "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 Employee searchEmployee(String empName)\n {\n empName = empName.toLowerCase();\n Employee found = null;\n // Find the employee in the array list\n Iterator<Employee> emp = employees.iterator();\n while(emp.hasNext() && found == null)\n {\n myEmployee = emp.next(); //get employee from array list\n String fullName = myEmployee.getName().toLowerCase();\n String[] FirstLast = fullName.split(\" \");\n \n if (\n matchString(fullName,empName) ||\n matchString(FirstLast[0],empName) ||\n matchString(FirstLast[1],empName)\n )\n found = myEmployee;\n } \n return found;\n }", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyEmployee4SA(String search_key) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listcust = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N' and emp_name LIKE '%\" + search_key + \"%'\").list();\r\n\t\treturn listcust;\r\n\t\t\r\n\t}", "@GetMapping(value=\"/searchEmpData/{fname}\")\n\tpublic List<Employee> getEmployeeByName(@PathVariable (value = \"fname\") String fname)\n\t{\n\t\treturn integrationClient.getEmployees(fname);\n\t}", "private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }", "List<Employee> findByNameContaining(String keyword, Sort sort);", "public List<User> findUserEmployeeIdByPartion(String employeeIDpart) {\n\t\tTypedQuery<User> query = em.createQuery(\"select u from User u where u.employeeId like :emplyeID\", User.class);\n\t\tquery.setParameter(\"emplyeID\", \"%\" + employeeIDpart + \"%\");\n\t\treturn query.setFirstResult(0).setMaxResults(10).getResultList();\n\t}", "public List<Employee_mst> listEmployeeByBranch(final String branch) {\n final StringBuilder query = new StringBuilder();\n query.append(\"SELECT e FROM Employee_mst e, Authority_mst a WHERE e.emp_delete_flg = 'false' \");\n query.append(\" AND (e.emp_condi_code = '0' OR e.emp_condi_code IS NULL) \");\n query.append(\" AND e.emp_settle_authority=a.aut_code \");\n\n if (SummaryReportConstants.HQ_CODE.equals(branch)) {\n query.append(\" AND a.aut_code = \" + AuthorityLevels.HEAD_QUARTER);\n }\n else if (!StringUtils.isEmpty(branch)) {\n query.append(\" AND a.aut_code = \" + AuthorityLevels.BRANCH).append(\" AND e.emp_adpcode = '\" + branch + \"'\");\n }\n\n query.append(\" ORDER BY e.emp_code\");\n List<Employee_mst> results = super.emMain.createQuery(query.toString(), Employee_mst.class).getResultList();\n return results;\n }", "public final void query(Connection conn, String input) {\n\n try {\n pstmt = conn.prepareStatement(\"SELECT * FROM EMPLOYEES_INDEX\"\n + \" WHERE UPPER(employee_name) LIKE ?\");\n pstmt.setString(1, input.toUpperCase() + '%');\n rs = pstmt.executeQuery();\n while (rs.next()) {\n int id = rs.getInt(\"employee_id\");\n results.add(id);\n\n }\n } catch (SQLException e) {\n\n System.out.println(\"Could not query the table.\");\n\n }\n\n }", "List<Employee> findByName(String name);", "public List<EmployeeEntity> getEmployeeDataByName(String name, StorageContext context)\n\t\t\tthrows PragmaticBookSelfException {\n\t\tList<EmployeeEntity> result = null;\n\t\ttry {\n\t\t\tSession hibernateSeesion = context.getHibernateSession();\n\t\t\tString retrieveEmployeebyNameQuery = \"FROM EmployeeEntity e WHERE e.fname LIKE :fname or e.lname LIKE :lname\";\n\t\t\tQuery query = hibernateSeesion.createQuery(retrieveEmployeebyNameQuery);\n\t\t\tquery.setParameter(\"fname\", name);\n\t\t\tquery.setParameter(\"lname\", name);\n\t\t\tresult = (List<EmployeeEntity>) query.list();\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\t\treturn result;\n\t}", "@Query(\"select i from Item i where lower(i.name) like lower(:namePart)\")\n List<Item> searchInNames(@Param(\"namePart\") String namePart);", "@Transactional\n\t@Override\n\tpublic List<Employee> getByName(String name) {\n\t\treturn entityManager.createQuery(\"Select e from Employee e where e.name like ?0\", Employee.class)\n\t\t\t\t.setParameter(0, \"%\"+name+\"%\").getResultList();\n\t\t\n\t\t\n\t}", "@Query(\"SELECT s FROM Store s WHERE s.storename LIKE %?1%\" + \" OR CONCAT(s.address, '') LIKE %?1%\")\n\tpublic List<Store> search(String keyword);", "@Test\n\tpublic void selectFromCourseTable_where() {\n\t\tList arrayList = em.createNamedQuery(\"query_with_where_name_like_call\",Course.class).getResultList();\n\t\tlogger.info(\"\\n\\n>>>>>>> Select c FROM Course c WHERE name like '%call%' -> {}\", arrayList);\n\t}", "public String displayAllEmployees(){\n String p = \" \";\n \n try {\n \n emprs = stmt.executeQuery \n (\"SELECT * FROM JEREMY.EMPLOYEE\");\n p = loopDBEMPInfo(emprs);\n emprs.close();\n } catch (Exception e) {\n System.out.println(\"SQL problem \" + e);\n }\n \n return p;\n}", "@GetMapping(value = \"/search\")\n\tpublic String searchName(@RequestParam(name = \"fname\") String fname, Model model) {\n\t\tmodel.addAttribute(\"employees\", employeerepository.findByFnameIgnoreCaseContaining(fname));\n\t\treturn \"employeelist\";\n\t}", "private String getQueryString(String searchType) {\n String queryString;\n\n if (searchType.equals(\"employeeId\")) {\n queryString = \"SELECT * FROM employees WHERE emp_id = ?\";\n } else if (searchType.equals(\"firstName\")) {\n queryString = \"SELECT * FROM employees WHERE first_name LIKE ?\";\n } else {\n queryString = \"SELECT * FROM employees WHERE last_name LIKE ?\";\n }\n\n\n return queryString;\n }", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchDriver(String search_key) {\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listemp = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N'\"\r\n\t\t\t\t+ \" AND empcategory LIKE '%Driver%'\"\t\r\n\t\t\t\t+ \"and emp_name LIKE '%\"+search_key+\"%'\").list();\r\n\t\treturn listemp;\r\n\t\t\r\n\t}", "public ResultSet retrivecompname(String compname)throws Exception {\n\trs=DbConnect.getStatement().executeQuery(\"select compname from company where comp_id=\"+compname+\"\");\r\n\treturn rs;\r\n}", "public static void main(String[] args) throws SQLException {\n\t\tConnection conn= DriverManager.getConnection(\"jdbc:oracle:thin:@coestudb.qu.edu.qa:1521/STUD.qu.edu.qa\",\"scott\",\"tiger123\");\n\t\tPreparedStatement stmt = conn.prepareStatement(\"select empno,ename,sal,hiredate from emp where sal>? and job=?\");\n\t\tstmt.setDouble(1, 2000);\n\t\tstmt.setString(2, \"MANAGER\");\n\t\tResultSet rs = stmt.executeQuery();\n\t\twhile (rs.next()){\n\t\t\tint num = rs.getInt(1);\n\t\t\tString name = rs.getString(2);\n\t\t\tdouble sal = rs.getDouble(3);\n\t\t\tDate hire = rs.getDate(4);\n\t\t\tSystem.out.println(num+\" \"+name+\" \"+sal+\" \"+hire);\n\t\t}\n\t\trs.close();\n\t\tconn.close();\n\t}", "public static void main(String[] args) {\n\t\tString dbur1 = \"jdbc:oracle:thin:@localhost:1521:xe\";// 로컬호스트 본인컴퓨터~ 포트 1521 sid(I) XE\n//\t\tString dbuser = \"C##BITUSER\";\n//\t\tString dbpass = \"bituser\";\n\n\t\tString dbpass = \"hr\";\n\t\tString dbuser = \"hr\";\n\t\tStatement stmt = null;\n\t\tResultSet re = null;\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tconn = DriverManager.getConnection(dbur1, dbuser, dbpass);\n\t\t\tSystem.out.println(conn);\n\t\t\tSystem.out.println(\"접속성공!\");\n\t\t\tstmt = conn.createStatement();\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tSystem.out.print(\"검색할 이름 혹은 성을 입력해주세요 :>\");\n\t\t\tString scc = sc.next();\n\t\t\t\n\t\t\tString sql = \"SELECT first_name|| ' ' || last_name name, email, hire_date \"\n\t\t\t\t\t+ \"FROM employees \"\n\t\t\t\t\t+ \"WHERE first_name LIKE '%\"+scc+\"%'\"\n\t\t\t\t\t\t\t+ \"OR last_name LIKE '%\"+scc+\"%'\";\n\t\t\tre = stmt.executeQuery(sql);\n\n\t\t\twhile (re.next()) {\n\t\t\t\tString deptId = re.getString(\"name\");\n\t\t\t\tString deptName = re.getNString(\"email\");\n\t\t\t\tString date = re.getString(\"hire_date\");\n\t\t\t\tSystem.out.println(deptId + \" \" + deptName + \" \" + date);\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.err.println(\"드라이버로드 실패\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\t// TODO: handle exception\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tconn.close();\n\t\t\t} catch (Exception e2) {\n\t\t\t\te2.printStackTrace();\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Query(\"SELECT p FROM Person p WHERE p.name=?1 OR p.age=?2\")\n List<Person> FindByNameOrAge(String name, Integer age);", "public void searchEmployee(TaxChallan taxChallan, HttpServletRequest request) {\r\n\t\tObject data[][] = null;\r\n\t\ttry {\r\n\t\t\tString challanQuery = \"SELECT HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE,HRMS_TAX_CHALLAN_DTL.EMP_ID,EMP_TOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,HRMS_TAX_CHALLAN_DTL.CHALLAN_TDS,\"\r\n\t\t\t\t\t+ \" TO_CHAR(NVL(HRMS_TAX_CHALLAN_DTL.CHALLAN_SURCHARGE,0), 9999999990.99),TO_CHAR(NVL(HRMS_TAX_CHALLAN_DTL.CHALLAN_EDU_CESS,0), 9999999990.99),TO_CHAR(NVL(HRMS_TAX_CHALLAN_DTL.CHALLAN_TOTAL_TAX,0), 9999999990.99) \" \r\n\t\t\t\t\t+ \" FROM HRMS_TAX_CHALLAN_DTL \"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_TAX_CHALLAN ON(HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE=HRMS_TAX_CHALLAN.CHALLAN_CODE)\"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_EMP_OFFC ON(HRMS_TAX_CHALLAN_DTL.EMP_ID=HRMS_EMP_OFFC.EMP_ID)\"\r\n\t\t\t\t\t+ \" WHERE HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE=\"\r\n\t\t\t\t\t+ taxChallan.getChallanID()\r\n\t\t\t\t\t+ \" ORDER BY EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME\";\r\n\t\t\tdata = getSqlModel().getSingleResult(challanQuery);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"exception in challanQuery in getChallanRecords method\",e);\r\n\t\t} //end of catch\r\n\t\t\r\n\t\tif(data.length> 0 && data!=null){\r\n\t\t\tint rownum = 0;\r\n\t\t\tfor (int i = 0; i < data.length; i++) {\r\n\t\t\t\tif(String.valueOf(data[i][1]).equals(taxChallan.getSearchForEmpId())){\r\n\t\t\t\t\trownum = i;\r\n\t\t\t\t} //end of if\r\n\t\t\t} //end of loop\r\n\t\t\tlogger.info(\"rownum======\"+rownum);\r\n\t\t\tint recPerPage = 20;\r\n\t\t\tString[] pageIndex = Utility.doPaging(taxChallan.getMyPage(), data.length, recPerPage);\r\n\t\t\tif (pageIndex == null) {\r\n\t\t\t\tpageIndex[0] = \"0\";\r\n\t\t\t\tpageIndex[1] = \"20\";\r\n\t\t\t\tpageIndex[2] = \"1\";\r\n\t\t\t\tpageIndex[3] = \"1\";\r\n\t\t\t\tpageIndex[4] = \"\";\r\n\t\t\t} //end of if\r\n\t\t\trequest.setAttribute(\"totalPage\", Integer.parseInt(String\r\n\t\t\t\t\t.valueOf(pageIndex[2])));\r\n\t\t\t\r\n\r\n\t\t\tif (pageIndex[4].equals(\"1\"))\r\n\t\t\t\ttaxChallan.setMyPage(\"1\");\r\n\t\t\t\r\n\t\t\ttaxChallan.setListFlag(\"true\");\r\n\t\t\tArrayList<Object> chList = new ArrayList<Object>();\r\n\t\t\t\r\n\t\t\tint startRecNo = 0;\r\n\t\t\tint endRecNo = 0;\r\n\t\t\t\r\n\t\t\tint pageDiv = rownum/recPerPage;\r\n\t\t\t\r\n\t\t\tstartRecNo = pageDiv * recPerPage;\r\n\t\t\tendRecNo = startRecNo + recPerPage - 1;\r\n\t\t\t\r\n\t\t\tif(data.length <= endRecNo){\r\n\t\t\t\tendRecNo = data.length-1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlogger.info(\"startRecNo======\"+startRecNo);\r\n\t\t\tlogger.info(\"endRecNo======\"+endRecNo);\r\n\t\t\tint pageRemainder = (rownum+1)%recPerPage;\r\n\t\t\tlogger.info(\"pageRemainder======\"+pageRemainder);\r\n\t\t\t\r\n\t\t\tint highlightRec = 0;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(pageRemainder > 0){\r\n\t\t\t\tpageDiv = pageDiv+1;\r\n\t\t\t\thighlightRec = pageRemainder - 1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tpageDiv = pageDiv+1;\r\n\t\t\t\thighlightRec = recPerPage - 1;\r\n\t\t\t}\r\n\t\t\trequest.setAttribute(\"highlightRec\", highlightRec);\r\n\t\t\tlogger.info(\"highlightRec======\"+highlightRec);\r\n\t\t\trequest.setAttribute(\"pageNo\", pageDiv);\r\n\t\t\ttaxChallan.setMyPage(String.valueOf(pageDiv));\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tfor (int i = startRecNo; i <= endRecNo; i++) {\r\n\t\t\t\t\tTaxChallan bean=new TaxChallan(); \r\n\t\t\t\t\tbean.setChallanCode(String.valueOf(data[i][0]));//Challan Code\r\n\t\t\t\t\tbean.setEmpId(String.valueOf(data[i][1]));//Employee Id\r\n\t\t\t\t\tbean.setEmpToken(String.valueOf(data[i][2]));//Token No.\r\n\t\t\t\t\tbean.setEmpName(String.valueOf(data[i][3]));//Emp Name\r\n\t\t\t\t\tbean.setChallanTax(Utility.twoDecimals(String.valueOf(data[i][4])));//Tds\r\n\t\t\t\t\tbean.setChallanSurcharge(Utility.twoDecimals(String.valueOf(data[i][5])));//Surcharge\r\n\t\t\t\t\tbean.setChallanEduCess(Utility.twoDecimals(String.valueOf(data[i][6])));//Education cess\r\n\t\t\t\t\tbean.setChallanTotTax(Utility.twoDecimals(String.valueOf(data[i][7])));\t//Total Tax\r\n\t\t\t\t\r\n\t\t\t\t\tchList.add(bean);\r\n\t\t\t\t} //end of loop\r\n\t\t\t}catch (Exception e) {\r\n\t\t\t\tlogger.error(\"exception in data loop\",e);\r\n\t\t\t} //end of catch\r\n\t\t\t taxChallan.setChallanList(chList);\r\n\t\t} //end of if\r\n\t\t\r\n\t\tint fromYear=0;\r\n\t\tint toYear=0;\r\n\t\tif(Integer.parseInt(taxChallan.getMonth())>=4 && Integer.parseInt(taxChallan.getMonth())<=12) {\r\n\t\t\tfromYear =Integer.parseInt(taxChallan.getYear());\r\n\t\t\ttoYear=fromYear+1;\r\n\t\t } //end of if\r\n\t\telse if(Integer.parseInt(taxChallan.getMonth())>=1 && Integer.parseInt(taxChallan.getMonth())<=3) {\r\n\t\t fromYear =Integer.parseInt(taxChallan.getYear())-1;\r\n\t\t toYear=Integer.parseInt(taxChallan.getYear());\r\n\t\t} //end of else if\t\r\n\t\t\r\n\t\tString empIncomeQuery = \"SELECT TO_CHAR(NVL(TDS_TAXABLE_INCOME,0), 9999999990.99),TDS_EMP_ID FROM HRMS_TDS \" \r\n\t\t\t+\" LEFT JOIN HRMS_EMP_OFFC ON (HRMS_EMP_OFFC.EMP_ID = HRMS_TDS.TDS_EMP_ID) \"\r\n\t\t\t+\" WHERE TDS_FROM_YEAR=\"+fromYear+\" AND TDS_TO_YEAR=\"+toYear+\" AND EMP_DIV = 22 \"\r\n\t\t\t+\" ORDER BY TDS_EMP_ID\";\r\n\t\t\tObject empTaxIncome[][] = getSqlModel().getSingleResult(empIncomeQuery);\r\n\t\t\t try {\r\n\t\t\t\t\tif(empTaxIncome != null && empTaxIncome.length != 0){\r\n\t\t\t\t\t\t ArrayList<Object> valuesList = new ArrayList<Object>();\r\n\t\t\t\t\t\t for (int i = 0; i < empTaxIncome.length; i++) {\r\n\t\t\t\t\t\t\t\t TaxChallan bean = new TaxChallan();\r\n\t\t\t\t\t\t\t\t bean.setHidListEmpId(String.valueOf(empTaxIncome[i][1]));\r\n\t\t\t\t\t\t\t\t bean.setHidListTdsIncome(String.valueOf(empTaxIncome[i][0]));\r\n\t\t\t\t\t\t\t\t valuesList.add(bean);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttaxChallan.setValuesList(valuesList);\r\n\t\t\t\t\t }\r\n\t\t\t\t} catch (RuntimeException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\ttaxChallan.setEnterTotalTax(\"0\");\r\n\t\t\ttaxChallan.setAddedTds(\"0\");\r\n\t\t\ttaxChallan.setAddedSurcharge(\"0\");\r\n\t\t\ttaxChallan.setAddedEduCess(\"0\");\r\n\t\t\ttaxChallan.setAddEmpId(\"\");\r\n\t\t\ttaxChallan.setAddEmpToken(\"\");\r\n\t\t\ttaxChallan.setAddEmpName(\"\");\r\n\t\t\ttaxChallan.setF9AddEmpFlag(\"false\");\r\n\t\t\r\n\t}", "@Query(\"SELECT i FROM Item i WHERE \"+\n \"upper(i.name) LIKE concat('%',upper(?1),'%') OR \"+\n \"upper(i.number) LIKE concat('%',upper(?1),'%') OR \"+\n \"upper(i.waybill) LIKE concat('%',upper(?1),'%') OR \"+\n \"upper(i.factory) LIKE concat('%',upper(?1),'%')\")\n Page<Item> filterAll(String substring, Pageable pageable);", "List<Employee> findAllByName(String name);", "@Query(value = \"SELECT * FROM account_details where name ILIKE concat('%',?1,'%') OR country ILIKE concat('%', ?1, '%') OR address ILIKE concat('%', ?1, '%') OR state ILIKE concat('%', ?1, '%')\",\n nativeQuery = true)\n List<Account> getSpecificAccount(String pattern);", "@Repository\npublic interface EmpresaRepository extends JpaRepository<Empresa, Long> {\n\n Optional<Empresa> findById(Long pollId);\n\n Page<Poll> findByCreatedBy(Long userId, Pageable pageable);\n\n @Query(\"select e from Empresa e where ( :nome is null or lower(e.user.name) like lower(concat('%', :nome,'%')) ) and ( :categoriaEmpresa is null or e.categoriaEmpresa = :categoriaEmpresa) \")\n\tPage<Empresa> getEmpresasByFilters(@Param(\"nome\")String nome, @Param(\"categoriaEmpresa\")CategoriaEmpresa categoriaEmpresa, Pageable pageable);\n\n}", "public static void main(String[] args) {\n\ntry {\n\t\t\t\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tConnection c= DriverManager.getConnection(\"jdbc:oracle:thin:@artemis.vsnet.gmu.edu:1521/vse18c.vsnet.gmu.edu\",\"spallemp\",\"vortetoa\");\n\t\t\tStatement st = c.createStatement();\n\t\t\tResultSet re = st.executeQuery(\"select e.lname, e.ssn, w.hours from employee e, project p, works_on w where e.ssn=w.essn and w.pno=p.pnumber and e.dno=p.dnum and plocation='Houston' and pname='ProductZ'\");\n\t\t\n\t\t\t\t\twhile (re.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(re.getString(1) + \",\" + re.getString(2)+ \",\" + re.getString(3));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Closing the connection\n\t\t\t\t\tc.close();\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t}\n\t\t\n\t\t\t}", "@Query(value = \"SELECT * FROM account_details WHERE name ilike concat('%',?1,'%')\"\n ,nativeQuery = true)\n List<Account> readAccountByPattern(String pattern);", "public boolean searchCertainItem(String itemname, String tableName, String columnName)\n {\n String selectStr;\n ResultSet rs;\n try{\n\n selectStr=\"SELECT \"+itemname+\" FROM \"+tableName+\" WHERE \"+ columnName+\" = \"+quotate(itemname);\n rs = stmt.executeQuery(selectStr);\n\n while (rs.next())\n {\n return true;\n }\n }catch(Exception e){\n System.out.println(\"Error occurred in searchLogin\");\n }\n\n return false;\n\n }", "@RequestMapping(method=RequestMethod.POST ,value=\"/searchemployee\")\n\tpublic ModelAndView getEmployee(@RequestParam int employee_id )\n\t{\n\t\tSystem.out.println(\"INSIDE search by eid\");\n\t\t\n\t\tEmployeeRegmodel erobj= ergserv.getEmployeeRecordFromDB(employee_id);\n\t\t\n\t\tModelAndView mv= new ModelAndView();\n\t\t\t\tif(erobj.getEmployee_fullname()!= null)\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"stinfo\", erobj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"msg\", \"INVALID Employee ID\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmv.setViewName(\"ShowEmployeeDetails.jsp\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn mv;\n\t}", "public boolean searchCertainItem(String itemname, String tableName)\n {\n String selectStr;\n ResultSet rs;\n try{\n\n selectStr=\"SELECT \"+itemname+\" FROM \"+tableName;\n rs = stmt.executeQuery(selectStr);\n\n while (rs.next())\n {\n return true;\n }\n }catch(Exception e){\n System.out.println(\"Error occurred in searchLogin\");\n }\n\n return false;\n\n }", "List<AddressbookEntry> findByLastNameLike(String pattern);", "public static void main(String[] args)throws SQLException {\n\r\ntry { \r\nClass.forName(\"com.mysql.cj.jdbc.Driver\"); \r\nSystem.out.println(\"Driver loaded succesfully\"); \r\nConnection con=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/Employee_DB\",\"root\",\"root\"); \r\nSystem.out.println(\"Database connected succesfully\"); \r\nStatement stmt = con.createStatement();\r\nString query = \"select emp_name from Employee_info where emp_name like 'k%' order by emp_name\";\r\nResultSet rs = stmt.executeQuery(query);\r\nSystem.out.println(\"Names starting with k are:\");\r\nwhile(rs.next()) {\r\nString count = rs.getString(1);\r\n\r\nSystem.out.println(\"\"+count);\r\n\r\n\r\n\r\n}\r\n\r\n} \r\n\r\ncatch(ClassNotFoundException e) { \r\n\r\ne.printStackTrace(); \r\n\r\n} \r\n\r\n}", "public Empleado SearchOne(String apellido) throws SQLException {\r\n ResultSet rs;\r\n /*Sentencia SQL*/\r\n String sql = \"SELECT * FROM empleados WHERE apellido = ?\";\r\n PreparedStatement sentencia = conexion.prepareStatement(sql);\r\n /*Setteamos los valores de la sentencia*/\r\n sentencia.setString(1, apellido);\r\n /*Ejecutar la sentencia*/\r\n sentencia.execute();\r\n rs = sentencia.getResultSet();\r\n rs.next();\r\n /*Guardamos los datos en el objeto*/\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 return emp;\r\n }", "@Query(\"FROM Consulta c WHERE c.paciente.dni = :dni OR LOWER(c.paciente.nombres) \"\n\t\t\t+ \"LIKE %:nombreCompleto% OR LOWER(c.paciente.apellidos) \"\n\t\t\t+ \"LIKE %:nombreCompleto%\")\n\tList<Consulta> buscar(@Param(\"dni\") String dni, @Param(\"nombreCompleto\") String nombreCompleto);", "@GET\n\t@Path(\"/search/{empName}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getByName(@PathParam(\"empName\") String name) {\n\t\tEmployeeFacade employeeFacade = new EmployeeFacade();\n\t\tGenericEntity<List<EmployeeVO>> generic = new GenericEntity<List<EmployeeVO>>(employeeFacade.findByName(name)) {};\n\t\treturn Response.status(200).header(\"Access-Control-Allow-Origin\", CorsFilter.DEFAULT_ALLOWED_ORIGINS).entity(generic).build();\n\t}", "@Transactional(readOnly = true)\r\n\tpublic Employee getEmployee(String dniEmployee) {\r\n\t\tdniEmployee = dniEmployee.trim();\r\n\t\treturn (Employee) em.createQuery(\"select e from Employee e where e.idemployee='\"+dniEmployee+\"'\").getResultList().get(0);\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tEntityManager em = PersistanceManager.INSTANCE.getEntityManager();\r\n\t\tSystem.out.println(\"Print ALL\");\r\n\t\tQuery query = em.createQuery(\"FROM Employee e\");\r\n\t\tArrayList<Employee> result = (ArrayList<Employee>) query.getResultList();\r\n\t\tfor (Employee current : result)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print id = 3\");\r\n\t\tQuery query1 = em.createQuery(\"FROM Employee e where e.id=3\");\r\n\t\tArrayList<Employee> result1 = (ArrayList<Employee>) query1.getResultList();\r\n\t\tfor (Employee current : result1)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print Named Query \");\r\n\t\tArrayList<Employee> result2 = (ArrayList<Employee>) em.createNamedQuery(\"Employee.searchAll\").setParameter(\"empName\", \"D%\")\r\n\t\t\t\t.getResultList();\r\n\t\tfor (Employee current : result2)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t}", "public Employeedetails getEmployeeDetailByName(String employeeId);", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyeyEmpCategory(String search_key) {\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listemp = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N'\"\r\n\t\t\t\t+ \" AND empcategory LIKE '%\" + search_key + \"%' GROUP BY empcategory\").list();\t\t\t\t\r\n\t\t\t\t/*+ \" AND user.role.role_Name <> '\"+ constantVal.ROLE_SADMIN +\"' GROUP BY empcategory\").list();*/\r\n\t\treturn listemp;\r\n\t\t\r\n\t}", "@Test\n public void execute_nameParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"name\", true, false, Collections.emptyList());\n //Single keyword, ignore case, person found.\n execute_parameterPredicate_test(1, \"ElLe\", \"name\", true, false, Arrays.asList(ELLE));\n //Single keyword, case sensitive, person found.\n execute_parameterPredicate_test(0, \"ElLe\", \"name\", false, false, Collections.emptyList());\n //Multiple keywords, ignore case, or condition, multiple people found\n execute_parameterPredicate_test(3, \"Kurz Elle Kunz\", \"name\", true, false, Arrays.asList(CARL, ELLE, FIONA));\n //Multiple keywords, ignore case, and condition, no one found\n execute_parameterPredicate_test(0, \"kurz Elle kunz\", \"name\", true, true, Collections.emptyList());\n //Multiple keywords, case sensitive, or condition, multiple people found\n execute_parameterPredicate_test(2, \"kurz Elle Kunz\", \"name\", false, false, Arrays.asList(ELLE, FIONA));\n //Multiple keywords, case sensitive, and condition, no one found\n execute_parameterPredicate_test(0, \"Kurz Elle kunz\", \"name\", false, true, Collections.emptyList());\n }", "@Override\n public List<BaseLog> query(String realname) {\n BaseLogExample example = new BaseLogExample();\n if(realname!=null){\n example.createCriteria().andRealnameLike(\"%\"+realname+\"%\");\n }\n List<BaseLog> list = baseLogMapper.selectByExample(example);\n return list;\n }", "public List<Book> searchBookByNameOrAddTime(String bookname, String bookaddtime) throws ParseException {\n Date date = null;\n if(bookname == null || \"\".equals(bookname)){\n if (bookaddtime == null || \"\".equals(bookaddtime)){\n return null;\n }else{\n date = Date.valueOf(bookaddtime);\n return bookRepository.findByRegisterTime(date);\n }\n }\n if (bookaddtime == null || \"\".equals(bookaddtime)){\n return bookRepository.findByBookNameLike('%' + bookname + '%');\n }else{\n return bookRepository.searchBookByNameOrRegisterTime('%'+bookname+'%', bookaddtime);\n }\n }", "public void getByPropertyemployee(String textToFind){\n\t\t// ejemplo buscar por propiedad direccion\n\t\tEmployeeResult employeeResult = getJerseyClient().resource(getBaseUrl() + \"/employee/search/\"+textToFind).get(EmployeeResult.class);\n\t\tfor (EmployeeDTO c : employeeResult.getEmployees()) {\n\t\t\tSystem.out.println(\"Nombre: \"+c.getName());\n\t\t\tSystem.out.println(\"Apellido: \"+c.getSurname());\n\t\t\tSystem.out.println(\"Direccion: \"+c.getAddress());\n\t\t\tSystem.out.println(\"RUC: \"+c.getRUC());\n\t\t\tSystem.out.println(\"Telefono: \"+c.getCellphone());\n\t\t}\n\t\t\n\t}", "@Override\n public Collection<Employee> queryByNameAndEmail( String name, String email, boolean isRemoved ) {\n final String nameLikeSql = name + \"%\";\n final String mailLikeSql = email + \"%\";\n\n return em.createNamedQuery( \"Employee.findByNameAndEmail\", Employee.class )\n .setParameter( \"name\", nameLikeSql )\n .setParameter( \"email\", mailLikeSql )\n .setParameter( \"removed\", isRemoved ).getResultList();\n\n }", "@Query(\"name = ? and age = ?\")\n List<PersonDocument> findByNameAndAge(String name, Integer age);", "@RequestMapping(method=RequestMethod.POST ,value=\"/searchadminemployee\")\n\tpublic ModelAndView gettEmployee(@RequestParam int employee_id )\n\t{\n\t\tSystem.out.println(\"INSIDE search by eid\");\n\t\t\n\t\tEmployeeRegmodel erobj= ergserv.getEmployeeRecordFromDB(employee_id);\n\t\t\n\t\tModelAndView mv= new ModelAndView();\n\t\t\t\tif(erobj.getEmployee_fullname()!= null)\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"stinfo\", erobj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"msg\", \"INVALID Employee ID\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmv.setViewName(\"adminemployeedelete.jsp\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn mv;\n\t}", "public void searchByEmail(String partialE) {\r\n\t\tArrayList<Patron> partialEmail = dblogic.getSortedByEmails(partialE);\r\n\t\tresetTable();\r\n\t\tfor (int i = 0; i < partialEmail.size(); i++) {\r\n\t\t\ttable.setValueAt(partialEmail.get(i).getLastName(), i, COL_LAST);\r\n\t\t\ttable.setValueAt(partialEmail.get(i).getFirstName(), i, COL_FIRST);\r\n\t\t\ttable.setValueAt(partialEmail.get(i).getPatronEmail(), i, COL_EMAIL);\r\n\t\t\ttable.setValueAt(partialEmail.get(i).getPatronDOB(), i, COL_BIRTH);\r\n\t\t\ttable.setValueAt(partialEmail.get(i).getPatronSince(), i, COL_ADDED);\r\n\t\t\ttable.setValueAt(partialEmail.get(i).getAnniv().toString(), i, COL_ANNIV);\r\n\t\t}\r\n\t}", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "public String getANDClause()\n {\n StringBuilder builder = new StringBuilder();\n\n String colName;\n String term;\n\n for (int i = 0; i < columnNames.length; i++)\n {\n colName = columnNames[i];\n\n String[] terms = Spans.prepareStrings(keywords);\n\n builder.append(\"(\");\n for(int j = 0; j < terms.length; j++)\n {\n term = terms[j];\n builder.append(colName + \" LIKE '%\"+ term + \"%'\" );\n\n if (j != terms.length - 1)\n {\n builder.append(\" AND \");\n }\n }\n builder.append(\")\");\n\n if (i != columnNames.length - 1)\n {\n builder.append(\" OR \");\n }\n }\n\n return builder.toString();\n }", "@Override\n\tpublic List<Employee> queryEmp() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<Emp> selectByExample(EmpExample example) {\n\t\treturn null;\r\n\t}", "@Query(\"SELECT a FROM Appointment a WHERE a.description like ?1\")\n\t public List<Appointment> searchByDescription(String searchstr);", "public static boolean getEmployees(String username) {\n\t\tif(username != null) {\n\t\t\t//JDBCquery for employee with username\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public List<Employee> selectAllEmployee() {\n\n\t\t// using try-with-resources to avoid closing resources (boiler plate code)\n\t\tList<Employee> emp = new ArrayList<>();\n\t\t// Step 1: Establishing a Connection\n\t\ttry (Connection connection = dbconnection.getConnection();\n\n\t\t\t\t// Step 2:Create a statement using connection object\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(SELECT_ALL_employe);) {\n\t\t\tSystem.out.println(preparedStatement);\n\t\t\t// Step 3: Execute the query or update query\n\t\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\t\t// Step 4: Process the ResultSet object.\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString employeename = rs.getString(\"employeename\");\n\t\t\t\tString address = rs.getString(\"address\");\n\t\t\t\tint mobile = rs.getInt(\"mobile\");\n\t\t\t\tString position = rs.getString(\"position\");\n\t\t\t\tint Salary = rs.getInt(\"Salary\");\n\t\t\t\tString joineddate = rs.getString(\"joineddate\");\n\t\t\t\tString filename =rs.getString(\"filename\");\n\t\t\t\tString path = rs.getString(\"path\");\n\t\t\t\temp.add(new Employee(id, employeename, address, mobile, position, Salary, joineddate,filename,path));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tdbconnection.printSQLException(e);\n\t\t}\n\t\treturn emp;\n\t}", "public interface OrdineRepository extends JpaRepository<Ordine,Long> {\n\n //Ricerca ordini associati ad un determinato cliente\n @Query(\"select o from Ordine o \" +\n \"where lower(o.cliente.nomeCliente) like lower(concat('%', :searchTerm, '%')) \" )\n List<Ordine> searchForCliente(@Param(\"searchTerm\") String searchTerm);\n}", "@RequestMapping(\"/search\")\n public Collection<Employee> findByName(@RequestParam(\"name\") String name){\n return employeeService.findByName(name);\n }", "@Test\n public void sucheSaeleBezT() throws Exception {\n System.out.println(\"sucheSaele nach Bezeichnung\");\n bezeichnung = \"Halle 1\";\n typ = \"\";\n plaetzeMin = null;\n ort = null;\n SaalDAO dao=DAOFactory.getSaalDAO();\n query = \"bezeichnung like '%\" + bezeichnung + \"%' \";\n explist = dao.find(query);\n System.out.println(query);\n List<Saal> result = SaalHelper.sucheSaele(bezeichnung, typ, plaetzeMin, ort);\n assertEquals(explist, result);\n \n }", "@Query(\"select new com.vpa.core.models.LabelValueBean(c.id,c.name) from City c where c.enable = 1 and c.name like :alphabets\")\n\tList<LabelValueBean> findAutoSelectCityNames(@Param(\"alphabets\") String alphabets);", "public static boolean findAndDisplayEmployee(Statement stmt, String empID) throws SQLException {\r\n boolean employeeFound; //flag\r\n\r\n //create a SELECT statement to get the specified\r\n //row from the employee table\r\n String sqlStatement = \"SELECT * FROM Employee WHERE empID = '\" +\r\n empID + \"'\";\r\n\r\n //send the SELECT statement to the DBMS\r\n ResultSet result = stmt.executeQuery(sqlStatement);\r\n\r\n //display the contents of the result set\r\n if (result.next()){\r\n //display the employee\r\n System.out.println(\"EmpID: \" +\r\n result.getString(\"EmpID\"));\r\n System.out.println(\"Name: \" +\r\n result.getString(\"Name\"));\r\n System.out.println(\"Position: \" +\r\n result.getString(\"Position\"));\r\n System.out.println(\"HourlyPayRate: \" +\r\n result.getDouble(\"HourlyPayRate\"));\r\n\r\n //set the flag to indicate the employee was found\r\n employeeFound = true;\r\n }\r\n else {\r\n //Indicate the employee was not found\r\n employeeFound = false;\r\n }\r\n return employeeFound;\r\n\r\n }", "@Test\n public void execute_emailParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"email\", true, false, Collections.emptyList());\n //Single keyword, ignore case, person found.\n execute_parameterPredicate_test(1, \"ALICE\", \"email\", true, false, Arrays.asList(ALICE));\n //Single keyword, case sensitive, no one found.\n execute_parameterPredicate_test(0, \"ALICE\", \"email\", false, false, Collections.emptyList());\n //Multiple keywords, ignore case, or condition, multiple people found\n execute_parameterPredicate_test(2, \"ALiCe anna\", \"email\", true, false, Arrays.asList(ALICE, GEORGE));\n //Multiple keywords, ignore case, and condition, no one found\n execute_parameterPredicate_test(0, \"ALiCe anna\", \"email\", true, true, Collections.emptyList());\n //Multiple keywords, case sensitive, or condition, one person found\n execute_parameterPredicate_test(1, \"ALiCe anna\", \"email\", false, false, Arrays.asList(GEORGE));\n //Multiple keywords, case sensitive, and condition, no one found\n execute_parameterPredicate_test(0, \"ALiCe anna\", \"email\", false, true, Collections.emptyList());\n }", "List<Student> findAllByLastNameLike(String lastName);", "private static void selectEx() throws SQLException {\n ResultSet rs = stmt.executeQuery(\"SELECT name,score FROM students \\n\" +\n \"WHERE score >50;\");\n\n while (rs.next()) {\n System.out.println(rs.getString(\"name\") + \" \" + rs.getInt(\"score\"));\n }\n rs.close();\n }", "public int queryAllRows(Emp emp) throws Exception {\n\t\tint result = 0;\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tString sql = \"select count(*) from emp\";\n\t\t\tif (emp != null) {\n\t\t\t\tif (!(\"\").equals(emp.getEname())) {\n\t\t\t\t\tsql = sql + \" where ename like '%\" + emp.getEname() + \"%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tSQLQuery query = session.createSQLQuery(sql);\n\t\t\tList list = query.list();\n//\t\t\tBigInteger count = (BigInteger) list.get(0);\n//\t\t\trows = count.intValue();\n\t\t\tresult=(Integer) list.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t\treturn result;\n\t}", "List<User> findByfnameContaining(String search);", "@Query(\"select o from Ordine o \" +\n \"where lower(o.cliente.nomeCliente) like lower(concat('%', :searchTerm, '%')) \" )\n List<Ordine> searchForCliente(@Param(\"searchTerm\") String searchTerm);", "public List<Employe> findByEsalBetween(float startSal,float endSal);", "public static ResultSet searchBySurname(String name) {\r\n\t\ttry{\r\n\t\t\tconnection = DriverManager.getConnection(connectionString);\r\n\t\t\tstmt = connection.prepareStatement(\"SELECT * FROM Patient WHERE Surname =?;\");\r\n\t\t\tstmt.setString(1, name);\r\n\t\t\tdata = stmt.executeQuery();\r\n\t\t}\r\n\t\tcatch (SQLException ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "public interface DirektoratRepository extends JpaRepository<Direktorat,Long> {\n\n @Query(value = \"select d from Direktorat d where d.nama like :cariNama\")\n List<Direktorat> findByNama(@Param(\"cariNama\")String cariNama);\n\n List<Direktorat> findByKode(String kode);\n\n}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tstr1 = name.getText().trim();\n\t\t\t\tif(str1.length()==0)\n\t\t\t\t\tsqlStr1 = \"\";\n\t\t\t\telse\n\t\t\t\t\tsqlStr1 = \" and name like '%\"+str1+\"%'\";\n\t\t\t\tstr2 = (String)gender.getSelectedItem();\n\t\t\t\tif(str2.equals(\"不限\"))\n\t\t\t\t\tsqlStr2 = \"\";\n\t\t\t\telse\n\t\t\t\t\tsqlStr2 = \" and gender = '\"+str2+\"'\";\n\t\t\t\tstr3 = address.getText();\n\t\t\t\tif(str3.length()==0)\n\t\t\t\t\tsqlStr3 = \"\";\n\t\t\t\telse\n\t\t\t\t\tsqlStr3 = \" and address = '%\"+str3+\"%'\";\n\t\t\t\tstr4 = (String)study.getSelectedItem();\n\t\t\t\tif(str4.equals(\"不限\"))\n\t\t\t\t\tsqlStr4 = \"\";\n\t\t\t\telse\n\t\t\t\t\tsqlStr4 = \" and study = '\"+str4+\"'\";\n\t\t\t\tselect = \"select number,name,gender,age,study,mobilephone,joindate,address from employee where description like '%' \"+sqlStr1+sqlStr2+sqlStr3+sqlStr4;\n\t\t\t\ttable = new EmployeeTable(select).getTable();\n\t\t\t\troot.removeAll();\n\t\t\t\troot.add(new JScrollPane(table));\n\t\t\t\troot.revalidate();\n//\t\t\t\tfor(;root.getParent()!=null;root = root.getParent());\n//\t\t\t\troot.setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}", "public List<Employee> getEmployeesByOffice(String officeCode) {\n return employeeDao.selectOfficeCode(officeCode);\n// return getAll().stream().filter(emp -> emp.getOfficeCode() == null\n// ? null\n// : emp.getOfficeCode().equals(officeCode))\n// .collect(Collectors.toList());\n }", "List<E> queryAll(String namedQuery);", "@RequestMapping(value = \"/getAllNamesStartWith\", method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE })\r\n\tpublic List<Employee> getNamesStartWith(@RequestParam String name){\r\n\t\treturn repository.getAllEmpoyees().stream().filter(emp -> emp.getEmpName().startsWith(name)).collect(Collectors.toList());\r\n\t}", "Condition like(QueryParameter parameter, String pattern);", "@Query(\"SELECT u FROM EUsuario u WHERE u.nome LIKE :query\")\n\tpublic List<EUsuario> findByQuery(@Param(\"query\") String query);", "List<EmployeeDTO> findByName(String name);", "public static String getEmployeeName(String id){\n return \"select e_fname from employee where e_id = '\"+id+\"'\";\n }", "String getWhereClause();", "@GetMapping(value=\"/searchEmpData\")\n\tpublic List<Employee> getAllEmployees()\n\t{\n\t\treturn this.integrationClient.getAllEmployees();\n\t}", "public List<Employees> findAllByEmploymentTypeIdName(String Name);", "private static void testOracle7() throws Exception {\n\t\tClass.forName(\"jdbc.driver.oracle.Oracle7Driver\");\r\n\t\t//DriverManager.registerDriver(new Oracle7Driver());\r\n\r\n\t\t// Connect to the local database\r\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:oracle:thin:@192.168.5.168:1521:RT\", \"stdba\", \"stdba\");\r\n\r\n\t\t// Query the employee names\r\n\t\tStatement stmt = conn.createStatement();\r\n\t\t// stmt.execute(\"create table TEST1(A1 VARCHAR2(50) NOT NULL,A2 DATE, A3 NUMBER(10,2))\");\r\n\t\t// ResultSet rset = stmt.executeQuery(\"SELECT owner, table_name FROM dba_tables\");\r\n\r\n\t\t// String sql = \"SELECT column_name FROM cols WHERE table_name LIKE 'AA%'\";\r\n\t\tResultSet rset = stmt.executeQuery(\"select STAGE_NO,CLIENT_NO,POINT_START,POINT_ADD,POINT_USE from CLIENT_BONUS where STAGE_NO=2012 and CLIENT_NO=1056\");\r\n\t\t// ResultSet rset = stmt.executeQuery(sql);\r\n\t\t// Print the name out\r\n\t\twhile (rset.next())\r\n\t\t\tSystem.out.println(rset.getString(1));\r\n\r\n\t\t// System.out.println(rset.getString(1) + \":\" + rset.getString(2));\r\n\r\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 }" ]
[ "0.6079868", "0.59240484", "0.5854366", "0.581917", "0.5694334", "0.5621369", "0.5589583", "0.5544927", "0.5528401", "0.5528242", "0.5528026", "0.54856056", "0.5479068", "0.54723644", "0.54702723", "0.54583704", "0.54102683", "0.5401254", "0.5386683", "0.5350629", "0.53068733", "0.52915037", "0.5261876", "0.52473843", "0.5242347", "0.52423215", "0.5237084", "0.5233788", "0.5194257", "0.5178438", "0.5172917", "0.51676637", "0.5167471", "0.51534855", "0.511452", "0.51116127", "0.51093936", "0.50963813", "0.5048102", "0.5027342", "0.50219226", "0.50208056", "0.50154525", "0.5013062", "0.5012123", "0.5002836", "0.5002006", "0.49986026", "0.49929008", "0.49912846", "0.49897084", "0.49821985", "0.4972788", "0.49700892", "0.4965593", "0.49525604", "0.49360794", "0.492779", "0.49209064", "0.4919605", "0.49141827", "0.4912296", "0.49087366", "0.49057916", "0.48931476", "0.48842812", "0.48769554", "0.4875439", "0.48710808", "0.4864611", "0.48620296", "0.4859431", "0.48578146", "0.4853997", "0.48315653", "0.48259574", "0.48192495", "0.48167506", "0.480205", "0.48005185", "0.47976962", "0.47962245", "0.47956094", "0.4793054", "0.47803292", "0.47801593", "0.47781816", "0.47757632", "0.47728482", "0.477082", "0.4766213", "0.4760915", "0.4759905", "0.4757681", "0.47570878", "0.47527987", "0.47492856", "0.47486246", "0.4747627", "0.47473103" ]
0.5893291
2
SELECT ENO,ENAME,EADD,ESALARY FROM EMPLOYEE WHERE (ENO>="?" AND ENAME LIKE '?') OR (ESALARY BETWEEN "?" AND "?")
public List<Employe> findByEnoGreaterThanEqualAndEnameEndingWithOrEsalBetween(int Eno,String name,float startSalary,float endSalary);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Query(\"FROM Employee WHERE name = :name OR location = :location \")\n List<Employee> getEmployeeByNameOrLocation(String name, String location);", "String WHERE() { return yyline+\"/\"+yycolumn+\"(\"+yychar+\")\" ;}", "public List<Employe> findByEsalBetween(float startSal,float endSal);", "@Query(\"SELECT p FROM Person p WHERE p.name=?1 OR p.age=?2\")\n List<Person> FindByNameOrAge(String name, Integer age);", "public List<Employe> findByEnameStartingWithAndEaddStartingWith(String name,String addrs);", "public List<Emp> queryEmp(Emp emp, int pageNo, int pageSize)\n\t\t\tthrows Exception {\n\t\tList<Emp> empList = null;\n\t\tSession session = null;\n\t\tint beginPos = (pageNo - 1) * pageSize;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tString hql = \"from Emp where 1=1\";\n\t\t\tif (emp != null) {\n\t\t\t\tif (!(\"\").equals(emp.getEname())) {\n\t\t\t\t\thql = hql + \" and ename like '%\" + emp.getEname() + \"%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setFirstResult(beginPos);\n\t\t\tquery.setMaxResults(pageSize);\n\t\t\tempList = query.list();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t\treturn empList;\n\t}", "List<Employee> findByNameAndLocation(String name, String location);", "@Override\n\tString searchEmployee(String snum) {\n\t\treturn null;\n\t}", "public List<Employe> findByEnameInOrEaddIn(List<String> names,List<String> addresses);", "@Query(\"SELECT i FROM Item i WHERE \"+\n \"upper(i.name) LIKE concat('%',upper(?1),'%') OR \"+\n \"upper(i.number) LIKE concat('%',upper(?1),'%') OR \"+\n \"upper(i.waybill) LIKE concat('%',upper(?1),'%') OR \"+\n \"upper(i.factory) LIKE concat('%',upper(?1),'%')\")\n Page<Item> filterAll(String substring, Pageable pageable);", "List<Establishment> searchEstablishments(EstablishmentCriteria criteria, RangeCriteria rangeCriteria);", "@Query(\"name = ? and age = ?\")\n List<PersonDocument> findByNameAndAge(String name, Integer age);", "@Query(value = \"select * from account_details where name ILIKE concat('%',?1,'%')\"+\n \" or country ILIKE concat('%',?1,'%') or address ILIKE concat('%',?1,'%')\"+\n \" or state ILIKE concat('%',?1,'%')\"+\n \" or city ILIKE concat('%',?1,'%')\",nativeQuery = true)\n List<AccountDetail> retrieveAllBySearchCriteria(String pattern);", "List<Employee> findByNameContaining(String keyword, Sort sort);", "String getWhereClause();", "public static void main(String[] args) throws SQLException {\n\t\tConnection conn= DriverManager.getConnection(\"jdbc:oracle:thin:@coestudb.qu.edu.qa:1521/STUD.qu.edu.qa\",\"scott\",\"tiger123\");\n\t\tPreparedStatement stmt = conn.prepareStatement(\"select empno,ename,sal,hiredate from emp where sal>? and job=?\");\n\t\tstmt.setDouble(1, 2000);\n\t\tstmt.setString(2, \"MANAGER\");\n\t\tResultSet rs = stmt.executeQuery();\n\t\twhile (rs.next()){\n\t\t\tint num = rs.getInt(1);\n\t\t\tString name = rs.getString(2);\n\t\t\tdouble sal = rs.getDouble(3);\n\t\t\tDate hire = rs.getDate(4);\n\t\t\tSystem.out.println(num+\" \"+name+\" \"+sal+\" \"+hire);\n\t\t}\n\t\trs.close();\n\t\tconn.close();\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tSession session=Utility.getSF().openSession();\r\n\t\tCriteria cr=session.createCriteria(Emp.class);\r\n\t\t\r\n\t\tOrder order=Order.desc(\"eno\");\r\n\t\tcr.addOrder(order);\r\n\t\t\r\n\t\tCriterion crt=Restrictions.between(\"eno\", 1001, 1005);\r\n\t\tcr.add(crt);\r\n\t\t\r\n\t\tProjection proj=Projections.property(\"eno\");\r\n\t\tcr.setProjection(proj);\r\n\t\t\r\n\t\t\r\n\t\tList<Integer> codes=cr.list();\r\n\t\t\r\n\t\tfor(Integer code:codes) {\r\n\t\t\tSystem.out.println(code);\r\n\t\t}\r\n\t\t/*\r\n\t\tProjection proj=Projections.property(\"ename\");\r\n\t\tcr.setProjection(proj);\r\n\t\t\r\n\t\t\r\n\t\tList<String> names=cr.list();\r\n\t\t\r\n\t\tfor(String name:names) {\r\n\t\t\tSystem.out.println(name);\r\n\t\t}\r\n\t\t*/\r\n\t\tsession.close();\r\n\r\n\t}", "protected String getSQLWhere()\n \t{\n \t\tStringBuffer sql = new StringBuffer();\n \t\tif (fDocumentNo.getText().length() > 0)\n \t\t\tsql.append(\" AND UPPER(p.DocumentNo) LIKE ?\");\n if (fRoutingNo.getText().length() > 0)\n sql.append(\" AND UPPER(p.RoutingNo) LIKE ?\"); // Marcos Zúñiga\n if (fCheckNo.getText().length() > 0)\n sql.append(\" AND UPPER(p.CheckNo) LIKE ?\"); // Marcos Zúñiga\n if (fA_Name.getText().length() > 0)\n sql.append(\" AND UPPER(p.A_Name) LIKE ?\"); // Marcos Zúñiga\n \t\tif (fDateFrom.getValue() != null || fDateTo.getValue() != null)\n \t\t{\n \t\t\tTimestamp from = (Timestamp)fDateFrom.getValue();\n \t\t\tTimestamp to = (Timestamp)fDateTo.getValue();\n \t\t\tif (from == null && to != null)\n \t\t\t\tsql.append(\" AND TRUNC(p.DateTrx) <= ?\");\n \t\t\telse if (from != null && to == null)\n \t\t\t\tsql.append(\" AND TRUNC(p.DateTrx) >= ?\");\n \t\t\telse if (from != null && to != null)\n \t\t\t\tsql.append(\" AND TRUNC(p.DateTrx) BETWEEN ? AND ?\");\n \t\t}\n \t\t//\n \t\tif (fAmtFrom.getValue() != null || fAmtTo.getValue() != null)\n \t\t{\n \t\t\tBigDecimal from = (BigDecimal)fAmtFrom.getValue();\n \t\t\tBigDecimal to = (BigDecimal)fAmtTo.getValue();\n \t\t\tif (from == null && to != null)\n \t\t\t\tsql.append(\" AND p.PayAmt <= ?\");\n \t\t\telse if (from != null && to == null)\n \t\t\t\tsql.append(\" AND p.PayAmt >= ?\");\n \t\t\telse if (from != null && to != null)\n \t\t\t\tsql.append(\" AND p.PayAmt BETWEEN ? AND ?\");\n \t\t}\n \t\tsql.append(\" AND p.IsReceipt=?\");\n \n \t\t// sql.append(\" AND p.IsReconciled='N'\");\n \n \t\tlog.fine(sql.toString());\n \t\treturn sql.toString();\n \t}", "List<Room> selectRoomListWithSearchCondition(@Param(\"condition\") String condition);", "private String queryFormerFromStudent(String firstName, String lastName, String bcsYear) {\n String query = \"SELECT * FROM student WHERE \";\n\n if (firstName != null) {\n query = query + \"firstName = \\\"\" + firstName + \"\\\" AND \";\n }\n\n if (lastName != null) {\n query = query + \"lastName = \\\"\" + lastName + \"\\\" AND \";\n }\n\n if (bcsYear != null) {\n query = query + \"bcsYear = \\\"\" + bcsYear + \"\\\";\";\n }\n\n return query;\n }", "public List<User> findUserEmployeeIdByPartion(String employeeIDpart) {\n\t\tTypedQuery<User> query = em.createQuery(\"select u from User u where u.employeeId like :emplyeID\", User.class);\n\t\tquery.setParameter(\"emplyeID\", \"%\" + employeeIDpart + \"%\");\n\t\treturn query.setFirstResult(0).setMaxResults(10).getResultList();\n\t}", "private Employee searchEmployee(String empName)\n {\n empName = empName.toLowerCase();\n Employee found = null;\n // Find the employee in the array list\n Iterator<Employee> emp = employees.iterator();\n while(emp.hasNext() && found == null)\n {\n myEmployee = emp.next(); //get employee from array list\n String fullName = myEmployee.getName().toLowerCase();\n String[] FirstLast = fullName.split(\" \");\n \n if (\n matchString(fullName,empName) ||\n matchString(FirstLast[0],empName) ||\n matchString(FirstLast[1],empName)\n )\n found = myEmployee;\n } \n return found;\n }", "public static void main(String[] args) {\n\t\t\n\t\tArrayList<Employe> ar=new ArrayList<Employe>();\n\t\t\n\t\tar.add(new Employe(\"chakri\",55000));\n\t\tar.add(new Employe(\"chakravarthi\",75000));\n\t\tar.add(new Employe(\"chak\",85000));\n\t\tar.add(new Employe(\"ec\",95000));\n\t\t\n\tPredicate<Employe> p=s->s.salary>55000;\n\tfor(Employe e1:ar)\n\t{\n\t\tif(p.test(e1))\n\t\t{\n\t\t\tSystem.out.println(e1.name + \"->\" + e1.salary);\n\t\t}\n\t}\n\t\t\n\t\t\n\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyeyEmployee(String search_key, int branch_id) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listemp = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE\"\r\n\t\t\t\t+\" branchModel.branch_id = \"+ branch_id\r\n\t\t\t\t+\" and obsolete ='N'\"\r\n\t\t\t\t+\" and emp_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR empcategory LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR emp_address1 LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.location_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.address.city LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.address.district LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.address.state LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR emp_phoneno LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t/*+\" OR emp_email LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR dob LIKE '%\"+ search_key + \"%'\"\r\n\t\t\t\t+\" OR doj LIKE '%\" + search_key + \"%' AND user.role.role_Name <> '\"+ constantVal.ROLE_SADMIN +\"'\"*/).list();\r\n\t\treturn listemp;\r\n\t\t\r\n\t}", "private String getQueryString(String searchType) {\n String queryString;\n\n if (searchType.equals(\"employeeId\")) {\n queryString = \"SELECT * FROM employees WHERE emp_id = ?\";\n } else if (searchType.equals(\"firstName\")) {\n queryString = \"SELECT * FROM employees WHERE first_name LIKE ?\";\n } else {\n queryString = \"SELECT * FROM employees WHERE last_name LIKE ?\";\n }\n\n\n return queryString;\n }", "@Test\n public void execute_phoneParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"phone\", true, false, Collections.emptyList());\n //Multiple keywords, or condition, multiple people found\n execute_parameterPredicate_test(3, \"94351253 9482427 9482442\", \"phone\",\n true, false, Arrays.asList(ALICE, FIONA, GEORGE));\n //Multiple keywords, and condition, multiple people found\n execute_parameterPredicate_test(0, \"94351253 9482427 9482442\", \"phone\",\n true, true, Collections.emptyList());\n }", "public static void findByAND_OR() {\n\t\tFindIterable<Document> findIterable = collection.find(\r\n\t\t and(eq(\"status\", \"A\"),\r\n\t\t or(lt(\"qty\", 30), regex(\"item\", \"^p\")))\r\n\t\t);\r\n\t\tprint(findIterable);\r\n\t}", "@Test\n public void execute_addressParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"addr\", true, false, Collections.emptyList());\n //Single keyword, ignore case, people found.\n execute_parameterPredicate_test(3, \"ave\", \"addr\", true, false, Arrays.asList(ALICE, BENSON, ELLE));\n //Single keyword, case sensitive, people found.\n execute_parameterPredicate_test(2, \"Ave\", \"addr\", false, false, Arrays.asList(ALICE, BENSON));\n //Multiple keywords, ignore case, or condition, multiple people found\n execute_parameterPredicate_test(2, \"jurong Clementi\", \"addr\", true, false, Arrays.asList(ALICE, BENSON));\n //Multiple keywords, ignore case, and condition, no one found\n execute_parameterPredicate_test(0, \"jurong Clementi\", \"addr\", true, true, Collections.emptyList());\n //Multiple keywords, case sensitive, or condition, multiple people found\n execute_parameterPredicate_test(1, \"jurong Clementi\", \"addr\", false, false, Arrays.asList(BENSON));\n //Multiple keywords, case sensitive, and condition, no one found\n execute_parameterPredicate_test(0, \"jurong Clementi\", \"addr\", false, true, Collections.emptyList());\n }", "public List<Employee> findEmployee(String name) {\n\t\tCriteriaQuery<Employee> createQuery = emp.getCriteriaBuilder().createQuery(Employee.class);\n\t\tRoot<Employee> root = createQuery.from(Employee.class);\n\t\tcreateQuery.where(root.get(\"name\").in(name));\n\t\treturn emp.createQuery(createQuery).getResultList();\n\t}", "@Repository\npublic interface EmpresaRepository extends JpaRepository<Empresa, Long> {\n\n Optional<Empresa> findById(Long pollId);\n\n Page<Poll> findByCreatedBy(Long userId, Pageable pageable);\n\n @Query(\"select e from Empresa e where ( :nome is null or lower(e.user.name) like lower(concat('%', :nome,'%')) ) and ( :categoriaEmpresa is null or e.categoriaEmpresa = :categoriaEmpresa) \")\n\tPage<Empresa> getEmpresasByFilters(@Param(\"nome\")String nome, @Param(\"categoriaEmpresa\")CategoriaEmpresa categoriaEmpresa, Pageable pageable);\n\n}", "public List<User> findUsersByFirstNameContainsOrLastNameContains(String firstName, String lastName);", "public List<Employee_mst> listEmployeeByBranch(final String branch) {\n final StringBuilder query = new StringBuilder();\n query.append(\"SELECT e FROM Employee_mst e, Authority_mst a WHERE e.emp_delete_flg = 'false' \");\n query.append(\" AND (e.emp_condi_code = '0' OR e.emp_condi_code IS NULL) \");\n query.append(\" AND e.emp_settle_authority=a.aut_code \");\n\n if (SummaryReportConstants.HQ_CODE.equals(branch)) {\n query.append(\" AND a.aut_code = \" + AuthorityLevels.HEAD_QUARTER);\n }\n else if (!StringUtils.isEmpty(branch)) {\n query.append(\" AND a.aut_code = \" + AuthorityLevels.BRANCH).append(\" AND e.emp_adpcode = '\" + branch + \"'\");\n }\n\n query.append(\" ORDER BY e.emp_code\");\n List<Employee_mst> results = super.emMain.createQuery(query.toString(), Employee_mst.class).getResultList();\n return results;\n }", "public static void findByOR() {\n\t\tFindIterable<Document> findIterable = collection.find(or(eq(\"status\", \"A\"), lt(\"qty\", 30)));\r\n\t\tprint(findIterable);\r\n\t}", "List<AddressbookEntry> findByLastNameLike(String pattern);", "List<Student> findAllByLastNameLike(String lastName);", "public static String employeeExists(String eid, String pass){\n return \"select e_fname from employee where e_id = '\"+eid+\"' and e_pass = '\"+pass+\"'\";\n }", "private String getGeoCriteria(String geoData){\n String[] aux = geoData.split(\"~\");\n String layer = aux[0];\n String polygon = aux[1];\n String result = \"(layer_table = '\"+layer+\"' and polygom_id = \"+polygon+\")\";\n return result;\n }", "@Test\n public void execute_nameParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"name\", true, false, Collections.emptyList());\n //Single keyword, ignore case, person found.\n execute_parameterPredicate_test(1, \"ElLe\", \"name\", true, false, Arrays.asList(ELLE));\n //Single keyword, case sensitive, person found.\n execute_parameterPredicate_test(0, \"ElLe\", \"name\", false, false, Collections.emptyList());\n //Multiple keywords, ignore case, or condition, multiple people found\n execute_parameterPredicate_test(3, \"Kurz Elle Kunz\", \"name\", true, false, Arrays.asList(CARL, ELLE, FIONA));\n //Multiple keywords, ignore case, and condition, no one found\n execute_parameterPredicate_test(0, \"kurz Elle kunz\", \"name\", true, true, Collections.emptyList());\n //Multiple keywords, case sensitive, or condition, multiple people found\n execute_parameterPredicate_test(2, \"kurz Elle Kunz\", \"name\", false, false, Arrays.asList(ELLE, FIONA));\n //Multiple keywords, case sensitive, and condition, no one found\n execute_parameterPredicate_test(0, \"Kurz Elle kunz\", \"name\", false, true, Collections.emptyList());\n }", "public List<Employees> getByBirthDateGreater (Date birthDate);", "Condition like(QueryParameter parameter, String pattern);", "@Test\n public void learnToQueryWithDomainSpecificRangeParam() throws Exception {\n SqlSession session = null;\n\n List<Country> lc = session.selectList(\"getCountryRange3\", new Range(22, 33));\n\n assertEquals(12, lc.size());\n Country finland = lc.get(11);\n assertEquals(\"Finland\", finland.getCountry());\n\n }", "Condition between(QueryParameter parameter, Object x, Object y);", "@Query(\"select i from Item i where lower(i.name) like lower(:namePart)\")\n List<Item> searchInNames(@Param(\"namePart\") String namePart);", "private void fetchPropertiesAccordingToUserInput() {\n String query = \"SELECT * FROM Property WHERE mId > 0\";\n if (!TextUtils.isEmpty(mBinding.fragmentSearchZipcodeTxt.getText()))\n query += \" AND mZipCode = \" + mZipcodeInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchCityTxt.getText()))\n query += \" AND Property.mCity LIKE \" + \"'%\" + mCityInput + \"%'\";\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinSurfaceTxt.getText()))\n query += \" AND Property.mSurface >= \" + mMinSurfaceInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMaxSurfaceTxt.getText()))\n query += \" AND Property.mSurface <= \" + mMaxSurfaceInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinPriceTxt.getText()))\n query += \" AND Property.mPrice >= \" + mMinPriceInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMaxPriceTxt.getText()))\n query += \" AND Property.mPrice <= \" + mMaxPriceInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinFloorsTxt.getText()))\n query += \" AND Property.mFloors >= \" + mFloorsInput;\n if (!mTypeInput.equals(\"()\"))\n query += \" AND Property.mTypeProperty IN \" + mTypeInput;\n if (mAmenitiesInput.contains(\"School\"))\n query += \" AND Property.mAmenities LIKE '%School%'\";\n if (mAmenitiesInput.contains(\"Shops\"))\n query += \" AND Property.mAmenities LIKE '%Shops%'\";\n if (mAmenitiesInput.contains(\"Public transport\"))\n query += \" AND Property.mAmenities LIKE '%Public transport%'\";\n if (mAmenitiesInput.contains(\"Garden\"))\n query += \" AND Property.mAmenities LIKE '%Garden%'\";\n if (mChipRoomsInput != 0)\n query += \" AND Property.mNbRooms >= \" + mChipRoomsInput;\n if (mChipBedroomsInput != 0)\n query += \" AND Property.mNbBedrooms >= \" + mChipBedroomsInput;\n if (mChipBathroomsInput != 0)\n query += \" AND Property.mNbBathrooms >= \" + mChipBathroomsInput;\n if (mChipCoownerInput != 10)\n query += \" AND Property.mCoOwnership = \" + mChipCoownerInput;\n if (mChipIsSoldInput != 10)\n query += \" AND Property.mSold = \" + mChipIsSoldInput;\n if (mForSaleDate != 0)\n query += \" AND Property.mInitialSale >= \" + mForSaleDate;\n if (mSoldDate != 0)\n query += \" AND Property.mFinalSale <= \" + mSoldDate;\n if (mChipPhotoInput != 0)\n query += \" AND Property.mNbPictures >= \" + mChipPhotoInput;\n query += \" ;\";\n\n fetchPropertiesAccordingToCriteria(query);\n }", "@Repository\npublic interface EventRepository extends JpaRepository<Event, Integer> {\n\n @Query(\"select e from Event e where lower(e.title) like lower(concat('%',:search,'%'))\"\n + \" or e.author in (select u.userId from User u \"\n + \" where lower(u.firstName) like lower(concat('%',:search,'%')) \"\n + \" or lower(u.lastName) like lower(concat('%',:search,'%')))\"\n + \" or lower(e.description) like lower(concat('%',:search,'%'))\")\n List<Event> findByTitleOrAuthorOrDescription(\n @Param(\"search\") String search);\n\n @Query(\"select e from Event e where e.startTime between :startTime and :endTime\"\n + \" or e.endTime between :startTime and :endTime\")\n List<Event> findBetweenStartTimeAndEndTime(\n @Param(\"startTime\") Timestamp startTime,\n @Param(\"endTime\") Timestamp endTime);\n\n @Query(\"select e from Event e where e.author = (select u.userId from User u where u.email = :email)\")\n List<Event> findByAuthorEmail(@Param(\"email\") String email);\n \n}", "@Test\n public void execute_dateOfBirthParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"dob\", true, false, Collections.emptyList());\n //Single keyword, ignore case, person found.\n execute_parameterPredicate_test(5, \"december\", \"dob\",\n true, false, Arrays.asList(ALICE, BENSON, CARL, DANIEL, FIONA));\n //Single keyword, case sensitive, no one found.\n execute_parameterPredicate_test(0, \"december\", \"dob\", false, false, Collections.emptyList());\n //Multiple keywords, ignore case, or condition, multiple people found\n execute_parameterPredicate_test(4, \"june 11\", \"dob\",\n true, false, Arrays.asList(ALICE, CARL, ELLE, GEORGE));\n //Multiple keywords, ignore case, and condition, one person found\n execute_parameterPredicate_test(1, \"june 11\", \"dob\",\n true, true, Arrays.asList(ELLE));\n //Multiple keywords, case sensitive, or condition, one person found\n execute_parameterPredicate_test(4, \"june 11\", \"dob\",\n false, false, Arrays.asList(ALICE, CARL, ELLE, GEORGE));\n //Multiple keywords, case sensitive, and condition, no one found\n execute_parameterPredicate_test(0, \"june 11\", \"dob\",\n false, true, Collections.emptyList());\n }", "public List<Employee> getEmployeesByOffice(String officeCode) {\n return employeeDao.selectOfficeCode(officeCode);\n// return getAll().stream().filter(emp -> emp.getOfficeCode() == null\n// ? null\n// : emp.getOfficeCode().equals(officeCode))\n// .collect(Collectors.toList());\n }", "@Query(\"SELECT t FROM Ticket t WHERE (:name is null or t.name = :name) and (:surname is null\"\n + \" or t.surname = :surname) and (:flightId is null or t.flightId = :flightId)\")\n List<Ticket> findByNameAndSurnameAnAndFlightId(@Param(\"name\") String name, @Param(\"surname\") String surname,\n @Param(\"flightId\") Long flightId);", "@Test\n public void execute_emailParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"email\", true, false, Collections.emptyList());\n //Single keyword, ignore case, person found.\n execute_parameterPredicate_test(1, \"ALICE\", \"email\", true, false, Arrays.asList(ALICE));\n //Single keyword, case sensitive, no one found.\n execute_parameterPredicate_test(0, \"ALICE\", \"email\", false, false, Collections.emptyList());\n //Multiple keywords, ignore case, or condition, multiple people found\n execute_parameterPredicate_test(2, \"ALiCe anna\", \"email\", true, false, Arrays.asList(ALICE, GEORGE));\n //Multiple keywords, ignore case, and condition, no one found\n execute_parameterPredicate_test(0, \"ALiCe anna\", \"email\", true, true, Collections.emptyList());\n //Multiple keywords, case sensitive, or condition, one person found\n execute_parameterPredicate_test(1, \"ALiCe anna\", \"email\", false, false, Arrays.asList(GEORGE));\n //Multiple keywords, case sensitive, and condition, no one found\n execute_parameterPredicate_test(0, \"ALiCe anna\", \"email\", false, true, Collections.emptyList());\n }", "protected String getJPARangeClause(long lowerBound, long upperBound, Map<String, Object> params) {\n params.put(\"lowerBound\", lowerBound);\n params.put(\"upperBound\", upperBound);\n return \"log.id > :lowerBound and log.id <= :upperBound\";\n }", "List<Employee> findByName(String name);", "public static boolean getEmployees(String username) {\n\t\tif(username != null) {\n\t\t\t//JDBCquery for employee with username\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "List<Employee> listByAge(Integer age);", "@Test\n public void execute_multiParameter_namePhone() throws ParseException {\n execute_multipleParameterPredicate_test(2, \"alice 95352563\", \"name phone\", true, false,\n Arrays.asList(ALICE, CARL));\n //different paramters from same person, ignore case, and operation\n execute_multipleParameterPredicate_test(1, \"alice 94351253\", \"name phone\", true, true,\n Arrays.asList(ALICE));\n //different paramters from same person, case sensitive, and operation\n execute_multipleParameterPredicate_test(0, \"alice 94351253\", \"name phone\", false, true,\n Collections.emptyList());\n }", "public List<Book> searchBookByNameOrAddTime(String bookname, String bookaddtime) throws ParseException {\n Date date = null;\n if(bookname == null || \"\".equals(bookname)){\n if (bookaddtime == null || \"\".equals(bookaddtime)){\n return null;\n }else{\n date = Date.valueOf(bookaddtime);\n return bookRepository.findByRegisterTime(date);\n }\n }\n if (bookaddtime == null || \"\".equals(bookaddtime)){\n return bookRepository.findByBookNameLike('%' + bookname + '%');\n }else{\n return bookRepository.searchBookByNameOrRegisterTime('%'+bookname+'%', bookaddtime);\n }\n }", "@Query(\"SELECT entity FROM Clientes entity WHERE (:id is null OR entity.id = :id) AND (:nome is null OR entity.nome like concat('%',:nome,'%')) AND (:negocio is null OR entity.negocio like concat('%',:negocio,'%')) AND (:sigla is null OR entity.sigla like concat('%',:sigla,'%')) AND (:status is null OR entity.status like concat('%',:status,'%'))\")\n public Page<Clientes> specificSearch(@Param(value=\"id\") java.lang.Double id, @Param(value=\"nome\") java.lang.String nome, @Param(value=\"negocio\") java.lang.String negocio, @Param(value=\"sigla\") java.lang.String sigla, @Param(value=\"status\") java.lang.String status, Pageable pageable);", "@Query(\"FROM Consulta c WHERE c.paciente.dni = :dni OR LOWER(c.paciente.nombres) \"\n\t\t\t+ \"LIKE %:nombreCompleto% OR LOWER(c.paciente.apellidos) \"\n\t\t\t+ \"LIKE %:nombreCompleto%\")\n\tList<Consulta> buscar(@Param(\"dni\") String dni, @Param(\"nombreCompleto\") String nombreCompleto);", "@WebMethod\n public List<Employee> getEmployeesBySalary(@WebParam(name = \"arg0\") int emp_sal) {\n Connection conn = null;\n List<Employee> emplyeeList = new ArrayList<Employee>();\n try {\n conn = EmpDBUtil.getConnection();\n PreparedStatement pStmt = conn.prepareStatement(\"select * from EMPLOYEES where SALARY > ?\");\n pStmt.setInt(1, emp_sal);\n ResultSet rSet = pStmt.executeQuery();\n while (rSet.next()) {\n Employee emp = new Employee();\n emp.setEmployee_id(rSet.getInt(\"EMPLOYEE_ID\"));\n emp.setFirst_name(rSet.getString(\"FIRST_NAME\"));\n emp.setLast_name(rSet.getString(\"LAST_NAME\"));\n emp.setEmail(rSet.getString(\"EMAIL\"));\n emp.setPhone_number(rSet.getString(\"PHONE_NUMBER\"));\n emp.setHire_date(rSet.getDate(\"HIRE_DATE\"));\n emp.setJop_id(rSet.getString(\"JOB_ID\"));\n emp.setSalary(rSet.getInt(\"SALARY\"));\n emp.setCommission_pct(rSet.getDouble(\"COMMISSION_PCT\"));\n emp.setManager_id(rSet.getInt(\"MANAGER_ID\"));\n emp.setDepartment_id(rSet.getInt(\"DEPARTMENT_ID\"));\n\n emplyeeList.add(emp);\n \n }\n \n System.out.println(\"done\");\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n EmpDBUtil.closeConnection(conn);\n }\n\n return emplyeeList;\n }", "@Test\n\tpublic void selectFromCourseTable_where() {\n\t\tList arrayList = em.createNamedQuery(\"query_with_where_name_like_call\",Course.class).getResultList();\n\t\tlogger.info(\"\\n\\n>>>>>>> Select c FROM Course c WHERE name like '%call%' -> {}\", arrayList);\n\t}", "@Query(\"select q from Question q where q.questionCategory.categoryName like ?1 or q.questionLevel.levelName like ?2 \"\r\n\t\t\t+ \"or q.questionType.typeName like ?3 or q.userQuestion.fullName like ?4 or q.dateCreated = ?5 or q.questionTag.tagName like ?6\" )\r\n\tList<Question> filterByAttribute(String categoryName, String levelName, String typeName, \r\n\t\t\tString fullName, Date dateCreated, String tagName, Pageable pageable );", "@Query(\"select i from Item i where lower(i.name) like lower(?1)\")\n Page<Item> searchInNames(String namePart, Pageable pageable);", "public static void main(String[] args) {\n\ntry {\n\t\t\t\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tConnection c= DriverManager.getConnection(\"jdbc:oracle:thin:@artemis.vsnet.gmu.edu:1521/vse18c.vsnet.gmu.edu\",\"spallemp\",\"vortetoa\");\n\t\t\tStatement st = c.createStatement();\n\t\t\tResultSet re = st.executeQuery(\"select e.lname, e.ssn, w.hours from employee e, project p, works_on w where e.ssn=w.essn and w.pno=p.pnumber and e.dno=p.dnum and plocation='Houston' and pname='ProductZ'\");\n\t\t\n\t\t\t\t\twhile (re.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(re.getString(1) + \",\" + re.getString(2)+ \",\" + re.getString(3));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Closing the connection\n\t\t\t\t\tc.close();\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t}\n\t\t\n\t\t\t}", "private static void selectEx() throws SQLException {\n ResultSet rs = stmt.executeQuery(\"SELECT name,score FROM students \\n\" +\n \"WHERE score >50;\");\n\n while (rs.next()) {\n System.out.println(rs.getString(\"name\") + \" \" + rs.getInt(\"score\"));\n }\n rs.close();\n }", "public final void query(Connection conn, String input) {\n\n try {\n pstmt = conn.prepareStatement(\"SELECT * FROM EMPLOYEES_INDEX\"\n + \" WHERE UPPER(employee_name) LIKE ?\");\n pstmt.setString(1, input.toUpperCase() + '%');\n rs = pstmt.executeQuery();\n while (rs.next()) {\n int id = rs.getInt(\"employee_id\");\n results.add(id);\n\n }\n } catch (SQLException e) {\n\n System.out.println(\"Could not query the table.\");\n\n }\n\n }", "private String createWhere() {\n String where = \"\";\n if (getLatitude() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + LATITUDE + \"=\" + getLatitude(\"\");\n } // if getLatitude\n if (getLongitude() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + LONGITUDE + \"=\" + getLongitude(\"\");\n } // if getLongitude\n if (getDepth() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + DEPTH + \"=\" + getDepth(\"\");\n } // if getDepth\n if (getTemperatureMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + TEMPERATURE_MIN + \"=\" + getTemperatureMin(\"\");\n } // if getTemperatureMin\n if (getTemperatureMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + TEMPERATURE_MAX + \"=\" + getTemperatureMax(\"\");\n } // if getTemperatureMax\n if (getSalinityMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + SALINITY_MIN + \"=\" + getSalinityMin(\"\");\n } // if getSalinityMin\n if (getSalinityMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + SALINITY_MAX + \"=\" + getSalinityMax(\"\");\n } // if getSalinityMax\n if (getOxygenMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + OXYGEN_MIN + \"=\" + getOxygenMin(\"\");\n } // if getOxygenMin\n if (getOxygenMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + OXYGEN_MAX + \"=\" + getOxygenMax(\"\");\n } // if getOxygenMax\n if (getNitrateMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + NITRATE_MIN + \"=\" + getNitrateMin(\"\");\n } // if getNitrateMin\n if (getNitrateMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + NITRATE_MAX + \"=\" + getNitrateMax(\"\");\n } // if getNitrateMax\n if (getPhosphateMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + PHOSPHATE_MIN + \"=\" + getPhosphateMin(\"\");\n } // if getPhosphateMin\n if (getPhosphateMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + PHOSPHATE_MAX + \"=\" + getPhosphateMax(\"\");\n } // if getPhosphateMax\n if (getSilicateMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + SILICATE_MIN + \"=\" + getSilicateMin(\"\");\n } // if getSilicateMin\n if (getSilicateMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + SILICATE_MAX + \"=\" + getSilicateMax(\"\");\n } // if getSilicateMax\n if (getChlorophyllMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + CHLOROPHYLL_MIN + \"=\" + getChlorophyllMin(\"\");\n } // if getChlorophyllMin\n if (getChlorophyllMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + CHLOROPHYLL_MAX + \"=\" + getChlorophyllMax(\"\");\n } // if getChlorophyllMax\n if (dbg) System.out.println (\"<br>where = \" + where); // debug\n return (!where.equals(\"\") ? where : null);\n }", "public String getANDClause()\n {\n StringBuilder builder = new StringBuilder();\n\n String colName;\n String term;\n\n for (int i = 0; i < columnNames.length; i++)\n {\n colName = columnNames[i];\n\n String[] terms = Spans.prepareStrings(keywords);\n\n builder.append(\"(\");\n for(int j = 0; j < terms.length; j++)\n {\n term = terms[j];\n builder.append(colName + \" LIKE '%\"+ term + \"%'\" );\n\n if (j != terms.length - 1)\n {\n builder.append(\" AND \");\n }\n }\n builder.append(\")\");\n\n if (i != columnNames.length - 1)\n {\n builder.append(\" OR \");\n }\n }\n\n return builder.toString();\n }", "public interface ActorRepository extends Neo4jRepository<Actor, Long> {\n\n\t\n\t@Query(\"MATCH (p:Actor) WHERE lower(p.name) CONTAINS lower($name) or lower(p.fullName) CONTAINS lower($name) RETURN p ORDER BY p.name\")\n\tCollection<Actor> findByNameLike(@Param(\"name\") String name);\n\n\t\n\t\n}", "public List<Employe> findByEnameAndEadd(String name,String add);", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyeyEmployeeforSA(String search_key) {\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listemp = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N' and emp_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR empcategory LIKE '%\" + search_key + \"%' OR emp_code LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR branchModel.branch_name LIKE '%\" + search_key + \"%' OR emp_address1 LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR emp_address2 LIKE '%\" + search_key + \"%' OR location.location_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR location.address.city LIKE '%\" + search_key + \"%' OR location.address.district LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR location.address.state LIKE '%\" + search_key + \"%' OR emp_phoneno LIKE '%\" + search_key + \"%' OR emp_email LIKE '%\" + search_key + \"%' OR dob LIKE '%\"+ search_key + \"%'\"\r\n\t\t\t\t+ \" OR doj LIKE '%\" + search_key + \"%'\").list();\r\n\t\treturn listemp;\r\n\t\t\r\n\t}", "PersonFinder whereNameContains(String fragment);", "@Query(value = \"SELECT * FROM account_details where name ILIKE concat('%',?1,'%') OR country ILIKE concat('%', ?1, '%') OR address ILIKE concat('%', ?1, '%') OR state ILIKE concat('%', ?1, '%')\",\n nativeQuery = true)\n List<Account> getSpecificAccount(String pattern);", "public List<Employee> findAllByOrderByLastNameAsc();", "public List<Employee> findAllByOrderByLastNameAsc();", "public List<Employee> findAllByOrderByLastNameAsc();", "public List<Employee> findAllByOrderByLastNameAsc();", "public List<Employee> findAllByOrderByLastNameAsc();", "public void where(String s, String p, String o) {\n\twheres.append(\" \").append(s != null ? s : \"?s\").append(\" \")\n\t\t.append(p != null ? p : \"?p\").append(\" \")\n\t\t.append(o != null ? o : \"?o\").append(\" . \");\n }", "@Test\n @ExcludeIn({ DB2, DERBY, FIREBIRD })\n public void substring() {\n query().from(Constants.employee).where(Constants.employee.firstname.substring((-3), 1).eq(Constants.employee.firstname.substring((-2), 1))).select(Constants.employee.id).fetch();\n }", "public boolean validateEmployeeID() {\n if (employeeID.length() - 1 != 6) {\n return false;\n }\n else if (employeeID.toCharArray()[2] != '-') {\n return false;\n }\n else if (Character.isLetter(employeeID.toCharArray()[0] & employeeID.toCharArray()[1])) {\n return true;\n }\n else if (Character.isDigit(employeeID.toCharArray()[3] & employeeID.toCharArray()[4]\n & employeeID.toCharArray()[5] & employeeID.toCharArray()[6])) {\n return true;\n }\n else{\n return false;\n }\n }", "List<Customer> findByNameOrSurname(String name, String surname);", "@Query(\"select q from Question q where q.questionCategory.categoryName like ?1 and q.questionLevel.levelName like ?2 \"\r\n\t\t\t+ \"and q.questionType.typeName like ?3 and q.userQuestion.fullName like ?4 and q.dateCreated = ?5 and q.questionTag.tagName like ?6\" )\r\n\tList<Question> filterByAll(String categoryName, String levelName, String typeName, \r\n\t\t\tString fullName, Date dateCreated, String tagName, Pageable pageable );", "@Repository\npublic interface ConductorRepository extends JpaRepository<Conductor, Integer> {\n Conductor findByPhone(String newPhone);\n\n\n @Query(\"select c from Conductor c where (?1 is null or c.realname like ?1)\" +\n \" and (?2 is null or c.phone like ?2)\")\n Page<Conductor> findPage(String name, String phone, Pageable pageable);\n}", "public String asWhereClause() {\r\n LinkedList<String> whereClause = new LinkedList<>();\r\n \r\n if (noInduk != null && !noInduk.isEmpty())\r\n whereClause.add(noIndukColName + \" LIKE '%\" + noInduk + \"%'\");\r\n \r\n if (currentLevel != null)\r\n whereClause.add(currentLevelColName + \" LIKE '%\" + currentLevel.asWhereClause() + \"%'\");\r\n \r\n if (biodata != null){\r\n String wc = biodata.asWhereClause();\r\n if(wc != null && !wc.isEmpty())\r\n whereClause.add(wc);\r\n }\r\n \r\n if (tanggalMasuk != null)\r\n whereClause.add(tanggalMasukColName + \" LIKE '%\" + tanggalMasuk.asWhereClause(true) + \"%'\");\r\n \r\n if (tanggalLulus != null)\r\n whereClause.add(tanggalLulusColName + \" LIKE '%\" + tanggalLulus.asWhereClause(true) + \"%'\");\r\n if (gelombang != null)\r\n whereClause.add(gelombangColName + \" = '\" + gelombang + \"'\");\r\n if (statusPendaftaran != null)\r\n whereClause.add(statusPendaftaranColName + \" = '\" + statusPendaftaran + \"'\");\r\n if (lastUpdateDate != null)\r\n whereClause.add(lastUpdateDateColName + \" LIKE '%\" + lastUpdateDate.asWhereClause(true) + \"%'\");\r\n return whereClause.isEmpty()? \"\" : StringUtils.join(whereClause, \" AND \");\r\n }", "public Boolean namenumber(String name , String number){\n SQLiteDatabase sqLiteDatabase = this.getReadableDatabase();\n Cursor cursor = sqLiteDatabase.rawQuery(\"Select * from user where name =? and number=?\",new String[]{name,number});\n if(cursor.getCount()>0) return true;\n else return false;\n\n }", "@Query(\"{ 'userName' : ?0, 'userPassword' : ?1 }\")\n //method to authenticate DomainExpert Credentials\n public List<DomainExpert> findByUserName(@Param(\"userName\")String userName, @Param(\"userPassword\") String userPassword);", "@Query(\"SELECT f FROM Funcionario f\" +\n \" WHERE f.nome = :nome\" +\n \" AND f.salario >= :salario\" +\n \" AND f.dataContratacao = :data\")\n List<Funcionario> findNomeDataContratacaoSalarioMaior(String nome, Double salario, LocalDate data);", "Salaries selectByPrimaryKey(@Param(\"empNo\") Integer empNo, @Param(\"fromDate\") Date fromDate);", "List<User> findByfnameContaining(String search);", "public void searchEmployee(TaxChallan taxChallan, HttpServletRequest request) {\r\n\t\tObject data[][] = null;\r\n\t\ttry {\r\n\t\t\tString challanQuery = \"SELECT HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE,HRMS_TAX_CHALLAN_DTL.EMP_ID,EMP_TOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,HRMS_TAX_CHALLAN_DTL.CHALLAN_TDS,\"\r\n\t\t\t\t\t+ \" TO_CHAR(NVL(HRMS_TAX_CHALLAN_DTL.CHALLAN_SURCHARGE,0), 9999999990.99),TO_CHAR(NVL(HRMS_TAX_CHALLAN_DTL.CHALLAN_EDU_CESS,0), 9999999990.99),TO_CHAR(NVL(HRMS_TAX_CHALLAN_DTL.CHALLAN_TOTAL_TAX,0), 9999999990.99) \" \r\n\t\t\t\t\t+ \" FROM HRMS_TAX_CHALLAN_DTL \"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_TAX_CHALLAN ON(HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE=HRMS_TAX_CHALLAN.CHALLAN_CODE)\"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_EMP_OFFC ON(HRMS_TAX_CHALLAN_DTL.EMP_ID=HRMS_EMP_OFFC.EMP_ID)\"\r\n\t\t\t\t\t+ \" WHERE HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE=\"\r\n\t\t\t\t\t+ taxChallan.getChallanID()\r\n\t\t\t\t\t+ \" ORDER BY EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME\";\r\n\t\t\tdata = getSqlModel().getSingleResult(challanQuery);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"exception in challanQuery in getChallanRecords method\",e);\r\n\t\t} //end of catch\r\n\t\t\r\n\t\tif(data.length> 0 && data!=null){\r\n\t\t\tint rownum = 0;\r\n\t\t\tfor (int i = 0; i < data.length; i++) {\r\n\t\t\t\tif(String.valueOf(data[i][1]).equals(taxChallan.getSearchForEmpId())){\r\n\t\t\t\t\trownum = i;\r\n\t\t\t\t} //end of if\r\n\t\t\t} //end of loop\r\n\t\t\tlogger.info(\"rownum======\"+rownum);\r\n\t\t\tint recPerPage = 20;\r\n\t\t\tString[] pageIndex = Utility.doPaging(taxChallan.getMyPage(), data.length, recPerPage);\r\n\t\t\tif (pageIndex == null) {\r\n\t\t\t\tpageIndex[0] = \"0\";\r\n\t\t\t\tpageIndex[1] = \"20\";\r\n\t\t\t\tpageIndex[2] = \"1\";\r\n\t\t\t\tpageIndex[3] = \"1\";\r\n\t\t\t\tpageIndex[4] = \"\";\r\n\t\t\t} //end of if\r\n\t\t\trequest.setAttribute(\"totalPage\", Integer.parseInt(String\r\n\t\t\t\t\t.valueOf(pageIndex[2])));\r\n\t\t\t\r\n\r\n\t\t\tif (pageIndex[4].equals(\"1\"))\r\n\t\t\t\ttaxChallan.setMyPage(\"1\");\r\n\t\t\t\r\n\t\t\ttaxChallan.setListFlag(\"true\");\r\n\t\t\tArrayList<Object> chList = new ArrayList<Object>();\r\n\t\t\t\r\n\t\t\tint startRecNo = 0;\r\n\t\t\tint endRecNo = 0;\r\n\t\t\t\r\n\t\t\tint pageDiv = rownum/recPerPage;\r\n\t\t\t\r\n\t\t\tstartRecNo = pageDiv * recPerPage;\r\n\t\t\tendRecNo = startRecNo + recPerPage - 1;\r\n\t\t\t\r\n\t\t\tif(data.length <= endRecNo){\r\n\t\t\t\tendRecNo = data.length-1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlogger.info(\"startRecNo======\"+startRecNo);\r\n\t\t\tlogger.info(\"endRecNo======\"+endRecNo);\r\n\t\t\tint pageRemainder = (rownum+1)%recPerPage;\r\n\t\t\tlogger.info(\"pageRemainder======\"+pageRemainder);\r\n\t\t\t\r\n\t\t\tint highlightRec = 0;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(pageRemainder > 0){\r\n\t\t\t\tpageDiv = pageDiv+1;\r\n\t\t\t\thighlightRec = pageRemainder - 1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tpageDiv = pageDiv+1;\r\n\t\t\t\thighlightRec = recPerPage - 1;\r\n\t\t\t}\r\n\t\t\trequest.setAttribute(\"highlightRec\", highlightRec);\r\n\t\t\tlogger.info(\"highlightRec======\"+highlightRec);\r\n\t\t\trequest.setAttribute(\"pageNo\", pageDiv);\r\n\t\t\ttaxChallan.setMyPage(String.valueOf(pageDiv));\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tfor (int i = startRecNo; i <= endRecNo; i++) {\r\n\t\t\t\t\tTaxChallan bean=new TaxChallan(); \r\n\t\t\t\t\tbean.setChallanCode(String.valueOf(data[i][0]));//Challan Code\r\n\t\t\t\t\tbean.setEmpId(String.valueOf(data[i][1]));//Employee Id\r\n\t\t\t\t\tbean.setEmpToken(String.valueOf(data[i][2]));//Token No.\r\n\t\t\t\t\tbean.setEmpName(String.valueOf(data[i][3]));//Emp Name\r\n\t\t\t\t\tbean.setChallanTax(Utility.twoDecimals(String.valueOf(data[i][4])));//Tds\r\n\t\t\t\t\tbean.setChallanSurcharge(Utility.twoDecimals(String.valueOf(data[i][5])));//Surcharge\r\n\t\t\t\t\tbean.setChallanEduCess(Utility.twoDecimals(String.valueOf(data[i][6])));//Education cess\r\n\t\t\t\t\tbean.setChallanTotTax(Utility.twoDecimals(String.valueOf(data[i][7])));\t//Total Tax\r\n\t\t\t\t\r\n\t\t\t\t\tchList.add(bean);\r\n\t\t\t\t} //end of loop\r\n\t\t\t}catch (Exception e) {\r\n\t\t\t\tlogger.error(\"exception in data loop\",e);\r\n\t\t\t} //end of catch\r\n\t\t\t taxChallan.setChallanList(chList);\r\n\t\t} //end of if\r\n\t\t\r\n\t\tint fromYear=0;\r\n\t\tint toYear=0;\r\n\t\tif(Integer.parseInt(taxChallan.getMonth())>=4 && Integer.parseInt(taxChallan.getMonth())<=12) {\r\n\t\t\tfromYear =Integer.parseInt(taxChallan.getYear());\r\n\t\t\ttoYear=fromYear+1;\r\n\t\t } //end of if\r\n\t\telse if(Integer.parseInt(taxChallan.getMonth())>=1 && Integer.parseInt(taxChallan.getMonth())<=3) {\r\n\t\t fromYear =Integer.parseInt(taxChallan.getYear())-1;\r\n\t\t toYear=Integer.parseInt(taxChallan.getYear());\r\n\t\t} //end of else if\t\r\n\t\t\r\n\t\tString empIncomeQuery = \"SELECT TO_CHAR(NVL(TDS_TAXABLE_INCOME,0), 9999999990.99),TDS_EMP_ID FROM HRMS_TDS \" \r\n\t\t\t+\" LEFT JOIN HRMS_EMP_OFFC ON (HRMS_EMP_OFFC.EMP_ID = HRMS_TDS.TDS_EMP_ID) \"\r\n\t\t\t+\" WHERE TDS_FROM_YEAR=\"+fromYear+\" AND TDS_TO_YEAR=\"+toYear+\" AND EMP_DIV = 22 \"\r\n\t\t\t+\" ORDER BY TDS_EMP_ID\";\r\n\t\t\tObject empTaxIncome[][] = getSqlModel().getSingleResult(empIncomeQuery);\r\n\t\t\t try {\r\n\t\t\t\t\tif(empTaxIncome != null && empTaxIncome.length != 0){\r\n\t\t\t\t\t\t ArrayList<Object> valuesList = new ArrayList<Object>();\r\n\t\t\t\t\t\t for (int i = 0; i < empTaxIncome.length; i++) {\r\n\t\t\t\t\t\t\t\t TaxChallan bean = new TaxChallan();\r\n\t\t\t\t\t\t\t\t bean.setHidListEmpId(String.valueOf(empTaxIncome[i][1]));\r\n\t\t\t\t\t\t\t\t bean.setHidListTdsIncome(String.valueOf(empTaxIncome[i][0]));\r\n\t\t\t\t\t\t\t\t valuesList.add(bean);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttaxChallan.setValuesList(valuesList);\r\n\t\t\t\t\t }\r\n\t\t\t\t} catch (RuntimeException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\ttaxChallan.setEnterTotalTax(\"0\");\r\n\t\t\ttaxChallan.setAddedTds(\"0\");\r\n\t\t\ttaxChallan.setAddedSurcharge(\"0\");\r\n\t\t\ttaxChallan.setAddedEduCess(\"0\");\r\n\t\t\ttaxChallan.setAddEmpId(\"\");\r\n\t\t\ttaxChallan.setAddEmpToken(\"\");\r\n\t\t\ttaxChallan.setAddEmpName(\"\");\r\n\t\t\ttaxChallan.setF9AddEmpFlag(\"false\");\r\n\t\t\r\n\t}", "@Override\n public List<BaseLog> query(String realname) {\n BaseLogExample example = new BaseLogExample();\n if(realname!=null){\n example.createCriteria().andRealnameLike(\"%\"+realname+\"%\");\n }\n List<BaseLog> list = baseLogMapper.selectByExample(example);\n return list;\n }", "public final void where() throws RecognitionException {\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:112:1: ( WHERE logicExpresions )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:112:3: WHERE logicExpresions\r\n {\r\n out(\" where \"); \r\n match(input,WHERE,FOLLOW_WHERE_in_where396); \r\n pushFollow(FOLLOW_logicExpresions_in_where398);\r\n logicExpresions();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public static ResultSet getPatientAddress(int house,String postcode) {\r\n\t\ttry{\r\n\t\t\tconnection = DriverManager.getConnection(connectionString);\r\n\t\t\tstmt = connection.prepareStatement(\"SELECT * FROM Address WHERE House_number = ? AND Postcode = ? \");\r\n\t\t\tstmt.setString(1, String.valueOf(house));\r\n\t\t\tstmt.setString(2, postcode);\r\n\t\t\tdata = stmt.executeQuery();\r\n\t\t}\r\n\t\tcatch (SQLException ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "List<Employee> findAllByName(String name);", "private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyEmployee(String search_key) {\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listcust = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N' \"\r\n\t\t\t\t+ \" AND user.role.role_Name <>'\" + constantVal.ROLE_SADMIN + \"' \"\r\n\t\t\t\t+ \" and emp_name LIKE '%\" + search_key + \"%'\").list();\r\n\t\treturn listcust;\r\n\t\t\r\n\t}", "public ResultSet getCertainRow(String itemname, String tableName, String columnName)\n {\n\n String selectStr;\n ResultSet rs=null;\n String itemn=\"%\"+itemname+\"%\";\n\n try{\n\n selectStr=\"SELECT * FROM \"+tableName+\" WHERE \"+ columnName+\" LIKE \"+quotate(itemn);\n rs = stmt.executeQuery(selectStr);\n\n\n\n\n\n }catch(Exception e){\n System.out.println(\"Error occurred in searchLogin\");\n }\n\n return rs;\n }", "@Override\n\t\tpublic String queryStudent(int no) throws RemoteException {\n\t\t\treturn queryString(no);\n\t\t}", "public List<Employees> findAllByEmploymentTypeIdName(String Name);", "public static boolean empidValidate(String emp_id){\n if(emp_id.matches(\"\\\\p{IsAlphabetic}{2}-\\\\d{4}\"))\n return true;\n\n else {\n System.out.println(\"The employee ID must be in the format of AA-1234.\");\n return false;\n }\n\n }", "public void andWhere(String dbsel)\n {\n this._appendWhere(dbsel, WHERE_AND); // WHERE_OR [2.6.4-B59]\n }" ]
[ "0.59867346", "0.5598439", "0.54153115", "0.53701377", "0.51690036", "0.5164253", "0.5147801", "0.5146642", "0.5128214", "0.5088191", "0.5027388", "0.5017236", "0.4940612", "0.49151468", "0.48681694", "0.48391697", "0.4807544", "0.4783708", "0.47751284", "0.4765706", "0.47575536", "0.47372785", "0.47248805", "0.46938252", "0.4686184", "0.46859792", "0.46852633", "0.46830547", "0.4678001", "0.46771422", "0.467231", "0.46666628", "0.46660748", "0.46631062", "0.46538734", "0.46528038", "0.46504426", "0.4619682", "0.46056712", "0.46048978", "0.45907554", "0.45898637", "0.4586261", "0.4584034", "0.45728874", "0.4554665", "0.45509863", "0.45458496", "0.45422903", "0.45310462", "0.45293587", "0.45278347", "0.45059955", "0.44927955", "0.44900256", "0.44826868", "0.44735295", "0.44699344", "0.44669703", "0.44641143", "0.44630778", "0.4457775", "0.44534245", "0.44532233", "0.44331187", "0.44273818", "0.44232246", "0.442209", "0.44186962", "0.44131333", "0.44104972", "0.44001704", "0.44001704", "0.44001704", "0.44001704", "0.44001704", "0.4399969", "0.43999037", "0.43990183", "0.43948507", "0.43853784", "0.43840703", "0.43767625", "0.4371383", "0.43625242", "0.43568882", "0.43539184", "0.43405265", "0.43403453", "0.4336172", "0.43356746", "0.43329084", "0.43247283", "0.43227643", "0.4319816", "0.43180186", "0.4312539", "0.4312193", "0.43113828", "0.43096513" ]
0.6472101
0
SELECT ENO,ENAME,EADD,ESALARY FROM EMPLOYEE WHERE ENAME IN('raja','rani','suresh') OR EADD IN('hyd','mumbai','delhi')
public List<Employe> findByEnameInOrEaddIn(List<String> names,List<String> addresses);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Employe> findByEnoGreaterThanEqualAndEnameEndingWithOrEsalBetween(int Eno,String name,float startSalary,float endSalary);", "public List<Employe> findByEnameAndEadd(String name,String add);", "public List<Employee> findEmployee(String name) {\n\t\tCriteriaQuery<Employee> createQuery = emp.getCriteriaBuilder().createQuery(Employee.class);\n\t\tRoot<Employee> root = createQuery.from(Employee.class);\n\t\tcreateQuery.where(root.get(\"name\").in(name));\n\t\treturn emp.createQuery(createQuery).getResultList();\n\t}", "public List<Employee> getEmployeesByOffice(String officeCode) {\n return employeeDao.selectOfficeCode(officeCode);\n// return getAll().stream().filter(emp -> emp.getOfficeCode() == null\n// ? null\n// : emp.getOfficeCode().equals(officeCode))\n// .collect(Collectors.toList());\n }", "@Query(\"FROM Employee WHERE name = :name OR location = :location \")\n List<Employee> getEmployeeByNameOrLocation(String name, String location);", "public List<Employe> findByEnameStartingWithAndEaddStartingWith(String name,String addrs);", "public List<Employee> selectAllEmployee() {\n\n\t\t// using try-with-resources to avoid closing resources (boiler plate code)\n\t\tList<Employee> emp = new ArrayList<>();\n\t\t// Step 1: Establishing a Connection\n\t\ttry (Connection connection = dbconnection.getConnection();\n\n\t\t\t\t// Step 2:Create a statement using connection object\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(SELECT_ALL_employe);) {\n\t\t\tSystem.out.println(preparedStatement);\n\t\t\t// Step 3: Execute the query or update query\n\t\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\t\t// Step 4: Process the ResultSet object.\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString employeename = rs.getString(\"employeename\");\n\t\t\t\tString address = rs.getString(\"address\");\n\t\t\t\tint mobile = rs.getInt(\"mobile\");\n\t\t\t\tString position = rs.getString(\"position\");\n\t\t\t\tint Salary = rs.getInt(\"Salary\");\n\t\t\t\tString joineddate = rs.getString(\"joineddate\");\n\t\t\t\tString filename =rs.getString(\"filename\");\n\t\t\t\tString path = rs.getString(\"path\");\n\t\t\t\temp.add(new Employee(id, employeename, address, mobile, position, Salary, joineddate,filename,path));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tdbconnection.printSQLException(e);\n\t\t}\n\t\treturn emp;\n\t}", "public List<Employees>getEMPMenaning() {\n\tString sql = \"SELECT Id_employees, Name_and_surname, Password, Work_role FROM employees \";\n\t\n\tList<Employees>list = new ArrayList<Employees>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\n\t\twhile(resultSet.next()) {\n\t\t\tEmployees getEMPMenaning = new Employees();\n\t\t\tgetEMPMenaning.setIdEmployees(resultSet.getInt(\"Id_employees\"));\n\t\t getEMPMenaning.setNameAndSurname(resultSet.getString(\"Name_and_surname\"));\n\t\t getEMPMenaning.setPassword(resultSet.getString(\"Password\"));\n\t\t getEMPMenaning.setWorkRole(resultSet.getInt(\"Work_role\"));\n\t\t \n\t\t\tlist.add(getEMPMenaning);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n\n\n\t\n}", "public static void main(String[] args) {\n\t\t\n\t\tArrayList<Employe> ar=new ArrayList<Employe>();\n\t\t\n\t\tar.add(new Employe(\"chakri\",55000));\n\t\tar.add(new Employe(\"chakravarthi\",75000));\n\t\tar.add(new Employe(\"chak\",85000));\n\t\tar.add(new Employe(\"ec\",95000));\n\t\t\n\tPredicate<Employe> p=s->s.salary>55000;\n\tfor(Employe e1:ar)\n\t{\n\t\tif(p.test(e1))\n\t\t{\n\t\t\tSystem.out.println(e1.name + \"->\" + e1.salary);\n\t\t}\n\t}\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tSession session=Utility.getSF().openSession();\r\n\t\tCriteria cr=session.createCriteria(Emp.class);\r\n\t\t\r\n\t\tOrder order=Order.desc(\"eno\");\r\n\t\tcr.addOrder(order);\r\n\t\t\r\n\t\tCriterion crt=Restrictions.between(\"eno\", 1001, 1005);\r\n\t\tcr.add(crt);\r\n\t\t\r\n\t\tProjection proj=Projections.property(\"eno\");\r\n\t\tcr.setProjection(proj);\r\n\t\t\r\n\t\t\r\n\t\tList<Integer> codes=cr.list();\r\n\t\t\r\n\t\tfor(Integer code:codes) {\r\n\t\t\tSystem.out.println(code);\r\n\t\t}\r\n\t\t/*\r\n\t\tProjection proj=Projections.property(\"ename\");\r\n\t\tcr.setProjection(proj);\r\n\t\t\r\n\t\t\r\n\t\tList<String> names=cr.list();\r\n\t\t\r\n\t\tfor(String name:names) {\r\n\t\t\tSystem.out.println(name);\r\n\t\t}\r\n\t\t*/\r\n\t\tsession.close();\r\n\r\n\t}", "public List<Employee_mst> listEmployeeByBranch(final String branch) {\n final StringBuilder query = new StringBuilder();\n query.append(\"SELECT e FROM Employee_mst e, Authority_mst a WHERE e.emp_delete_flg = 'false' \");\n query.append(\" AND (e.emp_condi_code = '0' OR e.emp_condi_code IS NULL) \");\n query.append(\" AND e.emp_settle_authority=a.aut_code \");\n\n if (SummaryReportConstants.HQ_CODE.equals(branch)) {\n query.append(\" AND a.aut_code = \" + AuthorityLevels.HEAD_QUARTER);\n }\n else if (!StringUtils.isEmpty(branch)) {\n query.append(\" AND a.aut_code = \" + AuthorityLevels.BRANCH).append(\" AND e.emp_adpcode = '\" + branch + \"'\");\n }\n\n query.append(\" ORDER BY e.emp_code\");\n List<Employee_mst> results = super.emMain.createQuery(query.toString(), Employee_mst.class).getResultList();\n return results;\n }", "public static String employeeExists(String eid, String pass){\n return \"select e_fname from employee where e_id = '\"+eid+\"' and e_pass = '\"+pass+\"'\";\n }", "List<Authority> findByNameIn(List<AuthorityName> names);", "public static List getAlumniByYear(String[] yearList)\n { \n int i;\n String s=\"from Alumni_data where passOutYear in (\";\n for(i=0;i<(yearList.length)-1;i++)\n {\n s+=yearList[i]+\",\"; \n } \n s+=yearList[i]+\")\"; \n System.out.print(\"\\n\\n\\n\\n******************************************\");\n session=SessionFact.getSessionFact().openSession();\n List li=session.createQuery(s).list();\n session.close();\n return li;\n }", "private Employee searchEmployee(String empName)\n {\n empName = empName.toLowerCase();\n Employee found = null;\n // Find the employee in the array list\n Iterator<Employee> emp = employees.iterator();\n while(emp.hasNext() && found == null)\n {\n myEmployee = emp.next(); //get employee from array list\n String fullName = myEmployee.getName().toLowerCase();\n String[] FirstLast = fullName.split(\" \");\n \n if (\n matchString(fullName,empName) ||\n matchString(FirstLast[0],empName) ||\n matchString(FirstLast[1],empName)\n )\n found = myEmployee;\n } \n return found;\n }", "public static void main(String[] args) {\n HashSet<Emp>hm = new HashSet<Emp>((Collection<? extends Emp>) new EnameComp());\n hm.add(new Emp(10,\"B\"));\n hm.add(new Emp(20,\"A\"));\n // Collections.sort(hm, new EnameComp());\n for(Emp e : hm){\n \t System.out.println(e.eid+e.ename);\n }\n\t}", "public static void main(String[] args) {\n\t\tList<Employee> empList=new ArrayList<Employee>();\r\n\t\tempList.add(new Employee(1, \"Ranjit Kumar Patel\", \"[email protected]\", 25000));\r\n\t\tempList.add(new Employee(2, \"Benjamin Sobel\", \"[email protected]\", 30000));\r\n\t\tempList.add(new Employee(3, \"Joe George\", \"[email protected]\", 29000));\r\n\t\tempList.add(new Employee(4, \"Rajan Kumar Patel\", \"[email protected]\",15000));\r\n\t\tempList.add(new Employee(5, \"Ashwin Kumar Naik\", \"[email protected]\", 27000));\r\n\t\t\r\n\t\t/*for(Employee emp:empList) {\r\n\t\t\tif(emp.salary.equals(\"29000\")) {\r\n\t\t\t\tSystem.out.println(emp.salary);\r\n\t\t\t}\r\n\t\t}\r\n*/\t\r\n\r\n\t\tList<String> empSalary = (List<String>) empList.stream().filter(n -> n.name.startsWith(\"R\")).map(n -> n.name)\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tSystem.out.println(empSalary);\r\n\r\n\t\tList<Integer> empIds = empList.stream().filter(f -> f.id % 2 == 0).map(f -> f.id).collect(Collectors.toList());\r\n\t\tSystem.out.println(empIds);\r\n\t\t\r\n\t\tList<Integer> empSals=empList.stream().filter(n->n.salary<30000).map(n->n.salary).collect(Collectors.toList()); \r\n\t\tSystem.out.println(empSals);\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\temployeerecords e1 = new employeerecords(\"emp001\",\"John Smith\",\"IT\",150000);\n\t\temployeerecords e2 = new employeerecords(\"emp002\",\"Brenda Kein\",\"FINANCE\",250000);\n\t\temployeerecords e3 = new employeerecords(\"emp003\", \"Clark Hope\",\"HR\",100000);\n\t\temployeerecords e4 = new employeerecords(\"emp004\",\"Diane Garner\",\"IT\",200000);\n\t\temployeerecords e5 = new employeerecords(\"emp005\",\"Julian Aniston\",\"MARKETING\",125000);\n\t\t\n\t\t\n\t\tHashMap hm = new HashMap();\n\t\t\n\t\thm.put(1,e1);\n\t\thm.put(2,e2);\n\t\thm.put(3,e3);\n\t\thm.put(4,e4);\n\t\thm.put(5,e5);\n\t\t\n\t\tIterator trav = hm.entrySet().iterator();\n\t\t\n\t\twhile(trav.hasNext())\n\t\t{\n\t\t\t\n\t\tMap.Entry record = (Map.Entry)trav.next();\n\t\temployeerecords e=(employeerecords)record.getValue();\n\t\tSystem.out.print(record.getKey() + \" \");\n\t\tSystem.out.println(e.employeeid +\" \"+ e.employeename+\" \"+e.officedepartment+\" \"+e.empsalary);\n\t\t}\n\t}", "public static void main(String[] args) {\n\ntry {\n\t\t\t\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tConnection c= DriverManager.getConnection(\"jdbc:oracle:thin:@artemis.vsnet.gmu.edu:1521/vse18c.vsnet.gmu.edu\",\"spallemp\",\"vortetoa\");\n\t\t\tStatement st = c.createStatement();\n\t\t\tResultSet re = st.executeQuery(\"select e.lname, e.ssn, w.hours from employee e, project p, works_on w where e.ssn=w.essn and w.pno=p.pnumber and e.dno=p.dnum and plocation='Houston' and pname='ProductZ'\");\n\t\t\n\t\t\t\t\twhile (re.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(re.getString(1) + \",\" + re.getString(2)+ \",\" + re.getString(3));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Closing the connection\n\t\t\t\t\tc.close();\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t}\n\t\t\n\t\t\t}", "public static void main(String[] args) throws SQLException {\n\t\tConnection conn= DriverManager.getConnection(\"jdbc:oracle:thin:@coestudb.qu.edu.qa:1521/STUD.qu.edu.qa\",\"scott\",\"tiger123\");\n\t\tPreparedStatement stmt = conn.prepareStatement(\"select empno,ename,sal,hiredate from emp where sal>? and job=?\");\n\t\tstmt.setDouble(1, 2000);\n\t\tstmt.setString(2, \"MANAGER\");\n\t\tResultSet rs = stmt.executeQuery();\n\t\twhile (rs.next()){\n\t\t\tint num = rs.getInt(1);\n\t\t\tString name = rs.getString(2);\n\t\t\tdouble sal = rs.getDouble(3);\n\t\t\tDate hire = rs.getDate(4);\n\t\t\tSystem.out.println(num+\" \"+name+\" \"+sal+\" \"+hire);\n\t\t}\n\t\trs.close();\n\t\tconn.close();\n\t}", "List<Employee> findByNameAndLocation(String name, String location);", "public static void main(String[] args) {\n Connection con;\n String url = \"jdbc:oracle:thin:@localhost:1521:orcl\";\n Statement stmt;\n\n try {\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n con = DriverManager.getConnection(url, \"hr\", \"hr\");\n stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(\"select * from employees\");\n while(rs.next())\n {\n System.out.println(rs.getString(1)+\" \"+rs.getString(2)+\" \"+rs.getString(3)+\" \"+rs.getString(4)+\" \"+rs.getString(5));\n }\n\n } catch (ClassNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public List<Emp> queryEmp(Emp emp, int pageNo, int pageSize)\n\t\t\tthrows Exception {\n\t\tList<Emp> empList = null;\n\t\tSession session = null;\n\t\tint beginPos = (pageNo - 1) * pageSize;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tString hql = \"from Emp where 1=1\";\n\t\t\tif (emp != null) {\n\t\t\t\tif (!(\"\").equals(emp.getEname())) {\n\t\t\t\t\thql = hql + \" and ename like '%\" + emp.getEname() + \"%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setFirstResult(beginPos);\n\t\t\tquery.setMaxResults(pageSize);\n\t\t\tempList = query.list();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t\treturn empList;\n\t}", "public List<EmployeeEntity> getEmployeeDataByName(String name, StorageContext context)\n\t\t\tthrows PragmaticBookSelfException {\n\t\tList<EmployeeEntity> result = null;\n\t\ttry {\n\t\t\tSession hibernateSeesion = context.getHibernateSession();\n\t\t\tString retrieveEmployeebyNameQuery = \"FROM EmployeeEntity e WHERE e.fname LIKE :fname or e.lname LIKE :lname\";\n\t\t\tQuery query = hibernateSeesion.createQuery(retrieveEmployeebyNameQuery);\n\t\t\tquery.setParameter(\"fname\", name);\n\t\t\tquery.setParameter(\"lname\", name);\n\t\t\tresult = (List<EmployeeEntity>) query.list();\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\t\treturn result;\n\t}", "@WebMethod\n public List<Employee> getEmployeesBySalary(@WebParam(name = \"arg0\") int emp_sal) {\n Connection conn = null;\n List<Employee> emplyeeList = new ArrayList<Employee>();\n try {\n conn = EmpDBUtil.getConnection();\n PreparedStatement pStmt = conn.prepareStatement(\"select * from EMPLOYEES where SALARY > ?\");\n pStmt.setInt(1, emp_sal);\n ResultSet rSet = pStmt.executeQuery();\n while (rSet.next()) {\n Employee emp = new Employee();\n emp.setEmployee_id(rSet.getInt(\"EMPLOYEE_ID\"));\n emp.setFirst_name(rSet.getString(\"FIRST_NAME\"));\n emp.setLast_name(rSet.getString(\"LAST_NAME\"));\n emp.setEmail(rSet.getString(\"EMAIL\"));\n emp.setPhone_number(rSet.getString(\"PHONE_NUMBER\"));\n emp.setHire_date(rSet.getDate(\"HIRE_DATE\"));\n emp.setJop_id(rSet.getString(\"JOB_ID\"));\n emp.setSalary(rSet.getInt(\"SALARY\"));\n emp.setCommission_pct(rSet.getDouble(\"COMMISSION_PCT\"));\n emp.setManager_id(rSet.getInt(\"MANAGER_ID\"));\n emp.setDepartment_id(rSet.getInt(\"DEPARTMENT_ID\"));\n\n emplyeeList.add(emp);\n \n }\n \n System.out.println(\"done\");\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n EmpDBUtil.closeConnection(conn);\n }\n\n return emplyeeList;\n }", "private String getContainsList(){\n\t\t\n\t\tArrayList<String> containsList = new ArrayList<String>();\n\t\t\n\t\tIterator<String> it = tagArray.iterator();\n\t\tString tag;\n\t\t\n\t\twhile (it.hasNext()) {\n\t\t\t\n\t\t\ttag = it.next();\n\t\t\t\n\t\t\tString containsClause = \"PrimaryTag='\" + \n\t\t\t tag + \"'\";\n\t\t\t \n\t\t\tcontainsList.add(containsClause);\n\t\t\t\n\t\t}\n\t\t\n\t\tString retVal = StringUtils.join(containsList, \" or \");\n\n\t\treturn retVal;\n\t}", "List<Employee> allEmpInfo();", "public static void main(String[] args) {\n\t\tList<Employee> emplist = EmployeeRepository.list;\r\n\t\t\r\n\t\t\r\n\t\tList<Employee> elist = emplist.stream().filter(emp -> emp.getDepartment()!=null).collect(Collectors.toList());\r\n\t\t\r\n\t}", "public void addWhereIn(String attributeName, Collection values, String operator) {\r\n\t\tif (!values.isEmpty()) {\r\n\t\t\tString valueListString = StringUtils.join(values, ',');\r\n\t\t\taddWhere(attributeName + \" in (\"+valueListString+\")\", operator);\r\n\t\t}\r\n\t}", "public LinkedListOfEmployees getEmployees(String g) {\n\t}", "boolean hasEmployeelist();", "public static void main(String[] args) {\n\t\tList<Employee_Dai> employeeList = new ArrayList<>();\r\n\t\temployeeList.add(new Employee_Dai(1, 300, 14, \"dainguyen97\", \"Nguyen Ngoc Dai\"));\r\n\t\temployeeList.add(new Employee_Dai(2, 500, 16, \"tryhard\", \"Dao Thi Nhung\"));\r\n\t\temployeeList.add(new Employee_Dai(3, 800, 18, \"nevergiveup\", \"Dinh Tien Kiet\"));\r\n\t\temployeeList.add(new Employee_Dai(4, 2000, 30, \"nothing100\", \"Nguyen Ngoc Tam\"));\r\n\t\temployeeList.add(new Employee_Dai(5, 1300, 24, \"thosan80\", \"Kieu Viet Anh\"));\r\n\t\temployeeList.add(new Employee_Dai(6, 900, 20, \"justiceleague\", \"Pham Ngoc Anh\"));\r\n\t\temployeeList.add(new Employee_Dai(7, 1000, 22, \"overnight\", \"Tran Van Phung\"));\r\n\t\temployeeList.add(new Employee_Dai(8, 1500, 28, \"theend\", \"Dang Viet Bac\"));\r\n\t\t\r\n\t\tSortBySalary(employeeList);\r\n\t\tSortByAge(employeeList);\r\n\t\tSortByName(employeeList);\r\n\t\tSearchCharacterNInUser(employeeList);\r\n\t}", "public Employee getEmployee(String n, String d, String ph){\r\n Employee e = new Employee(n,d,ph);\r\n for(Employee i: listOfEmployees){\r\n if(i.name.toLowerCase().equals(e.name.toLowerCase()) && i.departmentName.toLowerCase().equals(e.departmentName.toLowerCase()) &&\r\n i.contactNumber.equals(e.contactNumber)){\r\n e.name = i.name;\r\n e.departmentName = i.departmentName;\r\n e.contactNumber = i.contactNumber;\r\n }\r\n }\r\n return e;\r\n }", "public static void main(String[] args) {\n\t\tArrayList<Employeearraylist> hs = new ArrayList<>();\n\t\ths.add(new Emp(\"Poornima\",1214,\"Guntur\",30000));\n\t\ths.add(new Emp(\"vaishnavi\",1215,\"banglore\",35000));\n\t\ths.add(new Emp(\"geetha\",1216,\"kolkata\",12000));\n\t\ths.add(new Emp(\"bhavi\",1217,\"hyd\",45000));\n\t\ths.add(new Emp(\"ravi\",1218,\"pune\",56000));\n\t\n\t\tCollections.sort(e, (e1, e2) -> {\n\n\t\t\treturn (e1.name).compareTo(e2.name);\n\t\t});\n\t\tfor (Employeearraylist employee : e) {\n\t\t\tSystem.out.println(employee);\n\t\t}\n\t\tList<Integer> l = new ArrayList<Integer>();\n\t\tList<Integer> i = e.stream().filter(p -> p.salary > 70000).map(p -> p.salary).collect(Collectors.toList());\n\t\tSystem.out.println(\"salary greater than 70000\" + i);\n\t\tOptional<Integer> sal = e.stream().map(p -> p.salary).reduce((sum, salary) -> (sum + salary));\n\t\tSystem.out.println(\"sum of total employee salaries are\" + sal);\n\t\tlong se = e.stream().count();\n\t\tSystem.out.println(se);\n\n\t\t;\n\t}", "public String displayAllEmployees(){\n String p = \" \";\n \n try {\n \n emprs = stmt.executeQuery \n (\"SELECT * FROM JEREMY.EMPLOYEE\");\n p = loopDBEMPInfo(emprs);\n emprs.close();\n } catch (Exception e) {\n System.out.println(\"SQL problem \" + e);\n }\n \n return p;\n}", "public List<Employee> getEmployeeByDeptNo(int deptNo) {\n\n\t\tif (deptNo % 2 == 0) {\n\t\t\treturn getEmpByDeptNo(deptNo, \"doB\");\n\n\t\t}\n\n\t\treturn getEmpByDeptNo(deptNo, \"doJ\");\n\t}", "public static void main(String[] args){\n List<ArrayListEmployee5> ale = new ArrayList<>();\n// Creating employees\n ArrayListEmployee5 emp1 = new ArrayListEmployee5(1,\"Aaaa\",\"12 lane 3\",234567);\n ArrayListEmployee5 emp2 = new ArrayListEmployee5(2,\"Bbbbb\",\"12 lane 4\",1232343.354F);\n ArrayListEmployee5 emp3 = new ArrayListEmployee5(3,\"Cccc\",\"12 lane 9\",455677);\n// Adding employee to arraylist\n ale.add(emp1);\n ale.add(emp2);\n ale.add(emp3);\n// Input to search for a particular employee id\n System.out.println(\"Enter employee id to search in arraylist\");\n Scanner input = new Scanner(System.in);\n int empid = input.nextInt();\n// iterator to search arraylist\n Iterator<ArrayListEmployee5> iterator = ale.iterator();\n// condition to search for a employee with id\n while(iterator.hasNext()) {\n ArrayListEmployee5 employee = iterator.next();\n if(employee.id == empid) {\n System.out.println(employee);\n }\n\n }\n\n\n }", "public List<Employe> findByEsalBetween(float startSal,float endSal);", "public static void main(String[] args) {\n\t\tEmployee e=new Employee(104, \"vik\");\r\n\t\tEmployee e1=new Employee(105, \"wik\");\r\n\t\tEmployee e2=new Employee(101, \"xik\");\r\n\t\tEmployee e3=new Employee(102, \"yik\");\r\n\t\tEmployee e4=new Employee(103, \"zik\");\r\n\t\tArrayList<Employee>al=new ArrayList<>();\r\n\t\tal.add(e);\r\n\t\tal.add(e1);\r\n\t\tal.add(e2);\r\n\t\tal.add(e3);\r\n\t\tal.add(e4);\r\n\tSystem.out.println(al);\r\n\tCollections.sort(al);// ArrayList is not ascending order so in order to do sorting we need to use .sort {its default in TreeSet so in TreeSet we don't write .sort method to sort}\r\n\tfor(Employee em:al)\r\n\t{\r\n\t\tSystem.out.println(em.getEno()+\" \"+em.getEname());\r\n\t}\r\n\t}", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "public static String todosLosEmpleados(){\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=1;\";\n return query;\n }", "public static void main(String[] args) {\n\t\tConnection con=null;\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tcon=DriverManager.getConnection(\"jdbc:oracle:thin:@apollo.vse.gmu.edu:1521:ite10g\",\"pdatla2\",\"phejyc\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\tint i=0;\n\t\tint j=1;\n\t\ttry\n\t\t{\n\t\t\t//ArrayList<String> l1= new ArrayList<String>();\n\t\t\tStatement st;\n\t\t\tSystem.out.println(\"List of Employees part of the Research Department:\");\n\t\t\tst = con.createStatement();\n\t\t\tResultSet rs=st.executeQuery(\"select E.Lname, E.ssn from Employee E, Department D where E.Dno=D.Dnumber and Dname='Research'\");\n\t\t\t//i=ps.executeUpdate();\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tSystem.out.println(j+\")\");\n\t\t\t\tSystem.out.print(\"Last Name: \"+rs.getString(1));\n\t\t\t\tSystem.out.println(\"\tSSN: \"+rs.getString(2));\n\t\t\t\tj++;\n\t\t\t\t//l1.add(rs.getString(1));\n\t\t\t}\n\t\t} \n\t\t\n\t\tcatch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//System.out.println(\"catch block in studentDAO reached\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public static ArrayList<Employee> getAllEmployee() throws SQLException {\n\t\tConnection connection = DatabaseConnection.getConnection();\n\t\tArrayList<Employee> employee = new ArrayList<>();\n\t\tString query = \"SELECT * FROM EMPLOYEE\";\n\t\tPreparedStatement pStatement = connection.prepareStatement(query);\n\t\tResultSet resultSet = pStatement.executeQuery();\n\t\twhile (resultSet.next()) {\n\t\t\temployee.add(new Employee(resultSet.getString(\"empId\"), resultSet\n\t\t\t\t\t.getString(\"ename\")));\n\t\t}\n\t\treturn employee;\n\t}", "public List<Employees> findAllByEmploymentTypeIdName(String Name);", "@Override\r\n\tpublic List<Employee> findEmpnamesByRname(Map map) {\n\t\treturn empRoleDao.findEmpnamesByRname(map);\r\n\t}", "private String computeExpression(Mode mode, Schema schema, Map<String, Set<String>> inTerms) {\n\t\tString expression = \"\";\n\n\t\tint inputVarPosition = 0;\n\t\tfor (int i = 0; i < mode.getArguments().size(); i++) {\n\t\t\tif (mode.getArguments().get(i).getIdentifierType().equals(IdentifierType.INPUT)) {\n\t\t\t\tinputVarPosition = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tString attributeName = schema.getRelations().get(mode.getPredicateName().toUpperCase()).getAttributeNames()\n\t\t\t\t.get(inputVarPosition);\n\t\tString attributeType = mode.getArguments().get(inputVarPosition).getType();\n\n\t\t// If there is no list of known terms for attributeType, skip mode\n\t\tif (inTerms.containsKey(attributeType)) {\n\t\t\tString knownTerms = collectionToString(inTerms.get(attributeType));\n\t\t\t// USING OR\n\t\t\t// expression = attributeName + \" IN \" + knownTerms;\n\n\t\t\t// USING UNION\n\t\t\texpression = String.format(SELECTIN_SQL_STATEMENT, mode.getPredicateName(), attributeName, knownTerms);\n\t\t}\n\t\treturn expression;\n\t}", "List<Employee> findByName(String name);", "List<Employee> listByAge(Integer age);", "@GetMapping(value=\"/searchEmpData/{fname}\")\n\tpublic List<Employee> getEmployeeByName(@PathVariable (value = \"fname\") String fname)\n\t{\n\t\treturn integrationClient.getEmployees(fname);\n\t}", "@Override\r\n\tpublic List<Employee> findAllEMployees() {\n\t\tList<Employee> employees = new ArrayList<Employee>();\r\n\t\tString findData = \"select * from employee\";\r\n\r\n\t\ttry {\r\n\t\t\tStatement s = dataSource.getConnection().createStatement();\r\n\r\n\t\t\tResultSet set = s.executeQuery(findData);\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\tEmployee employee = new Employee(id, sal, name, tech);\r\n\t\t\t\temployees.add(employee);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn employees;\r\n\r\n\t}", "public String [][] getEmployeeListFromDB(int listsize, String idComp) {\n\t\t\t\t\tStatement stmt = null; \n\t\t\t\t\tConnection conn = null;\n\t\t\t\t\tconn = SQLConnection.getDBConnection(); \n\t\t\t\t String [][] arrayDB = new String [listsize][4];\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstmt = conn.createStatement();\n\t\t\t\t\t\tString searchEmployee = \" SELECT * from EMPLOYEE WHERE FK_COMPANY = '\"+idComp+\"' ORDER BY TRIM(surname) ASC,TRIM(name) ASC,TRIM(badge) ASC, TRIM(idemployee) ASC\";\n\t\t\t\t\t\tResultSet employeeList = stmt.executeQuery(searchEmployee);\n\t\t\t\t\t\tint i=0;\n\t\t\t\t\t\twhile (employeeList.next()) {\n\t\t\t\t\t\t\t arrayDB[i][0] = employeeList.getString(\"surname\");\n\t\t\t\t\t\t\t arrayDB[i][1]= employeeList.getString(\"name\");\n\t\t\t\t\t\t\t arrayDB[i][2] = employeeList.getString(\"idemployee\");\n\t\t\t\t\t\t\t arrayDB[i][3] = employeeList.getString(\"badge\");\t\t\t\t \n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t} \n\t\t\t\t\t} catch (SQLException e) {} \n\t\t\t\treturn arrayDB;\n\t\t\t\t}", "@Override\r\n\tpublic List<Compte> getComptesByEmploye(Long codeEmp) {\n\t\treturn dao.getComptesByEmploye(codeEmp);\r\n\t}", "public static boolean getEmployees(String username) {\n\t\tif(username != null) {\n\t\t\t//JDBCquery for employee with username\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "@Query(\"select u from User u where u.role = 'EMPLOYEE'\")\n List<User> getAllEmployees();", "public List<User> findUserEmployeeIdByPartion(String employeeIDpart) {\n\t\tTypedQuery<User> query = em.createQuery(\"select u from User u where u.employeeId like :emplyeID\", User.class);\n\t\tquery.setParameter(\"emplyeID\", \"%\" + employeeIDpart + \"%\");\n\t\treturn query.setFirstResult(0).setMaxResults(10).getResultList();\n\t}", "public List<User> findEmployees(String companyShortName, int start, int rows, String sortBy, String sortHow);", "public static void returnVehicle(Employee[] employeeList, Employee employee) {\n\t\t\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyeyEmployee(String search_key, int branch_id) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listemp = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE\"\r\n\t\t\t\t+\" branchModel.branch_id = \"+ branch_id\r\n\t\t\t\t+\" and obsolete ='N'\"\r\n\t\t\t\t+\" and emp_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR empcategory LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR emp_address1 LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.location_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.address.city LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.address.district LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR location.address.state LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR emp_phoneno LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t/*+\" OR emp_email LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+\" OR dob LIKE '%\"+ search_key + \"%'\"\r\n\t\t\t\t+\" OR doj LIKE '%\" + search_key + \"%' AND user.role.role_Name <> '\"+ constantVal.ROLE_SADMIN +\"'\"*/).list();\r\n\t\treturn listemp;\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tEntityManager em = PersistanceManager.INSTANCE.getEntityManager();\r\n\t\tSystem.out.println(\"Print ALL\");\r\n\t\tQuery query = em.createQuery(\"FROM Employee e\");\r\n\t\tArrayList<Employee> result = (ArrayList<Employee>) query.getResultList();\r\n\t\tfor (Employee current : result)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print id = 3\");\r\n\t\tQuery query1 = em.createQuery(\"FROM Employee e where e.id=3\");\r\n\t\tArrayList<Employee> result1 = (ArrayList<Employee>) query1.getResultList();\r\n\t\tfor (Employee current : result1)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print Named Query \");\r\n\t\tArrayList<Employee> result2 = (ArrayList<Employee>) em.createNamedQuery(\"Employee.searchAll\").setParameter(\"empName\", \"D%\")\r\n\t\t\t\t.getResultList();\r\n\t\tfor (Employee current : result2)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t}", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"[email protected]\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "public static void main(String[] args) {\n\ttry {\r\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\tConnection connection= DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:orcl\",\"hr\",\"hr\");\r\n\t\tStatement statement=connection.createStatement();\r\n\t\tResultSet resultset= statement.executeQuery(\"select * from employees\");\r\n\t\twhile(resultset.next())\r\n\t\t{\r\n\t\t\tint employeeId=resultset.getInt(1);\r\n\t\t\tString firstName=resultset.getString(2);\r\n\t\t\tSystem.out.println(employeeId+\"->\"+firstName);\r\n\t\t}\r\n\t}\r\n\tcatch (ClassNotFoundException e) {\r\n\t\t\r\n\t\tSystem.out.println(e);\r\n\t} catch (SQLException e) {\r\n\t\r\n\t\te.printStackTrace();\r\n\t}\r\n}", "@Override\r\n\tpublic List<Emp> selectByExample(EmpExample example) {\n\t\treturn null;\r\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 List<User> getAllEmployees(String companyShortName);", "public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public List<EmployeeSkill> search(List<SearchEmployeeSkill> searchEmployeeSkillList) {\r\n\t\tSystem.out.println(\"searchEmployeeSkillList.size() -- \"+searchEmployeeSkillList.size());\r\n\t\tList<Integer> skillIdList = new ArrayList();\r\n\t\tint counter = 1;\r\n\t\tString skillIdAppendQuery = \"\";\r\n\t\t\r\n\t\tStringBuffer queryStringBuff = new StringBuffer();\r\n\t\tqueryStringBuff.append(SQL_SEARCH_SELECT);\r\n\t\t\r\n\t\tif(searchEmployeeSkillList.size()>0){\r\n\t\t\tqueryStringBuff.append(\" WHERE \");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tqueryStringBuff.append(\" ( \");\r\n\t\tfor (SearchEmployeeSkill ses:searchEmployeeSkillList){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(ses.getAndOrIndicator()!=null && ses.getAndOrIndicator().equalsIgnoreCase(\"OR\")){\r\n\t\t\t\tqueryStringBuff.append(\" OR \");\r\n\t\t\t}else if(ses.getAndOrIndicator()!=null && ses.getAndOrIndicator().equalsIgnoreCase(\"AND\")){\r\n\t\t\t\tqueryStringBuff.append(\" AND \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tqueryStringBuff.append(\" (\");\r\n\t\t\tqueryStringBuff.append(\" SELECT count(*) FROM EMPLOYEE_SKILL_TBL AS inner_e\");\r\n\t\t\tqueryStringBuff.append(\" WHERE e1.EMPLOYEE_ID = inner_e.EMPLOYEE_ID\");\r\n\t\t\tqueryStringBuff.append(\" AND \");\r\n\t\t\t\r\n\t\t\tif(ses.getSkillId()!=null){\r\n\t\t\t\tqueryStringBuff.append(\" SKILL_ID \").append(\"=\").append(ses.getSkillId());\r\n\t\t\t\tskillIdList.add(ses.getSkillId());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(ses.getSkillProficiency()!=null){\r\n\t\t\t\tqueryStringBuff.append(\" AND \");\r\n\t\t\t\tqueryStringBuff.append(\" PROFIENCY \").append(\">=\").append(Integer.parseInt(ses.getSkillProficiency()));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(ses.getSkillExperience()!=null){\r\n\t\t\t\tqueryStringBuff.append(\" AND \");\r\n\t\t\t\tqueryStringBuff.append(\" EXPERIENCE \").append(\">=\").append(Integer.parseInt(ses.getSkillExperience().trim()));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(ses.getSkillRecency()!=null){\r\n\t\t\t\tqueryStringBuff.append(\" AND \");\r\n\t\t\t\tqueryStringBuff.append(\" RECENCY \").append(\"<=\").append(Integer.parseInt(ses.getSkillRecency().trim()));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tqueryStringBuff.append(\" ) \");\r\n\t\t\tqueryStringBuff.append(\" >=1 \");\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tqueryStringBuff.append(\" ) \");\r\n\t\t\r\n\t\tqueryStringBuff.append(\" AND\");\r\n\t\tqueryStringBuff.append(\" e1.SKILL_ID IN \");\r\n\t\t\r\n\t\tskillIdAppendQuery = skillIdAppendQuery + \"(\";\r\n\t\t for(Integer i:skillIdList){\r\n\t\t\t \r\n\t\t\t skillIdAppendQuery = skillIdAppendQuery+i;\r\n\t\t\t \r\n\t\t\t if((skillIdList.size()-counter)>=1){\r\n\t\t\t\t skillIdAppendQuery = skillIdAppendQuery+\",\"; \r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t counter = counter+1;\r\n\t\t }\r\n\t\t skillIdAppendQuery = skillIdAppendQuery + \")\";\r\n\t\t \r\n\t\t queryStringBuff.append(skillIdAppendQuery);\r\n\t\t \r\n\t\t\r\n\t\tList<EmployeeSkill> allCompetency = (List<EmployeeSkill>) jdbcTemplate.query(queryStringBuff.toString(), new SearchResultEmployeeSkillRowMapper());\r\n\r\n\t\tSystem.out.println(\"queryStringBuff - \"+queryStringBuff.toString());\r\n\t\t\r\n\t\treturn allCompetency;\r\n\t}", "public ArrayList<Employee> getEmployees(String nameDepartment)\n\t{\n\t\tfor(Department depart : departments)\n\t\t{\n\t\t\tif(depart.getNameDepartment().equals(nameDepartment)) return depart.getEmployeeList();\n\t\t}\n\t\treturn null;\n\t}", "public List<Map<String, Object>> selectErpEmpList(Map<String, Object> commandMap) throws Exception {\n\t\treturn defaultDAO.selectList(\"Support.selectErpEmpList\", commandMap);\n\t}", "public static void main(String[] args) {\n\t\tString dbur1 = \"jdbc:oracle:thin:@localhost:1521:xe\";// 로컬호스트 본인컴퓨터~ 포트 1521 sid(I) XE\n//\t\tString dbuser = \"C##BITUSER\";\n//\t\tString dbpass = \"bituser\";\n\n\t\tString dbpass = \"hr\";\n\t\tString dbuser = \"hr\";\n\t\tStatement stmt = null;\n\t\tResultSet re = null;\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tconn = DriverManager.getConnection(dbur1, dbuser, dbpass);\n\t\t\tSystem.out.println(conn);\n\t\t\tSystem.out.println(\"접속성공!\");\n\t\t\tstmt = conn.createStatement();\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tSystem.out.print(\"검색할 이름 혹은 성을 입력해주세요 :>\");\n\t\t\tString scc = sc.next();\n\t\t\t\n\t\t\tString sql = \"SELECT first_name|| ' ' || last_name name, email, hire_date \"\n\t\t\t\t\t+ \"FROM employees \"\n\t\t\t\t\t+ \"WHERE first_name LIKE '%\"+scc+\"%'\"\n\t\t\t\t\t\t\t+ \"OR last_name LIKE '%\"+scc+\"%'\";\n\t\t\tre = stmt.executeQuery(sql);\n\n\t\t\twhile (re.next()) {\n\t\t\t\tString deptId = re.getString(\"name\");\n\t\t\t\tString deptName = re.getNString(\"email\");\n\t\t\t\tString date = re.getString(\"hire_date\");\n\t\t\t\tSystem.out.println(deptId + \" \" + deptName + \" \" + date);\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.err.println(\"드라이버로드 실패\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\t// TODO: handle exception\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tconn.close();\n\t\t\t} catch (Exception e2) {\n\t\t\t\te2.printStackTrace();\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}\n\t\t// TODO Auto-generated method stub\n\n\t}", "public String enameGet(String emp_id) throws Exception;", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Employee> getAllEmployees() {\r\n\t\tfinal Session session = sessionFactory.getCurrentSession();\t\t\r\n\t\tfinal Query query = session.createQuery(\"from Employee e order by id desc\");\r\n\t\t//Query q = session.createQuery(\"select NAME from Customer\");\r\n\t\t//final List<Employee> employeeList = query.list(); \r\n\t\treturn (List<Employee>) query.list();\r\n\t}", "public void extensionEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name of the employee:\");\n\t\t\tString nameEmployee = reader.nextLine();\n\t\t\tSystem.out.println(\"How do you want to perform the search:\");\n\t\t\tSystem.out.println(\"L\");\n\t\t\tSystem.out.println(\"Z\");\n\t\t\tSystem.out.println(\"X\");\n\t\t\tSystem.out.println(\"O\");\n\t\t\tSystem.out.println(\"R. spiral by row\");\n\t\t\tchar travel = reader.nextLine().charAt(0);\n\t\t\tSystem.out.println(\"The extension of the cubicle of the employee is \"+theHolding.extensionEmployee(selected, nameEmployee, travel));\n\t\t}\n\t}", "@Override\n\tpublic List<IdName> findEnterpriseByPy(String py) {\n\t\treturn enterpriseDAO.findEnterpriseByPy(py);\n\t}", "public boolean addEmployee(String[] srNo, String[] empToken,\r\n\t\t\tString[] employeeId, String[] empName, String[] leaveCode,\r\n\t\t\tString[] leaveName, String[] availableBal,\r\n\t\t\tString[] noOfencashLeave, String[] encashFormula,\r\n\t\t\tString[] encashAmount, String[] amtPerDay, String[] oldEncashDays,\r\n\t\t\tString[] currentBal, String[] addFlagItt, LeaveEncashmentProcess leaveEncashProcess,\r\n\t\t\tString[] tds, String[] netAmount, String[] gender) {\n\t\tObject[][] encashQueryObj = null;\r\n\t\tArrayList list = new ArrayList();\r\n\t\tboolean result = false;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tString policyCode = getLeavePolicyCode(leaveEncashProcess\r\n\t\t\t\t\t.getEmployeeCode());\r\n\t\t\tdouble totalEncashAmt = 0.0d;\r\n\t\t\tif(encashAmount != null && encashAmount.length > 0){\r\n\t\t\t\tfor (int i = 0; i < encashAmount.length; i++) {\r\n\t\t\t\t\ttotalEncashAmt = totalEncashAmt + Double.parseDouble(String.valueOf(encashAmount[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (policyCode != null && policyCode.length() > 0) {\r\n\t\t\t\tString encashQuery = \" SELECT NVL(HRMS_EMP_OFFC.EMP_TOKEN,' '),NVL(HRMS_EMP_OFFC.EMP_FNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_MNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_LNAME,' ') NAME,TO_CHAR(LEAVE_NAME) ,NVL(LEAVE_CLOSING_BALANCE,0) AS AVAILABLE_BALANCE, \"\r\n\t\t\t\t\t\t+ \" NVL(LEAVE_CLOSING_BALANCE,0)-\"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t+ \" ENCASH_BAL,HRMS_LEAVE.LEAVE_ID, \"\r\n\t\t\t\t\t\t+ \" HRMS_LEAVE_POLICY_DTL.LEAVE_ENC_FORMULA ,HRMS_EMP_OFFC.EMP_ID, NVL(HRMS_EMP_OFFC.EMP_GENDER,'') \"\r\n\t\t\t\t\t\t+ \" FROM HRMS_LEAVE \"\r\n\t\t\t\t\t\t+ \" LEFT JOIN HRMS_LEAVE_BALANCE ON(HRMS_LEAVE.LEAVE_ID=HRMS_LEAVE_BALANCE.LEAVE_CODE AND EMP_ID =\"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getEmployeeCode()\r\n\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t+ \" LEFT JOIN HRMS_EMP_OFFC ON(HRMS_LEAVE_BALANCE.EMP_ID=HRMS_EMP_OFFC.EMP_ID) \"\r\n\t\t\t\t\t\t+ \" INNER JOIN HRMS_LEAVE_POLICY_DTL ON(HRMS_LEAVE_POLICY_DTL.LEAVE_CODE=HRMS_LEAVE_BALANCE.LEAVE_CODE \"\r\n\t\t\t\t\t\t+ \" AND LEAVE_APPLICABLE='Y' AND LEAVE_ENC_FLAG='Y'AND HRMS_LEAVE_POLICY_DTL.LEAVE_POLICY_CODE=\"\r\n\t\t\t\t\t\t+ policyCode\r\n\t\t\t\t\t\t+ \")\"\r\n\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CLOSING_BALANCE >\"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CODE IN(\"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getLevCode()\r\n\t\t\t\t\t\t+ \") AND LEAVE_ENC_FORMULA IS NOT NULL ORDER BY LEAVE_ID \";\r\n\r\n\t\t\t\tencashQueryObj = getSqlModel().getSingleResult(encashQuery);\r\n\r\n\t\t\t\tLeaveEncashmentProcess bean = null;\r\n\r\n\t\t\t\tint dtlCode = 0;\r\n\r\n\t\t\t\tif (encashQueryObj != null && encashQueryObj.length > 0) {\r\n\t\t\t\t\tArrayList List = null;\r\n\t\t\t\t\tList = displayNewValue(srNo, empToken,\r\n\t\t\t\t\t\t\temployeeId, empName, leaveCode, leaveName,\r\n\t\t\t\t\t\t\tavailableBal, noOfencashLeave, encashFormula,\r\n\t\t\t\t\t\t\tencashAmount, amtPerDay, oldEncashDays,currentBal,addFlagItt,\r\n\t\t\t\t\t\t\tleaveEncashProcess, tds, netAmount, gender);\r\n\t\t\t\t\tfor (int e = 0; e < encashQueryObj.length; e++) {\r\n\r\n\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t\tbean = new LeaveEncashmentProcess();\r\n\t\t\t\t\t\tbean.setEmpToken(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][0])));\r\n\t\t\t\t\t\tbean.setEmpName(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][1])));\r\n\t\t\t\t\t\tbean.setLeaveName(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][2])));\r\n\t\t\t\t\t\tbean.setAvailableBal(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\tbean.setNoOfencashLeave(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][4]));\r\n\t\t\t\t\t\tbean.setLeaveCode(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][5])));\r\n\t\t\t\t\t\tbean.setEncashFormula(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][6])));\r\n\t\t\t\t\t\tbean.setEmployeeId(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][7])));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbean.setEmpGender(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][8])));\r\n\t\t\t\t\t\tbean.setAddFlagItt(\"Y\");\r\n\t\t\t\t\t\tbean.setHiddenEncashDays(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][4]));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbean.setCurrentBal(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdtlCode++;\r\n\r\n\t\t\t\t\t\tdouble amount = 0;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tamount = Utility.expressionEvaluate(new Utility()\r\n\t\t\t\t\t\t\t\t\t.generateFormula(leaveEncashProcess\r\n\t\t\t\t\t\t\t\t\t\t\t.getEmployeeCode(), String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][6]),\r\n\t\t\t\t\t\t\t\t\t\t\tcontext, session));\r\n\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlogger\r\n\t\t\t\t\t\t\t\t.info(\"Value of amount \"\r\n\t\t\t\t\t\t\t\t\t\t+ amount);\r\n\t\t\t\t\t\tbean.setAmtPerDay(String.valueOf((amount)));\r\n\t\t\t\t\t\tdouble totAmt = 0;\r\n\t\t\t\t\t\tdouble noOfEncashLeave = Double.parseDouble(String\r\n\t\t\t\t\t\t\t\t.valueOf(String.valueOf(encashQueryObj[e][4])));\r\n\t\t\t\t\t\tlogger.info(\"Value of noOfEncashLeave \"\r\n\t\t\t\t\t\t\t\t+ noOfEncashLeave);\r\n\r\n\t\t\t\t\t\ttotAmt = (amount) * noOfEncashLeave;\r\n\r\n\t\t\t\t\t\tlogger\r\n\t\t\t\t\t\t\t\t.info(\"Value of totAmt \"\r\n\t\t\t\t\t\t\t\t\t\t+ totAmt);\r\n\t\t\t\t\t\tbean.setEncashAmount(checkNull(String.valueOf(Math\r\n\t\t\t\t\t\t\t\t.round(totAmt))));\r\n\t\t\t\t\t\t// list.add(bean);\r\n\t\t\t\t\t//}\r\n\t\t\t\t\t\ttotalEncashAmt = totalEncashAmt + totAmt;\r\n\t\t\t\t\t\tif(leaveEncashProcess.getDeductIncomeTax().equals(\"true\")){\r\n\t\t\t\t\t\t\tObject[][] empObj = new Object[1][3];\r\n\t\t\t\t\t\t\tString month = leaveEncashProcess.getSalarymonth();\r\n\t\t\t\t\t\t\tString fromYear = leaveEncashProcess.getSalaryyear();\r\n\t\t\t\t\t\t\tString toYear = \"\";\r\n\t\t\t\t\t\t\tif(Integer.parseInt(month) < 4){\r\n\t\t\t\t\t\t\t\ttoYear = fromYear;\r\n\t\t\t\t\t\t\t\tfromYear = String.valueOf((Integer.parseInt(fromYear) - 1));\r\n\t\t\t\t\t\t\t} else{\r\n\t\t\t\t\t\t\t\ttoYear = String.valueOf((Integer.parseInt(fromYear) + 1));\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tempObj[0][0] = String.valueOf(checkNull(String.valueOf(encashQueryObj[e][7])));\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tempObj[0][1] = Math.round(totAmt);\r\n\t\t\t\t\t\t\tempObj[0][2] = String.valueOf(encashQueryObj[e][8]);\r\n\t\t\t\t\t\t\temployeeTaxCalculation.initiate(context, session);\r\n\t\t\t\t\t\t\tObject[][] empTdsObject = employeeTaxCalculation.getEmpSlabTaxAmount(empObj,fromYear,toYear);\r\n\t\t\t\t\t\t\tif(empTdsObject != null && empTdsObject.length > 0 && list != null){\r\n\t\t\t\t\t\t\t\tbean.setNetAmount(formatter.format(Double.parseDouble((empTdsObject[0][1]).toString())));\r\n\t\t\t\t\t\t\t\tbean.setTds(formatter.format(Double.parseDouble((empTdsObject[0][2]).toString())));\r\n\t\t\t\t\t\t\t\tbean.setDeductIncomeTax(\"true\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tbean.setNetAmount(\"0.00\");\r\n\t\t\t\t\t\t\tbean.setTds(\"0.00\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tbean.setSrNo(String.valueOf(List.size() + 1));// sr no\r\n\r\n\t\t\t\t\tList.add(bean);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// leaveList.add(uploadLinks);\r\n\t\t\t\t\tleaveEncashProcess.setList(List);\r\n\t\t\t\t\tleaveEncashProcess.setTotalEncashAmt(formatter.format(Double.parseDouble(checkNull(String.valueOf(totalEncashAmt)))));\r\n\r\n\t\t\t\t\t// leaveEncashProcess.setList(list);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "private static void profelEmployee(Employee e) {\n\t\tString choix = scannerResultat(e.affichageMenu());\n\t\twhile (!choix.equalsIgnoreCase(\"Q\")) {\n\t\t\tif (choix.equalsIgnoreCase(\"A\")) {\n\t\t\t\te.CreeUneOperation();\n\t\t\t\tchoix = \"Q\";\n\t\t\t}\n\t\t\tif (choix.equalsIgnoreCase(\"B\")) {\n\t\t\t\te.afficherLaListe();\n\t\t\t}\n\t\t\tif (choix.equalsIgnoreCase(\"C\")) {\n\t\t\t\t\n\t\t\t}\n\t\t\tif (choix.equalsIgnoreCase(\"D\")) {\n\t\t\t\te.afficherLaListe();\n\t\t\t}\n\t\t\tif (choix.equalsIgnoreCase(\"E\")) {\n\t\t\t\tchoix = \"Q\";\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic List<Employee> queryEmp() {\n\t\treturn null;\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyEmployee(String search_key) {\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listcust = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N' \"\r\n\t\t\t\t+ \" AND user.role.role_Name <>'\" + constantVal.ROLE_SADMIN + \"' \"\r\n\t\t\t\t+ \" and emp_name LIKE '%\" + search_key + \"%'\").list();\r\n\t\treturn listcust;\r\n\t\t\r\n\t}", "HashSet<String> displayEmployee();", "public List<Employee> findEmployeesForServiceBySkills(Set<EmployeeSkill> skills) {\n Set<EmployeeSkill> employeeSkills = skills;\n List<Employee> employeeAvailable = new ArrayList<>();\n\n List<Employee> allEmployees = employeeRepository.findAll();\n for (Employee employee: allEmployees) {\n Set<EmployeeSkill> intersectionSkills = new HashSet<>();\n intersectionSkills.addAll(employeeSkills);\n intersectionSkills.retainAll(employee.getSkills());\n\n // Check if employee is available on given days and posses certain skills\n if(intersectionSkills.size() == employeeSkills.size()) {\n employeeAvailable.add(employee);\n }\n }\n\n return employeeAvailable;\n }", "public Employee[] findEmployeesByAddress(Employee[] ea, String addr){\n\t\tEmployee[] temp = new Employee[ea.length];\n\t\tEmployee[] result = null;\n\t\tint count = 0;\n\t\t\n\t\tint[] index = new int[ea.length];\n\t\t\n\t\tfor(int i = 0; i < ea.length; i++){\n\t\t\tif(ea[i].getAddress().equals(addr)){\n\t\t\t\ttemp[i] = ea[i];\n\t\t\t} else {\n\t\t\t\tindex[i] = i;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tint a = count;\n\t\tresult = new Employee[ea.length-a];\n\t\tfor(int i = 0; i < ea.length; i++){\n\t\t\tif(i == index[i])\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\telse if( i >= result.length)\n\t\t\t\tbreak;\n\t\t\t\n\t\t\telse{\n\t\t\t\tresult[i] = ea[i];\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn result;\n\t}", "public void displayEmployees(){\n System.out.println(\"NAME --- SALARY --- AGE \");\n for (Employee employee : employees) {\n System.out.println(employee.getName() + \" \" + employee.getSalary() + \" \" + employee.getAge());\n }\n }", "@Override\n\tpublic List<Employee> viewAllEmployees() {\n\t\t CriteriaBuilder cb = em.getCriteriaBuilder();\n\t\t CriteriaQuery<Employee> cq = cb.createQuery(Employee.class);\n\t\t Root<Employee> rootEntry = cq.from(Employee.class);\n\t\t CriteriaQuery<Employee> all = cq.select(rootEntry);\n\t \n\t\t TypedQuery<Employee> allQuery = em.createQuery(all);\n\t\t return allQuery.getResultList();\n\t}", "public static String[] getWithE(String[] arr) {\n\t int counter=0;\n\t\t\t\n\t\t\tfor(String str:arr) {\n\t\t\t\tif( str.contains(\"e\")) {\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(counter);//3\n\t\t//create array fewValues,with size of counter\n\t\t\t\n\t\t\tString[]fewValues=new String[counter];\n\t\t\n\t\t\t//go over arr one more time and add the words with 'e' into fewValues\n\t\t \n\t\t\tint i=0;\n\t\t\t\t\n\t\t\tfor(String each:arr) {\n\t\t\t\tif (each.contains(\"e\")){\n\t\t\t\tfewValues[i]=each;\n\t\t\t\t\ti++;\n\t\t }\n\t }\n\t\tfor( String val:fewValues) {\n\t\t\tSystem.out.println(val+ \" \");\n\t\t}\n\t //YOUR CODE ENDS HERE -----------------------\n\t \n\t return fewValues;\n\t }", "public static void main(String[] args) {\n\t\tEmployee employee = new Employee(2222, \"Sagar\");\n\t\tEmployee employee1 = new Employee(2222, \"Umesh\");\n\t\tArrayList<Employee> a4 = new ArrayList<Employee>();\n\t\ta4.add(employee);\n\t\ta4.add(employee1);\n\t\t\n\t//\ta4.add(Employee);\n\t\t\n\t\tfor (Employee employee21:a4)\n\t\t{\n\t\t\tSystem.out.println(\"Employee details :\"+employee21.eId+employee21.eName);\n\t\t}\n\t\t\n\t\tArrayList<Employee> a5 = new ArrayList<Employee>();\n\t\t\n\t\ta5.addAll(a4);\n\t\t\n\t\t//System.out.println(a5);\n\t\tfor (Employee employee231:a5)\n\t\t{\n\t\t\tSystem.out.println(\"Employee details :\"+employee231.eId+employee231.eName);\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tList<Employee> empList = new ArrayList<>();\r\n\t\tempList.add(new Employee(\"Rashim\", \"SDFSDFJLK\", 52));\r\n\t\tempList.add(new Employee(\"Amit\", \"JLKSDFJKLL79989\", 67));\r\n\t\tempList.add(new Employee(\"Ranjit\", \"ASDFJLKSJLF78676\", 45));\r\n\t\tempList.add(new Employee(\"Shymala\", \"SDFJLSJU8907\", 34));\r\n\t\t\r\n\t\t\r\n//\t\tfirst select only employees whose salary is greater than 50\r\n//\t\tand sort the employees based on their names (ignore case)\r\n//\t\tand print each employee of the stream.\r\n\t\tempList.stream().filter(emp -> emp.getSalary() > 50).sorted((e1, e2) -> e1.getName().compareToIgnoreCase(e2.getName())).forEach(emp -> System.out.println(emp));\r\n\t}", "List<Employee> findByNameContaining(String keyword, Sort sort);", "public List<Employee> getEmployeesOnly() {\n\t\treturn edao.listEmployeOnly();\n\t}", "@Test\n public void execute_multiParameter_namePhone() throws ParseException {\n execute_multipleParameterPredicate_test(2, \"alice 95352563\", \"name phone\", true, false,\n Arrays.asList(ALICE, CARL));\n //different paramters from same person, ignore case, and operation\n execute_multipleParameterPredicate_test(1, \"alice 94351253\", \"name phone\", true, true,\n Arrays.asList(ALICE));\n //different paramters from same person, case sensitive, and operation\n execute_multipleParameterPredicate_test(0, \"alice 94351253\", \"name phone\", false, true,\n Collections.emptyList());\n }", "@GetMapping(value=\"/searchEmpData\")\n\tpublic List<Employee> getAllEmployees()\n\t{\n\t\treturn this.integrationClient.getAllEmployees();\n\t}", "List<Establishment> searchEstablishments(EstablishmentCriteria criteria, RangeCriteria rangeCriteria);", "public Vector<Employees> getEmployees() {\n\t\t\tVector<Employees> v = new Vector<Employees>();\n\t\t\ttry {\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\tResultSet rs = stmt\n\t\t\t\t\t\t.executeQuery(\"select * from employees_details order by employees_pf\");\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tint file_num = rs.getInt(1);\n\t\t\t\t\tString name = rs.getString(2);\n\t\t\t\t\tint drive = rs.getInt(3);\n\t\t\t\t\tEmployees employee = new Employees(file_num, name, drive);\n//\t\t\t\t\tCars cars = new Truck(reg, model, drive);\n\t\t\t\t\tv.add(employee);\n\t\t\t\t}\n\t\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "public static void main(String[] args) {\n\t\tArrayList<Employee> list= new ArrayList<Employee>();\n\t\t\n\t\tlist.add(new Employee(3,6000,\"vinod\"));\n\t\tlist.add(new Employee(6,7500,\"Rangu\"));\n\t\tlist.add(new Employee(1,9000,\"kittu\"));\n\t\tlist.add(new Employee(5,5000,\"bunny\"));\n\t\t\n\t\tCollections.sort(list, new NameComparator());\n\t\t\n\t\tIterator it = list.iterator();\n\t\t\n\t\twhile(it.hasNext()){\n\t\t\tEmployee emp = (Employee)it.next();\n\t\t\tSystem.out.println(emp.id+\" \"+emp.salaray+\" \"+emp.name);\n\t\t\t\n\t\t\t/*Collections.sort(list, new SalaryComparator());\n\t\t\t\n\t\t\tIterator it = list.iterator();\n\t\t\t\n\t\t\twhile(it.hasNext()){\n\t\t\t\tEmployee emp = (Employee)it.next();\n\t\t\t\tSystem.out.println(emp.id+\" \"+emp.salaray+\" \"+emp.name);\n\t\t}*/\n\t}\n\t}", "public List<Employee> getAll() {\n\t\treturn edao.listEmploye();\n\t}", "public List<Employee> getEmployees();", "public boolean equals(Employee E) {\n return FName.equals(E.FName) && LName.equals(E.LName) && ID == E.ID;\n }", "@Query(\"SELECT e.stations FROM EmployeeEntity e where e.id in :employeeId\")\n List<StationEntity> getStationsOfEmployee(@Param(\"employeeId\") long employeeId);", "@Query(\"SELECT p FROM Person p WHERE p.name=?1 OR p.age=?2\")\n List<Person> FindByNameOrAge(String name, Integer age);", "public static void main(String[] args) {\t\r\n\t\tList<Employee> empList = new ArrayList<>();\r\n\t\tempList.add(new Employee(\"Amit\", \"DSFSDF8989\", 67));\r\n\t\tempList.add(new Employee(\"Ranjit\", \"SDFSDF23423\", 63));\r\n\t\tempList.add(new Employee(\"Syamala\", \"SDFSDF23423\", 343));\r\n\t\r\n//\t\tusing ifPresent to avoid returning empty data.\r\n\t\tempList.stream()\r\n\t\t\t\t.filter(emp -> emp.getName().matches(\"Syamala\"))\r\n\t\t\t\t.findFirst()\r\n\t\t\t\t.ifPresent(System.out::println);\r\n\t\t\r\n//\t\t\r\n\t\tOptional<Employee> optionalEmployee = empList.stream()\r\n\t\t\t\t\t\t\t\t\t\t\t\t.filter(emp -> emp.getName().matches(\"dummy\"))\r\n\t\t\t\t\t\t\t\t\t\t\t\t.findFirst();\r\n\t\tSystem.out.println(\"optionalEmployee: \" + optionalEmployee.toString());\r\n\t\t\r\n\t\t\r\n//\t\tuse of Stream.findAny() method\r\n//\t\tunlike findFirst() the findAny() method select any element of the stream in parallel stream,\r\n//\t\tto increase the performance of the application,\r\n//\t\tThe cost of invoking multiple invocation on same source of data may not return same result!\r\n//\t\thence try to use the findFirst() instread.\r\n\t\tempList.stream()\r\n\t\t\t.filter(emp -> emp.getName().matches(\"Syamala\"))\r\n\t\t\t.findAny()\r\n\t\t\t.ifPresent(System.out::println);\r\n\r\n\t\t\r\n\t\t\r\n\t}", "public List<Employee> getAllEmployees(){\n\t\tFaker faker = new Faker();\n\t\tList<Employee> employeeList = new ArrayList<Employee>();\n\t\tfor(int i=101; i<=110; i++) {\n\t\t\tEmployee myEmployee = new Employee();\n\t\t\tmyEmployee.setId(i);\n\t\t\tmyEmployee.setName(faker.name().fullName());\n\t\t\tmyEmployee.setMobile(faker.phoneNumber().cellPhone());\n\t\t\tmyEmployee.setAddress(faker.address().streetAddress());\n\t\t\tmyEmployee.setCompanyLogo(faker.company().logo());\n\t\t\temployeeList.add(myEmployee);\n\t\t}\n\t\treturn employeeList;\n\t}", "@Override\r\n\tpublic List<Employe> getEmployes() {\n\t\treturn dao.getEmployes();\r\n\t}" ]
[ "0.59375286", "0.5772314", "0.5742375", "0.5605904", "0.55729234", "0.54984945", "0.53060055", "0.5299884", "0.52075714", "0.5137231", "0.5130566", "0.5101593", "0.50985", "0.50956434", "0.50923926", "0.5086444", "0.50680524", "0.504369", "0.50345194", "0.49842378", "0.4982843", "0.4980218", "0.496409", "0.49453008", "0.49379784", "0.49351263", "0.49165797", "0.4897326", "0.48911747", "0.48909497", "0.48794466", "0.48751825", "0.48730183", "0.4861075", "0.48594385", "0.48493373", "0.4848547", "0.48460528", "0.48315817", "0.48309347", "0.4816558", "0.4805741", "0.4801446", "0.48012143", "0.4794307", "0.47905546", "0.47830683", "0.47651863", "0.47569203", "0.47506818", "0.47381938", "0.47369966", "0.47358862", "0.47316688", "0.4728786", "0.4726893", "0.47257733", "0.4719374", "0.47189844", "0.471878", "0.47054222", "0.47044593", "0.46966106", "0.46941683", "0.46812448", "0.467349", "0.46716848", "0.46659896", "0.46578756", "0.46557313", "0.46536392", "0.4653251", "0.46500275", "0.46467894", "0.46456945", "0.46446952", "0.46445674", "0.46420652", "0.46270004", "0.46255624", "0.4622724", "0.46169898", "0.46168622", "0.46168023", "0.46011665", "0.45931366", "0.45922583", "0.45895478", "0.4588467", "0.4586424", "0.45823154", "0.45789853", "0.4576076", "0.4574314", "0.4573143", "0.4572942", "0.4569832", "0.4565776", "0.45648295", "0.45626765" ]
0.6564394
0
if node is at i, then its left child is at 2i+1 and right child at 2i+2
private Node constructFromLevelOrder(Node root, int[] arr, int curr) { if (root == null) return null; int left = 2 * curr + 1; //index of the left child int right = 2 * curr + 2; //index of the right child Node lnode = null; Node rnode = null; //left child creation if (left < arr.length && arr[left]!=NULL_NODE) lnode = new Node(arr[left]); //right child cretion if (right < arr.length && arr[right]!=NULL_NODE) rnode = new Node(arr[right]); //Connection childs to their parent root.left = lnode; root.right = rnode; constructFromLevelOrder(root.left, arr, left); constructFromLevelOrder(root.right, arr, right); return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int leftchild(int i) {\n return (2 * i) + 1;\n }", "private int leftChild(int i){return 2*i+1;}", "private static int leftChild(int i) {\n\t\treturn 2 * i + 1;\n\t}", "private static int leftChild(int i) {\n\t\treturn 2*i + 1;\n\t}", "private int rightChild(int i){return 2*i+2;}", "private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }", "private int rightchild(int i) {\n return (2 * i) + 2;\n }", "private static int rightChild(int i) {\n\t\treturn 2 * i + 2;\n\t}", "private static int rightChild(int i) {\n\t\treturn 2*i + 2;\n\t}", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "protected int rightChild(int i) {\n return (i + 1) << 1;\n }", "private int leftChild(int index) {\n return index * 2;\n }", "protected int leftChild(int i) {\n return (i << 1) + 1;\n }", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "private int rightChild(int index) {\n return index * 2 + 1;\n }", "private int leftChild(int pos)\n {\n return (2 * pos);\n }", "private static int rightChildIndex(int index) {\n\t\treturn (index * 2) + 2;\n\t}", "private static int leftChildIndex(int index) {\n\t\treturn (index * 2) + 1;\n\t}", "private boolean hasTwoChildren(int i) {\n\t\tint left=left(i);\n\t\tint right=right(i);\n\t\tint sizee=heap.size();\n\t\tif(left<sizee-1 && right<sizee-1){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private int rightChildIdx(int idx) {\r\n // TODO\r\n return -1;\r\n }", "private boolean hasLeftChild(int i) {\n return leftIndex(i) <= size;\n }", "private int leftChildIdx(int idx) {\r\n // TODO\r\n return -1;\r\n }", "private boolean hasRightChild(int i) {\n return rightIndex(i) <= size;\n }", "private int parentIndex(int i) {\n return i / 2;\n }", "private int rightChild ( int pos )\n\t{\t\n\t\treturn -1; // replace this with working code\n\t}", "private void leftOrRightChildOf(Node n) {\n if (!(n == mRoot)) {\n System.out.print(((n == n.mParent.mLeft) ? \" left\" : \" right\")\n + \" child of \" + n.mParent + \" \");\n }\n }", "private RedBlackNode rotationWithLeftChild(RedBlackNode node2) \n { \n RedBlackNode node1 = node2.leftChild; \n node2.leftChild = node1.rightChild; \n node1.rightChild = node2; \n return node1; \n }", "private void splitChild(BTNode x, int i, BTNode y) {\n BTNode z = splitChildY(y);\n // Since this node is going to have a new child,\n // create space of new child\n for (int j = x.mCurrentKeyNum; j >= i+1; j--)\n x.mChildren[j+1] = x.mChildren[j];\n\n //if there was a child their we dont want the change the count (just to replace)\n //if (x.mChildren[i+1] != null)\n //x.mCurrentChildrenNum--;\n\n x.mChildren[i+1] = z;\n x.mCurrentChildrenNum++;\n // A key of y will move to this node. Find location of\n // new key and move all greater keys one space ahead\n for (int j = x.mCurrentKeyNum-1; j >= i; j--)\n x.mKeys[j+1] = x.mKeys[j];\n // Copy the middle key of y to this node\n x.mKeys[i] = y.mKeys[t-1];\n x.mCurrentKeyNum++;\n }", "public abstract TreeNode getNode(int i);", "private int parent(int i) {\r\n\t\tif (i % 2 == 0) {\r\n\t\t\treturn i / 2 - 1;\r\n\t\t}\r\n\t\treturn i / 2;\r\n\t}", "protected int parent(int i) { return (i - 1) / 2; }", "public static int rightChildIdx(int nodeIdx) {\n\t\treturn (2 * nodeIdx + 2);\n\t}", "private int leftChild ( int pos )\n\t{\n\t\treturn -1; // replace this with working code\n\t}", "private int parent(int i){return (i-1)/2;}", "public TreeNode getLeft(){ return leftChild;}", "public static int leftChildIdx(int nodeIdx) {\n\t\treturn (2 * nodeIdx + 1);\n\t}", "protected static int parent(int i){\n return (i-1)/2;\n }", "protected int parent(int i) {\n return (i - 1) >> 1;\n }", "public int getChildDrawingOrder(int i, int i2) {\n if (this.mDrawingOrder == 2) {\n i2 = (i - 1) - i2;\n }\n return ((LayoutParams) this.mDrawingOrderedChildren.get(i2).getLayoutParams()).childIndex;\n }", "private static int parent(int i) {\n\t\treturn (i-1)/2;\n\t}", "private static int parent(int i) {\n\t\treturn (i-1)/2;\n\t}", "private static int parent(int i) {\n\t\treturn (i - 1) / 2;\n\t}", "public TreeNode getRight(){ return rightChild;}", "private ITree.Node createNode(int i) {\n if (i < currentSize) {\n ITree.Node node = new ITree.Node(this.elements[i]);\n node.setLeftNode(createNode(this.leftChild(i)));\n node.setRightNode(createNode(this.rightChild(i)));\n\n return node;\n }\n return null;\n }", "public TreeNode getChildAt(int i) { return data[i]; }", "private void split(TFNode node) {\r\n // Move item at index 2 up to the parent\r\n TFNode parent = node.getParent();\r\n int childIndex;\r\n\r\n // Make new right node\r\n TFNode newNode = new TFNode();\r\n Item rightItem = node.getItem(3);\r\n newNode.addItem(0, rightItem);\r\n\r\n // If node is root, create new parent (new root)\r\n if (node.getParent() == null) {\r\n parent = new TFNode();\r\n setRoot(parent);\r\n parent.setChild(0, node);\r\n childIndex = 0;\r\n node.setParent(parent);\r\n } else {\r\n childIndex = WCIT(node);\r\n }\r\n\r\n // Move up item at index 2\r\n Item moveUp = node.getItem(2);\r\n parent.insertItem(childIndex, moveUp);\r\n\r\n // Hookup new right node's pointers\r\n newNode.setParent(parent);\r\n parent.setChild(childIndex + 1, newNode);\r\n\r\n // Save new right node's children\r\n TFNode child3 = node.getChild(3);\r\n TFNode child4 = node.getChild(4);\r\n\r\n // Hookup new right node's children pointers\r\n if (child3 != null) {\r\n child3.setParent(newNode);\r\n }\r\n if (child4 != null) {\r\n child4.setParent(newNode);\r\n }\r\n newNode.setChild(0, child3);\r\n newNode.setChild(1, child4);\r\n node.setChild(3, null);\r\n node.setChild(4, null);\r\n\r\n // Remove items from original node\r\n node.deleteItem(3);\r\n node.deleteItem(2);\r\n\r\n // Fix any more overflow\r\n overflow(parent);\r\n }", "private int leftIndex(int i) {\n return i * 2;\n }", "protected int left(int i ) { return 2 * i + 1; }", "private int left(int parent) {\n\t\treturn (parent*2)+1;\n\t}", "public static void main(String[] args) {\n// TreeNode node1 = new TreeNode(0);\n// TreeNode node2l = new TreeNode(3);\n// TreeNode node2r = new TreeNode(5);\n//// TreeNode node3l = new TreeNode(2);\n// TreeNode node3r = new TreeNode(2);\n//// TreeNode node4l = new TreeNode(4);\n// TreeNode node4r = new TreeNode(1);\n//\n// node1.left = node2l;\n// node1.right = node2r;\n//// node2l.left = node3l;\n// node2l.right = node3r;\n// node3r.right = node4r;\n//\n\n int[] nums = {3, 2, 1, 6, 0, 5};\n\n }", "private int right(int parent) {\n\t\treturn parent*2+2;\n\t}", "private boolean hasTwo()\r\n\t\t{\r\n\t\t\treturn getLeftChild() != null && getRightChild() != null;\r\n\t\t}", "static int parent(int i)\n {\n return (i-1)/2;\n }", "private boolean hasLeftChild(int index) {\n return leftChild(index) <= size;\n }", "private RedBlackNode rotationWithRightChild(RedBlackNode node1) \n { \n RedBlackNode node2 = node1.rightChild; \n node1.rightChild = node2.leftChild; \n node2.leftChild = node1.leftChild; \n return node2; \n }", "private boolean addHelper(Node < E > node, E item,int planes) {\r\n /*element is already present. */\r\n if (node != null && item.equals(node.data)) {\r\n return false;\r\n }\r\n /*parent has no left child and value of child is smaller than value of parent.*/\r\n else if (node != null && node.left == null && item.getItem(planes).compareTo(node.data.getItem(planes)) <= 0) {\r\n node.left = new Node<>(item);\r\n System.out.printf(\"LeftSide: node : %s , point : %s dimension : %d \\n\",\r\n node.data.toString(),item.toString(),planes);\r\n return true;\r\n }\r\n /*parent has no rigth child and value of child is bigger than value of parent.*/\r\n else if (node != null && node.right == null && item.getItem(planes).compareTo(node.data.getItem(planes)) > 0) {\r\n node.right = new Node<>(item);\r\n System.out.printf(\"RightSide: node : %s , point : %s dimension : %d \\n\",\r\n node.data.toString(),item.toString(),planes);\r\n return true;\r\n }\r\n /*parent has left child and value of child is smaller than value of parent\r\n * searching retains on the left-tree\r\n * */\r\n else if (node != null && node.left != null && item.getItem(planes).compareTo(node.data.getItem(planes)) <= 0) {\r\n return addHelper(node.left, item,(planes + 1)%item.getNumberOfArgs());\r\n }\r\n /*parent has right child and value of child is smaller than value of parent\r\n * searching retains on the right-tree\r\n * */\r\n else if (node != null && node.right != null && item.getItem(planes).compareTo(node.data.getItem(planes)) > 0){\r\n return addHelper(node.right, item,(planes + 1)%item.getNumberOfArgs());\r\n }\r\n else return false;\r\n }", "private boolean hasRightChild(int index) {\n return rightChild(index) <= size;\n }", "private int parent(int i) {\n double d = (double) i;\n d = Math.floor((d - 1) / 2);\n return (int) d;\n\n }", "private int parent(int index) {\n return index / 2;\n }", "private int parent(int index) {\n return index / 2;\n }", "private int left(int i) {\r\n\t\treturn 2 * i + 1;\r\n\t}", "private TreeNode traverseTree(Instance i) {\n TreeNode next = root;\n while (next != null && !next.isLeafNode()) {\n Attribute a = next.split.attribute;\n if (a.isNominal()) {\n next = next.nominals()[(int) i.value(a)];\n } else {\n if (i.value(a) < next.split.splitPoint) {\n next = next.left();\n } else {\n next = next.right();\n }\n }\n }\n return next;\n }", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "private int root(int i){\n\t\twhile ( i != id[i].getVertexLabel())\n\t\t\ti = id[i].getVertexLabel();\n\t\treturn i;\n\t}", "protected void trickleDown(int i) {\n\n int left = this.leftChild(i);\n int right = this.rightChild(i);\n T element = this.elements[i];\n\n if (left < currentSize && right < currentSize) {\n int min = this.minPosition(right, left);\n\n if ( element.compareTo(this.elements[min]) > 0)\n this.swapTrickleDown(i, min);\n\n } else if (left < currentSize && element.compareTo(this.elements[left]) > 0)\n this.swapTrickleDown(i, left);\n\n }", "public int parent(int i){\n\t\tif(i == 0) return Integer.MIN_VALUE;\n\t\treturn (i-1)/2;\n\t}", "private int getPosition(node a, node n)\n {\n \tnode childOfa = n;\n \twhile(childOfa.parent != a)\n \t\tchildOfa = childOfa.parent;\n \t\n \tif (a.children == childOfa)\n \t\treturn 0;\n \telse return 1;\n }", "private static TreeNode getNode() {\n TreeNode treeNode = new TreeNode(1);\n TreeNode left = new TreeNode(2);\n TreeNode right = new TreeNode(3);\n treeNode.left = left;\n treeNode.right = right;\n\n left.left = new TreeNode(4);\n right.left = new TreeNode(5);\n right.right = new TreeNode(6);\n return treeNode;\n }", "public abstract Position<E> getRightChild(Position<E> p);", "@Test\n public void whenAddTwoNodesOnDifferentLevelsThenNextFromBottomLevel() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n Iterator iter = tree.iterator();\n assertThat(iter.next(), is(\"2\"));\n }", "private int parent(int pos)\n {\t\n return (int)Math.ceil((double)Math.max(0, pos-2)/2);\n }", "private SplayNode rotateWhenXisLeftChildOfRightChild(SplayNode X)\n\t{\n\t\tX = rotateWhenLeftOfRoot(X);\n\t\t//G.setRight(X);\n\t\tX = rotateWhenRightOfRoot(X);\t\t\n\t\treturn X;\n\t}", "protected static int left(int i){\n return 2*i+1;\n }", "private AvlNode<E> doubleWithLeftChild(AvlNode<E> k1){\n k1.left = rotateWithRightChild(k1.left);\n return rotateWithLeftChild(k1);\n }", "private int parent(int i)\n {\n return (i-1)/d;\n }", "private String parentside(WAVLNode d,WAVLNode y) {\n\t if(d.right==y) {\r\n\t\t return \"right\";\r\n\t }\r\n\t else {\r\n\t\t return \"left\";\r\n\t }\r\n }", "private Node caseTwoChildren(Node deleteThis) {\r\n\r\n Node next = getMin(deleteThis.getRight()),\r\n child, parent;\r\n deleteThis.setKey(next.getKey());\r\n child = next.getRight();\r\n parent = next.getParent();\r\n if (parent.getLeft() == next) {\r\n parent.setLeft(child);\r\n } else {\r\n parent.setRight(child);\r\n }\r\n if (child != null) {\r\n child.setParent(parent);\r\n }\r\n return next;\r\n }", "public static void main(String[] args) {\n TreeNode n20 = new TreeNode(20);\n TreeNode n8 = new TreeNode(8);\n TreeNode n4 = new TreeNode(4);\n TreeNode n7 = new TreeNode(7);\n TreeNode n12 = new TreeNode(12);\n TreeNode n14 = new TreeNode(14);\n TreeNode n21 = new TreeNode(21);\n TreeNode n22 = new TreeNode(22);\n TreeNode n25 = new TreeNode(25);\n TreeNode n24 = new TreeNode(24);\n n20.left = n8;\n n20.right = n22;\n n8.left = n4;\n n8.right = n12;\n n4.right = n7;\n n12.right = n14;\n n22.left = n21;\n n22.right = n25;\n n25.left = n24;\n\n for (Integer i : printBoundary(n20)) {\n System.out.println(i);\n }\n }", "public abstract Position<E> getLeftChild(Position<E> p);", "private Node rotateLeft() {\n Node right = this.rightChild;\n this.rightChild = right.leftChild;\n right.leftChild = this;\n\n this.updateHeight();\n right.updateHeight();\n\n return right;\n }", "private int root(int i) {\n while(id[i]!=i){\n i = id[i];\n }\n return i;\n }", "private int getParentOf(int i) {\n \t\t// TODO Complete this method!\n \t\treturn i / 2;\n \t}", "public abstract Position<E> insertRightChild(Position<E> p, E e);", "public RedBlackNode(int element, RedBlackNode leftChild, RedBlackNode rightChild) \n { \n this.element = element; \n this.leftChild = leftChild; \n this.rightChild = rightChild; \n color = 1; \n }", "public abstract boolean hasRightChild(Position<E> p);", "private void split(){\n // Slice horizontaly to get sub nodes width\n float subWidth = this.getBounds().width / 2;\n // Slice vertically to get sub nodes height\n float subHeight = this.getBounds().height / 2;\n float x = this.getBounds().x;\n float y = this.getBounds().y;\n int newLevel = this.level + 1;\n\n // Create the 4 nodes\n this.getNodes().add(0, new QuadTree(newLevel, new Rectangle(x + subWidth, y, subWidth, subHeight)));\n this.getNodes().add(1, new QuadTree(newLevel, new Rectangle(x, y, subWidth, subHeight)));\n this.getNodes().add(2, new QuadTree(newLevel, new Rectangle(x, y + subHeight, subWidth, subHeight)));\n this.getNodes().add(3, new QuadTree(newLevel, new Rectangle(x + subWidth, y + subHeight, subWidth, subHeight)));\n\n }", "private int rightIndex(int i) {\n return i * 2 + 1;\n }", "public boolean hasDividerBeforeChildAt(int i) {\n boolean z = false;\n if (i == 0) {\n if ((this.e & 1) != 0) {\n z = true;\n }\n return z;\n } else if (i == getChildCount()) {\n if ((this.e & 4) != 0) {\n z = true;\n }\n return z;\n } else if ((this.e & 2) == 0) {\n return false;\n } else {\n int i2 = i - 1;\n while (true) {\n if (i2 < 0) {\n break;\n } else if (getChildAt(i2).getVisibility() != 8) {\n z = true;\n break;\n } else {\n i2--;\n }\n }\n return z;\n }\n }", "private AvlNode<E> rotateWithLeftChild(AvlNode<E> k1){\n AvlNode<E> k2 = k1.left;\n k1.left = k2.right;\n k2.right = k1;\n k1.height = max(height(k1.left), height(k2.right)) + 1;\n k2.height = max(height(k2.left), k1.height) + 1;\n return k2;\n }", "@Test\n\tpublic void testGetRightChild() {\n\t\tassertEquals(15, testArrayList.get(Heap.getRightChild(4)).intValue());\n\t}", "private BSTNode linkedListToTree (Iterator iter, int n) {\n // TODO Your code here\n \tint leftlenght,rightlength;\n \tdouble LenOfleft = n/2;\n \tleftlenght = (int)java.lang.Math.floor(LenOfleft);\n \trightlength = n - leftlenght -1;\n \t\n \t//linkedListToTree(iter,leftlenght);\n \t//Object item = iter.next();\n \t//linkedListToTree(iter,rightlength);\n \t\n return new BSTNode(linkedListToTree(iter,leftlenght),iter.next(),linkedListToTree(iter,rightlength)) ;\n }", "int getBaseNode();", "private void splitChild(BTreeNode<T> currentNode, BTreeNode<T> child, int index) {\n BTreeNode<T> right = new BTreeNode(child.isLeaf());\n right.setNumKeys(2);\n\n //Mover elementos 3 y 4 de child a right\n for (int i = 3; i < 5; i++) {\n right.setKey(child.getKey(i), i - 3);\n child.setKey(null, i);\n }\n //Si no es hoja mover childs tambien\n if (!child.isLeaf()) {\n for (int i = 3; i < 6; i++) {\n right.setChild(child.getChild(i), i - 3);\n child.setChild(null, i);\n }\n }\n child.setNumKeys(2);\n\n //Insertar right en current node\n for (int i = currentNode.getNumKeys(); i >= index + 1; i--) {\n currentNode.setChild(currentNode.getChild(i), i + 1);\n }\n currentNode.setChild(right, index + 1);\n\n //Insertar dato medio de hijo en current node\n insercionOrdenada(currentNode, child.getKey(2));\n child.setKey(null, 2);\n }", "public static void adjustHeap(int []arr,int i,int length){\n int temp=arr[i];//first get current value/item\n for(int k=i*2+1;k<length;k=k*2+1){//from the left child of current item,in other word,the 2i+1 item\n if(k+1<length&&arr[k]<arr[k+1]){//if the left child is less than the right child ,let k point to right child\n k++;\n }\n if(arr[k]>temp){//if k item-the max of left-right child is more than i item ,swap it ,and maybe k item and his child need to change\n arr[i]=arr[k];\n i=k;\n }else{\n break;\n }\n }\n arr[i]=temp;//place the temp=arr[i] at right position\n }", "private Node insertNode(Node parent, Node curr, EventPair eventPair) {\n\t\tif(curr == null || curr.isNull)\n\t\t{\n\t\t\tif(parent != null)\n\t\t\t{\n\t\t\t\tlastInsertedNode = createNode(eventPair, Color.RED, parent);\n\t\t\t\treturn lastInsertedNode;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlastInsertedNode = createNode(eventPair, Color.BLACK, parent);\n\t\t\t\treturn lastInsertedNode;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tboolean toLeft = false;\n\t\t\tif(curr.ID > eventPair.ID)\n\t\t\t{\n\t\t\t\tNode n = insertNode(curr, curr.left, eventPair);\n\t\t\t\tif (n == curr.parent)\n\t\t\t\t\treturn n;\n\t\t\t\tcurr.left = n;\n\t\t\t\ttoLeft = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tNode n = insertNode(curr, curr.right, eventPair);\n\t\t\t\tif (n == curr.parent)\n\t\t\t\t\treturn n;\n\t\t\t\tcurr.right = n;\n\t\t\t\ttoLeft = false;\n\t\t\t}\n\t\t\tif(toLeft) {\n\t\t\t\tif(curr.color == Color.RED && curr.left.color == Color.RED) {\n\t\t\t\t\tNode sibling = getSibling(curr);\n\t\t\t\t\tif(sibling == null || sibling.color == Color.BLACK) {\n\t if(isLeftChild(curr)) {\n\t rotateRight(curr, true);\n\t } else {\n\t \trotateRight(curr.left, false);\n\t curr = curr.parent;\n\t rotateLeft(curr, true);\n\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tcurr.color = Color.BLACK;\n\t sibling.color = Color.BLACK;\n\t if(curr.parent.parent != null) {\n\t curr.parent.color = Color.RED;\n\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(curr.color == Color.RED && curr.right.color == Color.RED) {\n\t Node sibling = getSibling(curr);\n\t if(sibling == null || sibling.color == Color.BLACK) {\n\t if(!isLeftChild(curr)) {\n\t \trotateLeft(curr, true);\n\t } else {\n\t \trotateLeft(curr.right, false);\n\t \tcurr = curr.parent;\n\t rotateRight(curr, true);\n\t }\n\t } else {\n\t \tcurr.color = Color.BLACK;\n\t sibling.color = Color.BLACK;\n\t if(curr.parent.parent != null) {\n\t \tcurr.parent.color = Color.RED;\n\t }\n\t }\n\t }\n\t\t\t}\n\t\t}\n\t\treturn curr;\n\t}", "private static void test2() {\n BinaryTreeNode node1 = new BinaryTreeNode(1);\n BinaryTreeNode node2 = new BinaryTreeNode(2);\n BinaryTreeNode node3 = new BinaryTreeNode(3);\n BinaryTreeNode node4 = new BinaryTreeNode(4);\n BinaryTreeNode node5 = new BinaryTreeNode(5);\n BinaryTreeNode node6 = new BinaryTreeNode(6);\n BinaryTreeNode node7 = new BinaryTreeNode(7);\n node1.left = node2;\n node1.right = node3;\n node2.left = node4;\n node2.right = node5;\n node5.left = node7;\n node3.right = node6;\n test(\"Test2\", node1, true);\n }", "private static int rightIndex(int parentIndex) {\n return (parentIndex + 1) << 1;\n }", "public static ArrayList<Node> getChildren(Node current) {\r\n\r\n ArrayList<Node> OpChild = new ArrayList<Node>();\r\n if (current.getParentMove() == null) current.setParentMove(\"\");\r\n if (current.getDirection()==null) current.setDirection(\"\");\r\n int i_Zero = 0, j_Zero = 0;\r\n int[][] CurrState = current.mat;\r\n /*\r\n explain for the fucntions\r\n the function get node and the list. check the border and the parent.\r\n swap the state matrix and then create Node with state mat.\r\n set to the node the cost the direction iterazit and it to the list.\r\n after that add it to the list.\r\n */\r\n\r\n DobleLeft(current, OpChild);\r\n DoubleUp(current, OpChild);\r\n\r\n DoubleRight(current, OpChild);\r\n DoubleDown(current, CurrState, OpChild);\r\n// for the first zero\r\n leftMove(current, current.zero1[0], current.zero1[1], OpChild);\r\n upMove(current, current.zero1[0], current.zero1[1], OpChild);\r\n rightMove(current, current.zero1[0], current.zero1[1], OpChild);\r\n downMove(current, current.zero1[0], current.zero1[1], OpChild);\r\n // check if has 2 zeros\r\n if (current.zero2[0]!=-1) {\r\n leftMove(current, current.zero2[0], current.zero2[1], OpChild);\r\n upMove(current, current.zero2[0], current.zero2[1], OpChild);\r\n rightMove(current, current.zero2[0], current.zero2[1], OpChild);\r\n downMove(current, current.zero2[0], current.zero2[1], OpChild);\r\n\r\n }\r\n return OpChild;\r\n }", "private SplayNode rotateWhenXisRightChildOfLeftChild(SplayNode X)\n\t{\n\t\tX = rotateWhenRightOfRoot(X);\n\t\t//G.setLeft(X);\n\t\tX = rotateWhenLeftOfRoot(X);\n\t\treturn X;\n\t}", "abstract ArrayList<Pair<Integer,Double>> adjacentNodes(int i);", "private Node rotateRight() {\n Node left = this.leftChild;\n this.leftChild = left.rightChild;\n left.rightChild = this;\n\n this.updateHeight();\n left.updateHeight();\n\n return left;\n }" ]
[ "0.78406286", "0.78204983", "0.7769191", "0.77406466", "0.76377064", "0.7605767", "0.75440574", "0.75359315", "0.74787486", "0.7427906", "0.73611736", "0.7301248", "0.72930914", "0.724749", "0.71251655", "0.69508004", "0.68926233", "0.6869619", "0.68135214", "0.68027085", "0.6643016", "0.6628353", "0.6447138", "0.6394157", "0.6380639", "0.6222953", "0.6181903", "0.6158447", "0.61276406", "0.61250657", "0.61250407", "0.61228335", "0.61012626", "0.6041652", "0.60397154", "0.6038524", "0.6024418", "0.60145307", "0.59156835", "0.59153867", "0.59153867", "0.59049803", "0.5872604", "0.5851531", "0.58496755", "0.5844365", "0.5836658", "0.58312076", "0.5810286", "0.58087826", "0.5796492", "0.5783538", "0.57745045", "0.5754104", "0.57343686", "0.57313937", "0.5727193", "0.5722435", "0.57137007", "0.57137007", "0.5712075", "0.5698529", "0.569799", "0.5693352", "0.56622225", "0.56487983", "0.56212544", "0.56211334", "0.56193435", "0.5617376", "0.5614178", "0.5604072", "0.5571579", "0.5566254", "0.5549475", "0.5544368", "0.55410707", "0.5538145", "0.5534195", "0.5523523", "0.55097955", "0.55065846", "0.54894674", "0.54814136", "0.547287", "0.54654384", "0.5461353", "0.5456625", "0.54526156", "0.5448194", "0.5437417", "0.54356635", "0.54348785", "0.54316634", "0.54259807", "0.5423764", "0.5414971", "0.5406052", "0.5394991", "0.53924817", "0.53893286" ]
0.0
-1
isSubsequence method Bruteforce method Time complexity: O(n) Space complexity: O(1)
public static boolean isSubsequence(String s, String t) { int pos = -1; for(int i=0; i<s.length(); i++){ pos = t.indexOf(s.charAt(i), pos+1); if(pos == -1){ return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void subSequencesTest3() {\n String text = \"wnylazlzeqntfpwtsmabjqinaweaocfewgpsrmyluadlybfgaltgljrlzaaxvjehhygggdsrygvnjmpyklvyilykdrphepbfgdspjtaap\"\n + \"sxrpayholutqfxstptffbcrkxvvjhorawfwaejxlgafilmzrywpfxjgaltdhjvjgtyguretajegpyirpxfpagodmzrhstrxjrpirlbfgkhhce\"\n + \"wgpsrvtuvlvepmwkpaeqlstaqolmsvjwnegmzafoslaaohalvwfkttfxdrphepqobqzdqnytagtrhspnmprtfnhmsrmznplrcijrosnrlwgds\"\n + \"bylapqgemyxeaeucgulwbajrkvowsrhxvngtahmaphhcyjrmielvqbbqinawepsxrewgpsrqtfqpveltkfkqiymwtqssqxvchoilmwkpzermw\"\n + \"eokiraluaammkwkownrawpedhcklrthtftfnjmtfbftazsclmtcssrlluwhxahjeagpmgvfpceggluadlybfgaltznlgdwsglfbpqepmsvjha\"\n + \"lwsnnsajlgiafyahezkbilxfthwsflgkiwgfmtrawtfxjbbhhcfsyocirbkhjziixdlpcbcthywwnrxpgvcropzvyvapxdrogcmfebjhhsllu\"\n + \"aqrwilnjolwllzwmncxvgkhrwlwiafajvgzxwnymabjgodfsclwneltrpkecguvlvepmwkponbidnebtcqlyahtckk\";\n\n String[] expected = new String[6];\n expected[0] = \"wlfaafrdarvgypipgaputcjflmftgepfmrrhpvwllnfofdqqtmhnjlyeewvxhceqpgftysopelkrhhjtmlapcagllpasazflfthohdtrrvobliwnhazafeevpnlk\";\n expected[1] = \"nzpbwemllljggylhdaatprhwgzxdttypzxlhslksmeohkronrpmprwlmubovmylispqkmqizouwactmatlhmedagfmlafktgmfhcjlhxoagjullcrfxbslceoeyk\";\n expected[2] = \"yewjewyytzegvkyespyqtkoaarjhyaiarjbcrvptsgsatpbyhrslogaycawnajvnxspfwxlekakwkftzcujgglldbswjybhktxcizpypppchanlxwawjctgpnba\";\n expected[3] = \"lqtqaglbgahdnlkppshffxrefygjgjrghrfeveaavmllthqtstrrsdpxgjsgprqarrvktvmriaopltfsswevgytwpvslaiwirjfricwgzxmhqjzvljnglrumbth\";\n expected[4] = \"ansiopuflahsjvdbjxoxfvajiwavuepospgwtpeqjzavfezapfmcnsqeurrthmbweqeqqcwmrmwerfbcshaflbzsqjnghlswabsbibwvvdfsrowgwvyowpvwict\";\n expected[5] = \"ztmncsagjxyrmyrftrlsbvwxlpljrgxdtikgumqowaawxpdgnnzirbgalkhahibewtlishkwamndtnflrxgpufngehniexfgwbykxcncyrelwlmkigmdnklkdqc\";\n int keyLen = 6;\n String[] owns = this.ic.subSequences(text, keyLen);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public static void main(String[] args) {\n String s = \"abc\";\n String t = \"ahbgdc\";\n boolean res = isSubsequence(s,t);\n System.out.println(res);\n }", "static void subsequence(String str)\n {\n // iterate over the entire string\n for (int i = 0; i < str.length(); i++) {\n \n // iterate from the end of the string\n // to generate substrings\n for (int j = str.length(); j > i; j--) {\n String sub_str = str.substring(i, j);\n \n if (!st.contains(sub_str))\n st.add(sub_str);\n \n // drop kth character in the substring\n // and if its not in the set then recur\n for (int k = 0; k < sub_str.length(); k++) {\n StringBuffer sb = new StringBuffer(sub_str);\n \n // drop character from the string\n sb.deleteCharAt(k);\n if (!st.contains(sb)) {\n \tsubsequence(sb.toString());\n }\n }\n }\n }\n }", "private boolean isSubSequence(char str1[], char str2[]) {\n int j = 0;\n int m = str1.length;\n int n = str2.length;\n for (int i=0; i<n&&j<m; i++)\n if (str1[j] == str2[i])\n j++;\n return (j==m);\n }", "public List<List<Integer>> findSubsequences2(int[] nums) {\n List<List<Integer>> ret = new ArrayList<>();\n Arrays.sort(nums);\n //remove set usages\n //let's do a permutation\n\n ret.add(new ArrayList<>());\n int index = 0;\n int new_added_length = 0;\n while (index < nums.length) {\n //try to add nums[index]\n int oldSize = ret.size();\n int cur_added_length = 0;\n\n int cur_start = 0;\n if (index > 0 && nums[index] == nums[index - 1]) {\n cur_start = oldSize - new_added_length;\n }\n for (int i = cur_start; i < oldSize; ++i) {\n List<Integer> pre = ret.get(i);\n if (pre.size() == 0 || pre.get(pre.size() - 1) <= nums[index]) {\n List<Integer> newList = new ArrayList<>(pre);\n newList.add(nums[index]);\n ret.add(newList);\n ++cur_added_length;\n }\n }\n\n new_added_length = cur_added_length;\n ++index;\n }\n\n\n List<List<Integer>> ret2 = new ArrayList<>();\n for (List<Integer> l : ret) {\n if (l.size() >= 2) {\n ret2.add(l);\n }\n }\n return ret2;\n }", "@Test\n public void subSequencesTest2() {\n String text = \"hashco\"\n + \"llisio\"\n + \"nsarep\"\n + \"ractic\"\n + \"allyun\"\n + \"avoida\"\n + \"blewhe\"\n + \"nhashi\"\n + \"ngaran\"\n + \"domsub\"\n + \"setofa\"\n + \"larges\"\n + \"etofpo\"\n + \"ssible\"\n + \"keys\";\n\n String[] expected = new String[6];\n expected[0] = \"hlnraabnndslesk\";\n expected[1] = \"alsalvlhgoeatse\";\n expected[2] = \"siacloeaamtroiy\";\n expected[3] = \"hsrtyiwsrsogfbs\";\n expected[4] = \"cieiudhhaufepl\";\n expected[5] = \"oopcnaeinbasoe\";\n String[] owns = this.ic.subSequences(text, 6);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public static int solution(int[] A) {\n if( A.length <= 1){\n return 0;\n }\n int reverseCount = 0;\n int compareElement = 0;\n int sequenceStart = A[0];\n int i = 0;\n while(i < A.length){\n int firstElement = A[i];\n // array has current and next index should be\n if(i == A.length-1)\n compareElement = A[i-1];\n else\n compareElement = A[i+1];\n if(firstElement == compareElement){\n reverseCount++;\n if(firstElement == 1 ) sequenceStart = 0;\n }else if(sequenceStart != firstElement){\n sequenceStart= firstElement;\n reverseCount += 2;\n }\n i+=2;\n }\n return reverseCount;\n }", "public static void main(String[] args) {\n String s = \"axc\";\n String t = \"ahbgdc\";\n System.out.println(\"new Solution392().isSubsequence(s, t) = \" + new Solution392().isSubsequence(s, t));\n }", "private boolean calculateMaximumLengthBitonicSubarray() {\n\n boolean found = false; // does any BSA found\n\n boolean directionChange = false; //does direction numberOfWays increase to decrease\n\n int countOfChange = 0;\n\n int i = 0;\n directionChange = false;\n int start = i;\n i++;\n for (; i < input.length; i++) {\n if (countOfChange != 0 && countOfChange % 2 == 0) {\n if (this.length < (i - 2 - start + 1)) {\n this.i = start;\n this.j = i - 2;\n this.length = this.j - this.i + 1;\n }\n start = i - 2;\n countOfChange = 0;\n }\n\n if (input[i] > input[i - 1]) {\n if (directionChange == true) {\n countOfChange++;\n }\n directionChange = false;\n }\n if (input[i] < input[i - 1]) {\n if (directionChange == false) {\n countOfChange++;\n }\n directionChange = true;\n }\n\n\n }\n\n if (directionChange == true) {\n if (this.length < (i - 1 - start + 1)) {\n this.i = start;\n this.j = i - 1;\n this.length = this.j - this.i + 1;\n }\n }\n return directionChange;\n }", "private Boolean solution(String s1, String s2){\n\t\t\n\t\tint k = s1.length();\n\t\tchar[] input1 = s1.toCharArray();\n\t\t\n\t\tint m =0 ,count=0;\n\t\t\n\t\twhile(m < s2.length()-1){\n\t\t\t\n\t\tchar[] temp1 = s2.substring(m, m+k).toCharArray();\n\t\t\t\n\t\t\tfor(int i=0; i<s1.length(); i++){\n\t\t\t\tfor(int j=0; j<s1.length(); j++){\n\t\t\t\t\tif(input1[i] == temp1[j] ){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tif(count == s1.length())\n\t\t\t\treturn true;\n\t\tcount =0;\n\t\tm++;\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "private static int solution2(String s) {\r\n int n = s.length();\r\n int ans = 0;\r\n for (int i = 0; i < n; i++)\r\n for (int j = i + 1; j <= n; j++)\r\n if (allUnique(s, i, j)) ans = Math.max(ans, j - i);\r\n return ans;\r\n }", "public static boolean isSubsequence(String s, String t) {\n if (s.length() == 0)\n return true;\n else if (t.length() == 0)\n return false;\n\n int indexS = 0;\n int indexT = 0;\n\n // Step2 - Traverse String t\n while (indexT < t.length() && indexS < s.length()) {\n char currentT = t.charAt(indexT);\n char currentS = s.charAt(indexS);\n System.out.println(\"currentS:\" + currentS + \" currentT: \" + currentT );\n\n // Step3 - If match, increment indexS\n if (currentS == currentT) {\n ++indexS;\n }\n\n ++indexT;\n }\n\n return indexS == s.length(); // indexS HAS to the same length as String s for a match\n }", "@Test\n public void subSequencesTest1() {\n String text = \"crypt\"\n + \"ograp\"\n + \"hyand\"\n + \"crypt\"\n + \"analy\"\n + \"sis\";\n\n String[] expected = new String[5];\n expected[0] = \"cohcas\";\n expected[1] = \"rgyrni\";\n expected[2] = \"yrayas\";\n expected[3] = \"panpl\";\n expected[4] = \"tpdty\";\n String[] owns = this.ic.subSequences(text, 5);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public int countPalindromicSubsequences(String s) {\n \n Integer[][][] memo = new Integer[s.length()][s.length()][4];\n \n int ans = 0;\n for (int i = 0; i < 4; i++) {\n ans = (ans + distinct(s, memo, 0, s.length() - 1, i)) % MOD;\n }\n \n return ans;\n }", "public static String findRepeatingSequence(String input){\n\t char [] inputArray = input.toCharArray();\n\t StringBuffer sequence = new StringBuffer();\n\t\tfor (int i = 0; i < inputArray.length - 1; i++) {\n\t\t\tif (Character.toString(inputArray[i]).equals(Character.toString(inputArray[i + 1]))) {\n\t\t\t\t\n\t\t\t\tsequence.append(Character.toString(inputArray[i]));\n\t\t\t\t\n\t\t\t\t\twhile (Character.toString(inputArray[i]).equals(Character.toString(inputArray[i + 1]))) {\n\t\t\t\t\t\tsequence.append(Character.toString(inputArray[i]));\n\t\t\t\t\t\tif (i + 1 < inputArray.length - 1) {\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t \n\n\t\t\t}else{\n\t\t\t\tif (sequence.length()>0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t }\n\t\n\treturn sequence.toString();\t\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "public static int findSubsequencesThatSumUpTo(int[] arr, int neededSum) {\n int total = 0;\n\n Set<Integer> set = new HashSet<>();\n\n int acc = 0;\n for (int i = 0; i < arr.length; i++) {\n acc += arr[i];\n set.add(acc);\n }\n\n for (Integer x: set) {\n if (x == neededSum) {\n total++;\n }\n\n int required = x + neededSum;\n if (set.contains(required)) {\n total++;\n }\n }\n\n return total;\n }", "public List<List<Integer>> findSubsequences3(int[] nums) {\n //below set is not working\n Set<List<Integer>> ret = new HashSet<>();\n\n ret.add(new ArrayList<>());\n int index = 0;\n while (index < nums.length) {\n //try to add nums[index]\n\n Set<List<Integer>> newly_added_set = new HashSet<>();\n\n for (List<Integer> l : ret) {\n if (l.size() <= 0 || l.get(l.size() - 1) <= nums[index]) {\n List<Integer> newList = new ArrayList<>(l);\n newList.add(nums[index]);\n newly_added_set.add(newList);\n }\n }\n\n ret.addAll(newly_added_set);\n\n ++index;\n }\n\n List<List<Integer>> ret2 = new ArrayList<>();\n for (List<Integer> l : ret) {\n if (l.size() >= 2) {\n ret2.add(l);\n }\n }\n return ret2;\n }", "private boolean isSubSequence(String s, String word){\n int startPointer = 0;\n for(int i=0; i<word.length(); i++){\n int location = s.indexOf(word.charAt(i), startPointer);\n if(location < 0)\n return false;\n startPointer = location+1;\n }\n return true;\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "public boolean isSubSequence(String x, String y){\n\t\tint j = 0;\n\t\tfor(int i = 0 ; i < x.length() && j< y.length(); i++){\n\t\t\tif(x.charAt(j) == y.charAt(i)){\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\treturn j == x.length();\n\t}", "static\nint\ncountSeq(\nint\nn, \nint\ndiff) \n{ \n\n// We can't cover difference of more \n\n// than n with 2n bits \n\nif\n(Math.abs(diff) > n) \n\nreturn\n0\n; \n\n\n// n == 1, i.e., 2 bit long sequences \n\nif\n(n == \n1\n&& diff == \n0\n) \n\nreturn\n2\n; \n\nif\n(n == \n1\n&& Math.abs(diff) == \n1\n) \n\nreturn\n1\n; \n\n\nint\nres = \n// First bit is 0 & last bit is 1 \n\ncountSeq(n-\n1\n, diff+\n1\n) + \n\n\n// First and last bits are same \n\n2\n*countSeq(n-\n1\n, diff) + \n\n\n// First bit is 1 & last bit is 0 \n\ncountSeq(n-\n1\n, diff-\n1\n); \n\n\nreturn\nres; \n}", "public List<String> findRepeatedDnaSequences(String s) {\n if(s.length() < 10) return new ArrayList<String>();\n \n int[] map = new int[256];\n map['A'] = 0;\n map['T'] = 1;\n map['C'] = 2;\n map['G'] = 3;\n \n List<String> result = new ArrayList<String>();\n \n //this set contains string that occurs before\n Set<Integer> visited = new HashSet<Integer>();\n //this set contains string that we have inserted into result\n Set<Integer> inResult = new HashSet<Integer>();\n \n int key = 0;\n \n //Since we only partially modify the key, we need to firstly initialize it\n for(int i = 0; i < 9; i++){\n key <<= 2;\n key |= map[s.charAt(i)];\n }\n \n for(int i = 9; i < s.length(); i++){\n key <<= 2;\n key |= map[s.charAt(i)];\n //our valid key has 20 digits, we use 0xFFFFF to remove digits that beyong this range\n key &= 0xFFFFF;\n \n String temp = s.substring(i - 9, i+1);\n \n //if this is not the first time we visit this substring\n if(!visited.add(key)){\n //if this is the first time we add this substring into result\n if(inResult.add(key)){\n result.add(temp);\n }\n }\n }\n \n return result;\n }", "public static void findMaxIncreasingSubseq() {\n\t\tint[] a = {1,2,5,3,4,7,6};\n\t\tint n = a.length;\n\t\tint[] aux = new int[n];\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tint maxinc = 0;\n\t\t\tfor(int j=0; j<i; j++) {\n\t\t\t\tif(a[j] < a[i] && aux[j] > maxinc) {\n\t\t\t\t\tmaxinc = aux[j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\taux[i] = maxinc+1;\n\t\t}\n\t\tint m = 0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif(aux[i] > m) {\n\t\t\t\tm = aux[i];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"max sub \"+m);\n\t}", "public int palsubsequence2(String str) {\r\n\t\tint m = str.length();\r\n\t\tint[][] mem = new int[m + 1][m + 1];\r\n\r\n\t\tfor (int i = 1; i <= m; ++i) {\r\n\t\t\tmem[i][i] = 1;\r\n\t\t}\r\n\t\t// Bottom-up row-wise filling\r\n\t\tfor (int i = m - 1; i >= 1; --i) {\r\n\t\t\tfor (int j = i + 1; j <= m; ++j) {\r\n\r\n\t\t\t\tif (str.charAt(i - 1) == str.charAt(j - 1))\r\n\t\t\t\t\tmem[i][j] = mem[i + 1][j - 1] + 2;\r\n\t\t\t\telse {\r\n\t\t\t\t\tint incr = mem[i + 1][j];\r\n\t\t\t\t\tint decr = mem[i][j - 1];\r\n\t\t\t\t\tmem[i][j] = Math.max(incr, decr);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprintMemory(mem);\r\n\t\t// printSequence(mem, 1, m, str);\r\n\t\tSystem.out.println();\r\n\t\treturn mem[1][m];\r\n\r\n\t}", "static int longestSubsequence(String x, String y) {\n char[] strX = x.toCharArray();\n char[] strY = y.toCharArray();\n\n Map<Character, Integer> xMap = new HashMap<>();\n Map<Character, Integer> yMap = new HashMap<>();\n\n for (int i = 0; i < strX.length; i++) {\n char c = strX[i];\n if (xMap.containsKey(c)) {\n xMap.put(c, xMap.get(c) + 1);\n } else {\n xMap.put(c, 1);\n }\n }\n\n for (int i = 0; i < strY.length; i++) {\n char c = strY[i];\n if (yMap.containsKey(c)) {\n yMap.put(c, yMap.get(c) + 1);\n } else {\n yMap.put(c, 1);\n }\n }\n\n System.out.println(xMap);\n System.out.println(yMap);\n\n ArrayList<Character> subsequence = new ArrayList<>();\n\n // first find match subsequence\n for (Character c : yMap.keySet()) {\n if (!xMap.containsKey(c)) {\n continue;\n }\n\n int xCount = xMap.get(c);\n int yCount = yMap.get(c);\n int charCount = xCount < yCount ? xCount : yCount;\n\n for (int i = 0; i < charCount; i++) {\n subsequence.add(c);\n }\n }\n\n System.out.println(\"may be seq\" + subsequence);\n\n int max = 0;\n for (int i = 0; i < subsequence.size(); i++) {\n char c = subsequence.get(i);\n ArrayList<Character> remains = new ArrayList<>(subsequence);\n remains.remove(i);\n StringBuilder curr = new StringBuilder();\n curr.append(c);\n// System.out.println(\"max\" + max);\n int result = findPermutation(y, curr, remains, max);\n if (result > max) {\n max = result;\n }\n }\n\n // find matching permutation\n\n System.out.println(\"result\" + max);\n // then find sub string\n return max;\n }", "private static int solution3(String s) {\r\n int n = s.length();\r\n Set<Character> set = new HashSet<>();\r\n int ans = 0, i = 0, j = 0;\r\n while (i < n && j < n) {\r\n if (!set.contains(s.charAt(j))) {\r\n set.add(s.charAt(j++));\r\n ans = Math.max(ans, j - i);\r\n } else {\r\n set.remove(s.charAt(i++));\r\n }\r\n }\r\n return ans;\r\n }", "public static void main(String[] args) {\n\t\tString string1 = \"acbdfbdfacb\";\n\t\tint length = string1.length();\n\t\tString[] sub = new String[length*(length+1)/2];\n\t\tint temp = 0;\n\t\tfor(int i =0;i<length;i++) {\n\t\t\tfor(int j = i;j<length;j++) {\n\t\t\t\tString parts = string1.substring(i,j+1);\n\t\t\t\tsub[temp] = parts;\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t}\n\t\tfor(int j =0;j<sub.length;j++) {\n\t\t\tSystem.out.println(sub[j]);\n\t\t}\n\t\tArrayList<String> rep = new ArrayList<String>();\n\t\tfor(int i=0;i<sub.length;i++) {\n\t\t\tfor(int j =i+1;j<sub.length;j++) {\n\t\t\t\tif(sub[i].equals(sub[j])) {\n\t\t\t\t\trep.add(sub[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint largestString = 0;\n\t\tSystem.out.println(rep);\n\t\tfor(int k =0;k<rep.size();k++) {\n\t\t\tif(rep.get(k).length()>largestString) {\n\t\t\t\tlargestString = rep.get(k).length();\n\t\t\t}\t\t\n\t\t}\n\t\tfor(int k =0;k<rep.size();k++) {\n\t\tif(rep.get(k).length()==largestString) {\n\t\t\tSystem.out.println(\"the longest repeating sequence in a string : \"+rep.get(k));\n\t\t}\n\t\t}\n\t}", "public boolean RepVec(String []a){\n boolean rep=false;\n String aux1=\"\",aux2=\"\";\n for (int i = 0; i < a.length; i++) {\n aux1=a[i];\n for (int j = 0; j < a.length; j++) {\n aux2=a[j];\n if( i!=j ){ \n if(aux1==aux2){\n rep=true;\n return rep;\n } \n } \n }\n }\n return rep;\n \n }", "public int minInsertions(String s) {\n int n = s.length();\n //Initialising dp array. It will represent the longest common subsequence between first i characters of first string and first j characters of second string\n int[][] dp = new int[n+1][n+1];\n \n //Looping through start and end of the string. Thus dp will consider the string from start and string from end and then store the ans\n for (int i = 0; i < n; ++i){\n for (int j = 0; j < n; ++j){\n \n //If both the characters are equal, then we increment the previous dp value otherwise we take max of the next character considered for both strings\n dp[i + 1][j + 1] = s.charAt(i) == s.charAt(n - 1 - j) ? dp[i][j] + 1 : Math.max(dp[i][j + 1], dp[i + 1][j]);\n } \n }\n //Returning ans\n return n - dp[n][n];\n }", "static int[] longestCommonSubsequence(int[] arrA, int[] arrB) {\n int[][] dp = new int[arrA.length + 1][arrB.length + 1];\n\n for(int r = 1; r <= arrA.length; r++){\n for(int c = 1; c <= arrB.length; c++){\n if(arrA[r - 1] == arrB[c - 1]){\n // if same, put the updated val from the prev diag\n dp[r][c] = dp[r - 1][c - 1] + 1;\n }else{\n // if not same, take the greater between prev two vals\n dp[r][c] = Math.max(dp[r - 1][c], dp[r][c - 1]);\n }\n }\n }\n\n //find the max length and its sequence\n int maxLength = dp[arrA.length][arrB.length];\n //System.out.println(maxLength);\n int[] solutionArr = new int[maxLength];\n\n int r = arrA.length, c = arrB.length;\n int solutionArrIndex = solutionArr.length - 1;\n\n while(maxLength > 0){\n //same found?\n // a. put it into the arr\n // b. move diagonal\n if(arrA[r - 1] == arrB[c - 1]){\n solutionArr[solutionArrIndex--] = arrA[r - 1];\n r--; c--;\n maxLength--;\n }else{\n // same not found\n // find the bigger of the two adjacent val\n // move to the position\n if(dp[r][c - 1] > dp[r - 1][c]){\n // left if bigger and up\n c--;\n }else{\n // up is bigger than left\n r--;\n }\n }\n }\n return solutionArr;\n }", "public static int solution(int[] arr) {\n int n = arr.length;\n for (int i = 0; i < n; i++) {\n while (arr[i] != i + 1 && arr[i] < n && arr[i] > 0) {\n int temp = arr[i];\n if (temp == arr[temp - 1])\n break;\n arr[i] = arr[temp - 1];\n arr[temp - 1] = temp;\n }\n }\n for (int i = 0; i < n; i++)\n if (arr[i] != i + 1)\n return i + 1;\n return n + 1;\n }", "public int sol2(int[] inArr) \n\t{\n\t\tSet<Integer> set= new HashSet<>();\n\t\tfor (int i : inArr) {\n\t\t\tif(set.contains(i)) {\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "public static int longestRepeatingSubsequenceNaive(String sequence) {\r\n\t\tint i1 = 0;\r\n\t\tint i2 = 0;\r\n\t\treturn longestRepeatingSubsequenceNaiveHelper(sequence, i1, i2);\r\n\t}", "public static void main(String[] args) {\n int a[] = {12,11,10,5,6,2,30};\n // smaller greater approach with 3 passes can be used to find total number of triplet subsequences in array \n int smaller[] = new int[a.length];\n int greater[] = new int[a.length];\n \n for(int i=0;i<a.length;i++) {\n smaller[i] = greater[i] = -1;\n }\n // smaller fill up\n int min = a[0];\n for(int i=1;i<a.length;i++) {\n if (a[i] > min) {\n smaller[i] = 1;\n } else if ( a[i] < min) {\n min = a[i];\n }\n }\n \n int max = a[a.length-1];\n for(int i=a.length-2;i>=0;i--) {\n if (a[i] < max) {\n greater[i] = 1;\n } else if ( a[i] > max) {\n max = a[i];\n }\n }\n \n for(int i=1;i<a.length-1;i++) {\n if (smaller[i] == greater[i] && greater[i] == 1) {\n System.out.println(\"Triplet found, mid is at -> \" + i + \" : \" + a[i]);\n }\n }\n System.out.println(\"Do we have increasing triplet ?? \" + increasingTripletOnePass(a));\n }", "public static Set<String> getAllSubSeq(String s) {\n if (s == null || s.isEmpty()) {\n return null;\n }\n\n int n = s.length();\n if (n > 31) {\n throw new IllegalArgumentException(\"max str length is 31\");\n }\n int total = (int) Math.pow(2, n) - 1;\n Set<String> set = new HashSet<String>(total);\n\n boolean[] mask = new boolean[n];\n set.add(s);\n\n // let get all other combinations except of \"all false and all true\" masks\n for (int i = 1; i < total; i++) {\n nextMask(mask);\n String subSeq = getSubseq(s, mask);\n set.add(subSeq);\n }\n return set;\n }", "public static void findLongestSubPalindramic(String s) {\n\t\tchar[] arr = s.toCharArray();\n\t\tint begin = -1;\n\t\tint end;\n\t\tint temp_begin;\n\t\tint maxLength = -1;\n\t\tboolean[][] table = new boolean[1000][1000];\n\n\t\tfor (int i = 0; i < table.length; i++) {\n\t\t\ttable[i][i] = true;\n\t\t}\n\t\tfor (int i = 0; i < s.length() - 1; i++) {\n\t\t\tif (arr[i] == arr[i + 1]) {\n\t\t\t\ttable[i][i + 1] = true;\n\t\t\t\tbegin = i;\n\t\t\t\tmaxLength = 2;\n\t\t\t}\n\t\t}\n\t\tfor (int len = 2; len < arr.length; len++) {\n\t\t\tfor (int i = 0; i < arr.length - len + 1; i++) {\n\t\t\t\tint j = len + i - 1;\n\t\t\t\tif (table[i + 1][j - 1] && (arr[i] == arr[j])) {\n\t\t\t\t\ttable[i][j] = true;\n\t\t\t\t\tif (j - i + 1 > maxLength) {\n\t\t\t\t\t\tbegin = i;\n\t\t\t\t\t\tmaxLength = maxLength + 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"begin:\" + begin + \", length:\" + maxLength);\n\t}", "public int solution(int[] A) {\n Set<Integer> set = new HashSet<>();\n\n for(int i=1; i < A.length+1; i++)\n set.add(i);\n\n for(int i=0; i < A.length; i++)\n {\n if(set.contains(A[i]))\n set.remove(A[i]);\n\n else\n set.add(A[i]); \n }\n\n if(set.isEmpty())\n return 1;\n\n return 0;\n }", "public int distinctSubseqII(String S) {\n int[] end = new int[26]; // 本字符添加之前的长度\n int res = 0;\n int added; // 当前额外增加的数量\n int mod = (int) 1e9 + 7;\n\n System.out.println('\\n' + S);\n for (char c : S.toCharArray()) {\n // 额外增加的数量等于前面的数量加上1(当前字符串)减去最后一次相同字符添加之前的数量\n added = (res + 1 - end[c - 'a']) % mod;\n\n end[c - 'a'] = (res + 1) % mod; // 影响的为前一个字符的数量加上单字符的数量\n\n res = (res + added) % mod;\n System.out.printf(\"%2c, %2d, %2d\\n\", c, res, end[c - 'a']);\n }\n return (res + mod) % mod;\n }", "public int longestCommonSubsequence(String text1, String text2) {\n int[][] dp = new int[text1.length()][text2.length()];\n\n // init the first column\n for (int i = 0; i < text1.length(); i++) {\n // if they match characters\n if (text1.charAt(i) == text2.charAt(0)) {\n dp[i][0] = 1;\n }\n // check if the the subseq length is larger from the substring at 0...i-1\n if (i > 0 && dp[i - 1][0] > dp[i][0]) {\n dp[i][0] = dp[i - 1][0];\n }\n }\n // init the first row\n for (int i = 0; i < text2.length(); i++) {\n // if they match characters\n if (text1.charAt(0) == text2.charAt(i)) {\n dp[0][i] = 1;\n }\n // check if the the subseq length is larger from the substring at 0...i-1\n if (i > 0 && dp[0][i - 1] > dp[0][i]) {\n dp[0][i] = dp[0][i - 1];\n }\n }\n\n // use the results from the previous DP indexes for the text 1 and 2 subsequences\n // to compare which subsequence we should use\n for (int i = 1; i < dp.length; i++) {\n boolean characterMatch = false;\n for (int j = 1; j < dp[i].length; j++) {\n // leverage the previous result to determine what the\n // starting number will be, since we are using that\n // to enable comparing the characters at i and j and\n // appending that to what the previous longest subsequence\n // was.\n\n if (dp[i - 1][j] > dp[i][j - 1]) {\n dp[i][j] = dp[i - 1][j];\n } else {\n dp[i][j] = dp[i][j - 1];\n // ONLY update the length IF the choice was if the subseq length came from\n // the same index for i, because it \n if (!characterMatch && text1.charAt(i) == text2.charAt(j)) {\n dp[i][j]++;\n characterMatch = true;\n }\n }\n }\n }\n // return the result from dp[text1.length()-1][text2.length()-1]\n // as it holds the longest subseqence\n return dp[text1.length()-1][text2.length()-1];\n }", "public int solve1(int[] array, int from, int to) {\n HashSet<Integer> seen = new HashSet<>();\n\n for (int e : array) {\n seen.add(e);\n }\n\n for (int i = from; i <= to; i++) {\n if (!seen.contains(i)) {\n return i;\n }\n }\n\n return Integer.MAX_VALUE;\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(true){\n try{\n \tint n=sc.nextInt();\t\n }\n catch(Exception e){\n break;\n }\n String p=sc.next();\n String t1=sc.next();\n char text[]=t1.toCharArray();\n char pat[]=p.toCharArray();\n if(p.length()>t1.length()){\n System.out.println();\n }\n else {\n int f[]=new int[pat.length];\n f[0]=0;\n int j=0;\n for(int i=1;i<pat.length;){\n if(pat[i]==pat[j]){\n f[i]=j+1;\n i++;\n j++;\n }\n else {\n if(j>0){\n j=f[j-1];\n }\n else {\n f[i]=0;\n i++;\n }\n }\n }\n int i=0;\n j=0;\n boolean b=false;\n while(i<text.length&&j<pat.length){\n if(pat[j]==text[i]){ \n i++;\n j++;\n if(j==pat.length){\n System.out.println(i-pat.length);\n b=true;\n j=f[j-1];\n }\n }\n else if(j>0){ \n j=f[j-1];\n }\n else {\n i++;\n }\n }\n if(!b) {\n System.out.println();\n }\n System.out.println();\n \n }\n }\n }", "private static boolean judge(int[] a) {\n\t\tint st = 1;\r\n\t\tint ed = a.length-2;\r\n\t\tint sa = 0;\r\n\t\tint sb = 0;\r\n\t\twhile (st<=ed) {\r\n\t\t\tif(a[st]>a[ed]){\r\n\t\t\t\tsa+=a[st];\r\n\t\t\t\tst++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tsa+=a[ed];\r\n\t\t\t\ted--;\r\n\t\t\t}\r\n\t\t\tif(st>ed)break;\r\n\t\t\tif(a[st]>a[ed]){\r\n\t\t\t\tsb+=a[st];\r\n\t\t\t\tst++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tsb+=a[ed];\r\n\t\t\t\ted--;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif(sa>=sb)return true;\r\n\t\treturn false;\r\n\t}", "public static boolean find3Numbers(int A[], int n, int X) { \n \n // Your code \n for(int i=0;i<n-2;i++)\n {\n HashSet<Integer> set = new HashSet<>();\n int toFind=X-A[i];\n for(int j=i+1;j<n;j++)\n {\n if(set.contains(toFind-A[j]))\n {\n return true;\n }\n set.add(A[j]);\n }\n }\n return false;\n }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public static int longestCommonSubsequence(String text1, String text2) {\n Map<Character, List<Integer>> characterListMap = new HashMap<>();\n char[] cA = text1.toCharArray();\n for (int i = 0; i < cA.length; i++) {\n if (characterListMap.get(cA[i]) == null) {\n List<Integer> list = new ArrayList<>();\n list.add(i);\n characterListMap.put(cA[i], list);\n } else {\n characterListMap.get(cA[i]).add(i);\n }\n }\n char[] cA2 = text2.toCharArray();\n int i = 0;\n int prevBiggest = 0;\n int previndex = 0;\n int currBiggest = 0;\n while (i < cA2.length && characterListMap.get(cA2[i]) == null) {\n i++;\n }\n if (i < cA2.length && characterListMap.get(cA2[i]) != null) {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n i++;\n currBiggest++;\n }\n\n\n for (; i < cA2.length; i++) {\n if (characterListMap.containsKey(cA2[i])) {\n if (characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1) > previndex) {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n currBiggest++;\n } else {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n if (currBiggest > prevBiggest) {\n prevBiggest = currBiggest;\n }\n currBiggest = 1;\n }\n }\n }\n\n return prevBiggest > currBiggest ? prevBiggest : currBiggest;\n }", "public void test_subSequence() {\n assertTrue(\"Incorrect substring returned\", hw1.subSequence(0, 5).equals(\n \"Hello\") && (hw1.subSequence(5, 10).equals(\"World\")));\n assertTrue(\"not identical\", hw1.subSequence(0, hw1.length()) == hw1);\n\n try {\n hw1.subSequence(0, Integer.MAX_VALUE);\n fail(\"IndexOutOfBoundsException was not thrown.\");\n } catch(IndexOutOfBoundsException ioobe) {\n //expected\n }\n\n try {\n hw1.subSequence(Integer.MAX_VALUE, hw1.length());\n fail(\"IndexOutOfBoundsException was not thrown.\");\n } catch(IndexOutOfBoundsException ioobe) {\n //expected\n }\n\n try {\n hw1.subSequence(-1, hw1.length());\n fail(\"IndexOutOfBoundsException was not thrown.\");\n } catch(IndexOutOfBoundsException ioobe) {\n //expected\n }\n }", "private static void longestRepeatingSubsequence(String string) {\n\t\t\n\t}", "public void repair () {\n WriteableByteArray whole = new WriteableByteArray ();\n WriteableByteArray piece = new WriteableByteArray ();\n int [] offsets = new int [sequences.size ()];\n for (int index = 0;index < commonSequence.length;index++) {\n byte b = commonSequence [index];\n int i = 0;\n for (byte [] sequence : sequences)\n if (sequence [index + offsets [i++]] != b) {\n CommonSequence commonPiece = new CommonSequence ();\n i = 0;\n for (byte [] s : sequences) {\n piece.reset ();\n for (;;) {\n byte c = s [index + offsets [i]];\n if (c == b)\n break;\n piece.write (c);\n offsets [i]++;\n }\n commonPiece.add (piece.toByteArray ());\n i++;\n }\n whole.write (commonPiece.getCommonSequence ());\n break;\n }\n // all sequences now coincide at b\n whole.write (b);\n }\n commonSequence = whole.toByteArray ();\n matched = false;\n throw new NotTestedException ();\n }", "private boolean matchSequences ( String sequence1, String sequence2 )\n{\n int matches = 0;\n\n // Check for sequences with less than 20 characters.\n if ( ( sequence1.length () <= 20 ) ||\n ( sequence2.length () <= 20 ) )\n {\n return sequence1.equalsIgnoreCase ( sequence2 );\n } // if\n\n // Count the matching bases in the first 20 characters.\n for ( int i = 0; i < 20; i++ )\n\n // Count the matching characters (but not N bases).\n if ( ( sequence1.charAt ( i ) == sequence2.charAt ( i ) ) &&\n ( sequence1.charAt ( i ) != 'x' ) &&\n ( sequence1.charAt ( i ) != 'n' ) )\n\n matches++;\n\n // Check for 90% identity (18/20) for a valid match\n if ( matches >= 18 ) return true;\n return false;\n}", "public static void isPermutation(String s1, String s2){\r\n\t\t\t\r\n\t\t\t// Can also do by sorting both string and comparing each character by character\r\n\t\t\t\r\n\t\t\tboolean flag = true;\r\n\t\t\t\r\n\t\t\tArrayList hm = new ArrayList();\r\n\t\t\t\r\n\t\t\tfor(int i = 0 ; i < s1.length(); i++){\r\n\t\t\t\t\r\n\t\t\t\t\thm.add(s1.charAt(i));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(int i = 0 ; i < s2.length(); i++){\r\n\t\t\t\tif(hm.contains(s2.charAt(i))){\r\n\t\t\t\t\thm.remove((Character)s2.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Not A permutation\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n//\t\t\tHashMap hm = new HashMap();\r\n//\t\t\t\r\n//\t\t\tfor(int i = 0 ; i < s1.length(); i++){\r\n//\t\t\t\tif(hm.containsKey(s1.charAt(i))){\r\n//\t\t\t\t\thm.put(s1.charAt(i),hm.get(s1.charAt(i) + 1 ));\r\n//\t\t\t\t}\r\n//\t\t\t\telse{\r\n//\t\t\t\t\thm.put(s1.charAt(i), 1);\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t\tfor(int i = 0 ; i < s2.length(); i++){\r\n//\t\t\t\tif(hm.containsKey(s2.charAt(i))){\r\n//\t\t\t\t\thm.put(s2.charAt(i),hm.get(s2.charAt(i) - 1 ));\r\n//\t\t\t\t}\r\n//\t\t\t\telse{\r\n//\t\t\t\t\tflag = false;\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\t\t\t\r\n\t\t\tif (hm.size()==0)\r\n\t\t\t\tSystem.out.println(\"Permutations\");\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Not Permutations\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// Checking by creating ascii character array\r\n\t\t\tif (s1.length() != s2.length()) {\r\n\t\t\t\tSystem.out.println(\"Second Solution Not Permutation\");\r\n\t\t\t\t}\r\n\t\t\t\tint[] letters = new int[256]; // Assumption\r\n\t\t\t\t\tchar[] s_array = s1.toCharArray();\r\n\t\t\t\tfor (char c : s_array) { // count number of each char in s.\r\n\t\t\t\t letters[c]++;\r\n\t\t\t\t }\r\n\t\t\t\t\r\n\t\t\t\t for (int i = 0; i < s2.length(); i++) {\r\n\t\t\t\t int c = (int) s2.charAt(i);\r\n\t\t\t\t if (--letters[c] < 0) {\r\n\t\t\t\t System.out.println(\" Second Solution Not Permutation\");\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\t\t}", "public List<String> findRepeatedDnaSequences(String s){\n HashMap<Character,Integer> map=new HashMap<>();\n Set<Integer> firstSet=new HashSet<>();\n Set<Integer> dupSet=new HashSet<>();\n List<String> res=new ArrayList<>();\n map.put('A',0);\n map.put('C',1);\n map.put('G',2);\n map.put('T',3);\n char[] chars=s.toCharArray();\n for(int i=0;i<chars.length-9;i++){\n int v=0;\n for(int j=i;j<i+10;j++){\n v<<=2;\n v|=map.get(chars[j]);\n }\n if(!firstSet.add(v)&&dupSet.add(v)){\n res.add(s.substring(i,i+10));\n }\n }\n return res;\n }", "public static void main(String[] args) throws IOException {\n BufferedReader f = new BufferedReader(new FileReader(\"whereami.in\"));\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"whereami.out\")));\n\n //reads in and initializes n and k values\n StringTokenizer st = new StringTokenizer(f.readLine());\n int stringSize = Integer.parseInt(st.nextToken());\n\n st = new StringTokenizer(f.readLine());\n //initializes variable for input string\n String string = st.nextToken();\n\n //computes all subsequences and adds to set\n subsequence(string, string.length());\n\n boolean[] checks= new boolean[stringSize];\n\n int smallestSize = 0;\n\n for (int i = 0; i < stringSize; i++) {\n checks[i] = true;\n for (String s : subSequences) {\n if (s.length() == i + 1 && numberOccurrences(string, s) != 1) {\n checks[s.length() - 1] = false;\n }\n }\n if (checks[i] == true) {\n smallestSize = i + 1;\n break;\n }\n }\n\n out.println(smallestSize);\n out.close();\n }", "public int findUnsortedSubarray(int[] nums) {\n int[] copy = nums.clone();\n Arrays.sort(copy);\n int result = nums.length;\n for (int i = 0; i < nums.length; i++) {\n if (nums[i] == copy[i]) {\n result--;\n } else {\n break;\n }\n }\n if (result <= 2) {\n return result;\n }\n for (int i = nums.length - 1; i >= 0; i--) {\n if (nums[i] == copy[i]) {\n result--;\n } else {\n break;\n }\n }\n return result;\n }", "public static void main(String args[]){\n \n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int a[]=new int[n];\n int i;\n for(i=0;i<n;i++)\n {\n a[i]=in.nextInt();\n \n }\n int s1=in.nextInt();\n int s2=in.nextInt();\n int count=0;\n for(i=0;i<=n;i++)\n {\n if(a[i]==s1)\n {\n count++;\n break;\n }\n }\n if(count==1)\n System.out.println(i);\n else\n System.out.println(\"-1\");\n count=0;\n for(i=0;i<n;i++)\n {\n if(a[i]==s2)\n {\n count++;\n break;\n }\n }\n if(count==1)\n System.out.println(i);\n else\n System.out.println(\"-1\");\n \n}", "public static void main (String[] args) {\n String s1 = \"hac\";\n String s2 = \"cathartic\";\n\n System.out.println(subsequence(s1,s2, 0, 0));\n }", "boolean checkWin() {\n Iterator<Integer> seq = sequence.iterator();\n Iterator<Integer> in = input.iterator();\n\n while (seq.hasNext() && in.hasNext()) {\n seq.next();\n in.next();\n if (!seq.hasNext() && !in.hasNext()) {\n return true;\n }\n }\n return false;\n }", "public boolean isScramble(String s1, String s2) {\n if (s1.equals(s2)) return true;\n\n int[] letters = new int[26];\n for (int i = 0; i < s1.length(); i++) {\n letters[s1.charAt(i) - 'a']++;\n letters[s2.charAt(i) - 'a']--;\n }\n for (int i = 0; i < 26; i++) if (letters[i] != 0) return false;\n\n for (int i = 1; i < s1.length(); i++) {\n if (isScramble(s1.substring(0, i), s2.substring(0, i))\n && isScramble(s1.substring(i), s2.substring(i))) return true;\n if (isScramble(s1.substring(0, i), s2.substring(s2.length() - i))\n && isScramble(s1.substring(i), s2.substring(0, s2.length() - i))) return true;\n }\n return false;\n }", "private boolean comparacionOblicuaID(String[] dna) {\n boolean repetir;\n int aux = 0;\n final int CASO = 3;\n int largo = dna.length - CASO - 1;\n int repaso = 1, fila,columna;\n do {\n do {\n repetir = true;\n if (repaso == 1) {\n fila = 0;\n columna = largo - aux;\n } else {\n fila = largo - aux;\n columna = 0;\n }\n for (int i = 0; i <= (CASO + aux); i += 2) {\n int colum = columna + i;\n int fil = fila + i;\n if ((colum) == (fil) && repaso == 1) {\n repetir = false; break;\n }\n if (((dna.length-CASO)>=colum && repaso==1) || ((dna.length-CASO)>=fil && repaso==0)) {\n if (dna[fil].charAt(colum) == dna[fil + 2].charAt(colum + 2)) {\n if (dna[fil].charAt(colum) == dna[fil + 1].charAt(colum + 1)) {\n if (((fil - 1) >= 0 && (colum - 1) >= 0) && (dna[fil].charAt(colum) == dna[fil - 1].charAt(colum - 1))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n } else {\n if (((dna.length - CASO+1) >= (colum + 3) && repaso == 1) || ((dna.length-1) >= (fil + 3) && repaso == 0)) {\n if ((dna[fil].charAt(colum) == dna[fil + 3].charAt(colum + 3))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n }\n }\n }\n }\n }\n } else {\n if (colum == fil) repetir = false;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux = 0;\n } while (repaso >= 0);\n return false;\n }", "@Test\r\n\tpublic void testL1IsSubSeqOfL2WithSeveralOccurenceOfOneInL2() {\r\n\t\tl1 = Arrays.asList(2, 4, 5,5,5,5);\r\n\t\tl2 = Arrays.asList(2, 3, 1, 5, 1, 3);\r\n\t\tassertFalse(\"The list L1 is a subseq of L2\", sequencer.subSeq(l1, l2));\r\n\t}", "public int solution(int[] A) {\n\n\t\tHashSet<Integer> set = new HashSet<>();\n\n\t\tfor (int i = 0; i < A.length; i++)\n\t\t\tset.add(A[i]);\n\n\t\tfor (int i = 1; i < A.length + 1; i++) \n\t\t\tif (!set.contains(i)) return 0;\n\n\t\treturn 1;\n\t}", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint t = scn.nextInt();\n\t\twhile (t-- > 0) {\n\t\t\tint n = scn.nextInt();\n\t\t\tint k = scn.nextInt();\n\t\t\tString s = scn.next();\n\t\t\tString s1 = new StringBuilder(s).reverse().toString();\n\t\t\tint[][] dp = new int[n + 1][n + 1];\n\t\t\tfor (int i = 0; i <= n; i++) {\n\t\t\t\tfor (int j = 0; j <= n; j++) {\n\t\t\t\t\tif (i == 0 || j == 0)\n\t\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t\telse if (s.charAt(i - 1) == s1.charAt(j - 1))\n\t\t\t\t\t\tdp[i][j] = dp[i - 1][j - 1] + 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tdp[i][j] = Math.max(dp[i - 1][j], dp[i][j - 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int[] c : dp) {\n\t\t\t\tfor (int v : c) {\n\t\t\t\t\tSystem.out.print(v + \" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\tint rem = n - dp[n][n];\n\t\t\tif (rem <= k)\n\t\t\t\tSystem.out.println(\"YES\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"NO\");\n\t\t}\n\t}", "public int solution(int[] A) {\n int L = A.length;\n int[] B = new int[L+1];\n for(int i=0; i<L; i++) {\n int t = A[i];\n B[t-1] = t;\n }\n for(int j=0; j<L; j++) {\n if(B[j] == 0) {\n return j+1;\n }\n }\n return 0;\n }", "public static void main(String[] args) {\n\n\t\tScanner s = new Scanner(System.in);\n\n//\t\tint n = s.nextInt();\n//\t\t\n//\t\tint nums[] = new int[n];\n//\t\t\n//\t\t\n//\t\tfor (int i = 0; i < nums.length; i++) {\n//\t\t\tnums[i] = s.nextInt();\n//\t\t}\n//\t\tint m = s.nextInt();\n//int maxs[] = new int[m];\n//\t\t\n//\t\t\n//\t\tfor (int i = 0; i < maxs.length; i++) {\n//\t\t\tmaxs[i] = s.nextInt();\n//\t\t}\n//\n//\t\tString[] strarr = new String[n];\n//\n//\t\tfor (int i = 0; i < n; i++) {\n//\t\t\tstrarr[i] = s.next();\n//\t\t}\n//\n//\t\tint []inArr =minimalChange(strarr);\n//\n////\t\t\n////\t\tint[] inArr =subArray(nums, maxs);\n//\t\tfor (int i = 0; i < inArr.length; i++) {\n//\n//\t\t\tSystem.out.println(inArr[i]);\n//\t\t}\n\n\t\tSystem.out.println(longestSubsequence(s.next()));\n\t\t\n//\t\ts.close();\n\t\t\n\t\t\n\t}", "int lcs(int x, int y, string s1, string s2,int[][] str){\n \n if(text1.length()==0||text2.length()==0) {\n return 0;\n }\n \n if(str[x][y]!=0) {\n return str[x][y];\n }\n \n int ans =0;\n \n if(text1.charAt(0)== text2.charAt(0)) {\n \n \n \n ans = 1 + longestCommonSubsequence(x+1,y+1,ros1, ros2,str);\n \n \n }\n else {\n \n int first = longestCommonSubsequence(x,y+1,ros1, text2,str);\n int second = longestCommonSubsequence(x+1,y,text1, ros2,str);\n \n ans = Math.max(first,second);\n \n \n \n }\n \n str[x][y] = ans;\n return ans;\n \n \n \n \n \n}", "public int findDuplicatesB(int[] input) {\n ArrayList<Integer> nonDuplicates = new ArrayList<>();\n for (int value : input) {\n if (!nonDuplicates.contains(value)) {\n nonDuplicates.add(value);\n }\n }\n return input.length - nonDuplicates.size();\n }", "public int longestCommonSubsequence(String text1, String text2) {\n int[][] dp = new int[text1.length()][text2.length()];\n\n // init the first column\n for (int i = 0; i < text1.length(); i++) {\n // if they match characters\n if (text1.charAt(i) == text2.charAt(0)) {\n dp[i][0] = 1;\n }\n // check if the the subseq length is larger from the substring at 0...i-1\n if (i > 0 && dp[i - 1][0] > dp[i][0]) {\n dp[i][0] = dp[i - 1][0];\n }\n }\n // init the first row\n for (int i = 0; i < text2.length(); i++) {\n // if they match characters\n if (text1.charAt(0) == text2.charAt(i)) {\n dp[0][i] = 1;\n }\n // check if the the subseq length is larger from the substring at 0...i-1\n if (i > 0 && dp[0][i - 1] > dp[0][i]) {\n dp[0][i] = dp[0][i - 1];\n }\n }\n\n // use the results from the previous DP indexes for the text 1 and 2 subsequences\n // to compare which subsequence we should use\n for (int i = 1; i < dp.length; i++) {\n for (int j = 1; j < dp[i].length; j++) {\n // check if we found a character match\n if (text1.charAt(i) == text2.charAt(j)) {\n // if so, use the LCS from the i-1,j-1 index to hold the new length\n dp[i][j] = dp[i - 1][j - 1] + 1;\n } else if (dp[i - 1][j] > dp[i][j - 1]) {\n // if there was no character match, use the\n // LCS length from the column before or row above\n dp[i][j] = dp[i - 1][j];\n } else {\n dp[i][j] = dp[i][j - 1];\n }\n }\n }\n // return the result from dp[text1.length()-1][text2.length()-1]\n // as it holds the longest subseqence\n return dp[text1.length()-1][text2.length()-1];\n }", "public boolean isScramble(String s1, String s2) {\n int lena = s1.length();\n int lenb = s2.length();\n if(lena != lenb) return false;\n if(lena == 0||s1.equals(s2)) return true;\n char[] crr1 = s1.toCharArray();\n char[] crr2 = s2.toCharArray();\n Arrays.sort(crr1);\n Arrays.sort(crr2);\n if(!Arrays.equals(crr1,crr2)) return false;\n \n int i = 1; \n while(i< lena){\n String a1 = s1.substring(0,i);\n String b1 = s1.substring(i);\n String a2 = s2.substring(0,i);\n String b2 = s2.substring(i);\n if(isScramble(a1,a2) && isScramble(b1,b2)) return true;\n String a3 = s2.substring(lenb - i);\n String b3 = s2.substring(0, lenb-i);\n if(isScramble(a1,a3) && isScramble(b1,b3)) return true;\n i++;\n }\n return false;\n }", "public static void main(String[] args) {\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint n = sc.nextInt();\r\n\t\tint arr[] = new int[n];\r\n\t\tfor(int i = 0; i < n ; i++) {\r\n\t\t\tarr[i] = sc.nextInt();\r\n\t\t}\r\n\t\t\r\n\t\tint new_length = n;\r\n\t\tfor(int i = 0; i < new_length ; i++) {\r\n\t\t\tfor(int j = i+1 ; j < new_length ; j++) {\r\n\t\t\t\tif(arr[i] == arr[j]) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr[j] = arr[ new_length-1];\r\n \r\n\t\t\t\t\t new_length--;\r\n \r\n j--;\r\n \r\n\t\t\t\t\tint arr1[] = Arrays.copyOf(arr, new_length);\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\tfor(int i = 0; i < new_length ; i++) {\r\n\t\t\tSystem.out.println(arr[i]);\r\n\t\t}\r\n\t\t\r\n\t}", "static int superSeq(String X, String Y, int m, int n)\n {\n int[][] dp = new int[m + 1][n + 1];\n\n // Fill table in bottom up manner\n for (int i = 0; i <= m; i++) {\n for (int j = 0; j <= n; j++) {\n // Below steps follow above recurrence\n if (i == 0)\n dp[i][j] = j;\n else if (j == 0)\n dp[i][j] = i;\n else if (X.charAt(i - 1) == Y.charAt(j - 1))\n dp[i][j] = 1 + dp[i - 1][j - 1];\n else\n dp[i][j] = 1\n + Math.min(dp[i - 1][j],\n dp[i][j - 1]);\n }\n }\n\n return dp[m][n];\n }", "public boolean solution(int[] bits) {\n int length = bits.length ;\n if(bits[length - 1] == 1){\n return false;\n }\n int index =0;\n boolean flag = true;\n while(index < length){\n if(bits[index] == 0){\n index +=1 ;\n flag = true;\n }else{\n index +=2 ;\n flag = false;\n }\n }\n return flag;\n }", "private boolean detectRepeat(String substring) {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tchar actual=substring.charAt(i);\n\t\t\t\n\t\t\tint j=i+1;\n\t\t\t//Los anteriores ya se han comprobado\n\t\t\tfor (; j < substring.length() && actual!=substring.charAt(j) ; j++);\n\t\t\t\n\t\t\tif (j<substring.length()) return true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public static boolean canThreePartsEqualSum(int[] arr) {\n int sum=0;\n int cumulative[]=new int[arr.length];\n for(int i=0;i<arr.length;i++){\n sum+=arr[i];\n cumulative[i]=sum;\n }\n for(int i=0;i<cumulative.length;i++){\n for(int j=i+1;j<cumulative.length;j++){\n if(cumulative[i]==cumulative[j]-cumulative[i]){\n if(cumulative[i]==cumulative[cumulative.length-1]-cumulative[j] && (cumulative.length-1) !=j){\n return true;\n }\n }\n }\n }\n return false;\n}", "public boolean isScramble(String s1, String s2) {\n if(s1 == null || s2 == null) return false;\n if(s1.length() != s2.length()) return false;\n this.s1 = s1;\n this.s2 = s2;\n int len = s1.length();\n sol = new boolean[len + 3][len + 3][len + 3];\n cal = new boolean[len + 3][len + 3][len + 3];\n return isScramble(0, 0, s1.length());\n }", "public List<Integer> minSubsequence(int[] nums) {\n List<Integer> res = new ArrayList<>();\n int sum = 0;\n for (int num : nums) sum += num;\n int sub = 0;\n Arrays.sort(nums);\n for (int i = nums.length - 1; i >= 0; i--) {\n int v = nums[i];\n res.add(v);\n sub += v;\n sum -= v;\n if (sub > sum) break;\n }\n return res;\n }", "static int[] OnepassSol1(int[]a, int n){\r\n Map<Integer, Integer> map = new HashMap<>();\r\n for (int i = 0; i < a.length; i++) {\r\n int complement = n - a[i];\r\n if (map.containsKey(complement)) {\r\n return new int[] { map.get(complement), i };\r\n }\r\n map.put(a[i], i);\r\n }\r\n int[] ans = {-1,-1};\r\n return ans;\r\n }", "public void sequenceSwaps(int[] tempItem1, int[] tempItem2, Vector<int[]> cyclePosition, int distTotal, Vector<int[]> sequence, int mut_rate){\n boolean b;\n int[] cycles2 = new int[cyclePosition.size()];\n int nrSwaps = 0;\n Arrays.fill(cycles2,-1);\n sequence.clear();\n while(true){\n int j = r.nextInt(cyclePosition.size());\n\n b = false;\n for(int i = 0; i < cycles2.length; i++)\n if(cycles2[i] == -1){\n b = true;\n break;\n }\n if(!b){\n break;\n }\n while(cycles2[j] != -1)\n j = r.nextInt(cyclePosition.size());\n cycles2[j] = 1;\n int[] indexSwap = cyclePosition.elementAt(j).clone();\n int dist = indexSwap.length; //+1;//ps1.getDistance(tempDist1,tempDist2);\n\n //\n int rInt = r.nextInt(indexSwap.length);\n int indexI, indexII;\n \n //tempR.clear();\n for(int i = 0; i < dist-1; i++){\n indexI = tempItem1[indexSwap[rInt]];\n //find indexI in temp2\n indexII = -1;\n for(int k = 0; k < indexSwap.length; k++)\n if(tempItem2[indexSwap[k]] == indexI){\n indexII = indexSwap[k];\n break;\n }\n \n int[] tempInt = new int[2];\n tempInt[0] = indexII;\n tempInt[1] = indexSwap[rInt];\n\n sequence.add(tempInt);\n\n //swaps the two positions\n int temp = tempItem1[indexSwap[rInt]];\n tempItem1[indexSwap[rInt]]=tempItem1[indexII];\n tempItem1[indexII]=temp;\n\n nrSwaps++;\n if(nrSwaps >= mut_rate-1)\n break;\n\n }\n if(nrSwaps >= mut_rate-1)\n break;\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tbr = new BufferedReader(new FileReader(new File(\"input.txt\")));\r\n\t\tSystem.setOut(new PrintStream(new File(\"output.txt\")));\r\n\t\tint T = readInt();\r\n\t\t\r\n\t\tfor (int ind = 1; ind<=T; ind++) {\r\n\t\t\tSystem.out.print(\"Case #\" + ind + \": \");\r\n\t\t\t\r\n\t\t\tint N = readInt();\r\n\t\t\tint[] ar = readIntArr();\r\n\t\t\tfor (int i = 0; i < N; i++)ar[i]--;\r\n\t\t\tboolean used[] = new boolean[N];\r\n\t\t\tint ans = 0;\r\n\t\t\tint pairMax = 0;\r\n\t\t\tint cycleMax = 0;\r\n\t\t\tint cyclePair = 0;\r\n\t\t\tint pair = 0;\r\n\t\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\t\tif (!used[i]) {\r\n\t\t\t\t\tList<Integer> list = new LinkedList<Integer>();\r\n\t\t\t\t\tlist.add(i);\r\n\t\t\t\t\tused[i] = true;\r\n\t\t\t\t\tint j = ar[i];\r\n\t\t\t\t\twhile(!list.contains(j) && !used[j]) {\r\n\t\t\t\t\t\tlist.add(j);\r\n\t\t\t\t\t\tused[j] = true;\r\n\t\t\t\t\t\tj = ar[j];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!list.contains(j))continue;\r\n\t\t\t\t\tif (list.size() == 2)pair++;\r\n\t\t\t\t\tboolean removed = false;\r\n\t\t\t\t\twhile(list.get(0) != j){list.remove(0);removed = true;}\r\n\t\t\t\t\tif (list.size() > 2 && list.size() > cycleMax) cycleMax = list.size();\r\n\t\t\t\t\tif (list.size() == 2) {\r\n\t\t\t\t\t\tint a = list.remove(0);\r\n\t\t\t\t\t\tint b = list.remove(0);\r\n\t\t\t\t\t\tint tmp = 2;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tboolean us[] = new boolean[N];\r\n\t\t\t\t\t\t\tus[a] = true;\r\n\t\t\t\t\t\t\tus[b] = true;\r\n\t\t\t\t\t\t\t//System.out.println(\" test \" + a + b);\r\n\t\t\t\t\t\t\tSet<Integer> set = new HashSet<Integer>();\r\n\t\t\t\t\t\t\tset.add(a);\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tboolean found = false;\r\n\t\t\t\t\t\t\t\tSet<Integer> tSet = new HashSet<Integer>();\r\n\t\t\t\t\t\t\t\tfor (int ii = 0; ii < N; ii++) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (!us[ii] && set.contains(ar[ii])) {\r\n\t\t\t\t\t\t\t\t\t\tus[ii] = true;\r\n\t\t\t\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\t\t\t\ttSet.add(ii);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (found)tmp++;\r\n\t\t\t\t\t\t\t\tif (!found)break;\r\n\t\t\t\t\t\t\t\tset.addAll(tSet);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tset = new HashSet<Integer>();\r\n\t\t\t\t\t\t\tset.add(b);\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tboolean found = false;\r\n\t\t\t\t\t\t\t\tSet<Integer> tSet = new HashSet<Integer>();\r\n\t\t\t\t\t\t\t\tfor (int ii = 0; ii < N; ii++) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (!us[ii] && set.contains(ar[ii])) {\r\n\t\t\t\t\t\t\t\t\t\tus[ii] = true;\r\n\t\t\t\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\t\t\t\ttSet.add(ii);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(found)tmp++;\r\n\t\t\t\t\t\t\t\tif (!found)break;\r\n\t\t\t\t\t\t\t\tset.addAll(tSet);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//if (removed) {\r\n\t\t\t\t\t\t//\tif (tmp > cyclePair)cyclePair = tmp;\r\n\t\t\t\t\t\t//} else {\r\n\t\t\t\t\t\t pairMax += tmp;\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//cyclePair += 2 * pair;\r\n\t\t\t//if (pair > 1) pairMax += 2 * (pair - 1);\r\n\t\t\tans = Math.max(cyclePair, pairMax);\r\n\t\t\tans = Math.max(cycleMax, ans);\r\n\t\t\tSystem.out.println(ans);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "int findCandidate(int a[], int size) {\n int maj_index = 0, count = 1;\n int i;\n for (i = 1; i < size; i++) {\n if (a[maj_index] == a[i])\n count++;\n else\n count--;\n\n if (count == 0) {\n maj_index = i;\n count = 1;\n }\n }\n return a[maj_index];\n }", "public static void main (String[] args) throws java.lang.Exception\n {\n \n Scanner sc = new Scanner(System.in);\n \n \n int arraySize = sc.nextInt();\n int[] numberArray = new int[arraySize];\n \n for(int i=0;i<arraySize;i++){\n numberArray[i] = sc.nextInt(); \n //System.out.println(numberArray[i]);\n }\n \n int currentStart = 0;\n int j = 0;\n int nextStart = 0;\n int maxLengthBio = 0;\n int finalStartIndex = 0;\n int finalEndIndex = 0;\n \n // Checking for the longest increasing subsequence\n while(currentStart < arraySize-1){\n\n \n while(j < arraySize-1 && numberArray[j] < numberArray[j+1]){\n j++;\n }\n \n //System.out.println(\"Current Start Index reached=\"+j);\n \n while(j < arraySize-1 && numberArray[j] >= numberArray[j+1]){\n \n if(numberArray[j] >= numberArray[j+1])\n nextStart = j+1;\n j++;\n \n }\n //System.out.println(\"Current End Index reached=\"+j);\n \n if((j - currentStart + 1) >= maxLengthBio){\n finalStartIndex = currentStart;\n finalEndIndex = j;\n }\n \n currentStart = nextStart;\n //j = nextStart;\n \n //System.out.println(\"j at end=\"+currentStart);\n \n }\n \n for(int i=finalStartIndex;i<finalEndIndex;i++){\n System.out.print(numberArray[i]+\" \");\n }\n \n }", "public static void main(String[] args) {\n\r\n\t\tString s1=\"abcd\";\r\n\t\tString s2=\"vbvabcdqwe\";\r\n\t\tchar arr1[]=s1.toCharArray();\r\n\t\tchar arr2[]=s2.toCharArray();\r\n\r\n\t\tint flag=0;\r\n\t\tfor(int i=0;i<arr1.length;i++)\r\n\t\t{\r\n\t\t\tfor(int j=i;j<arr2.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(arr1[i]==arr2[j])\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String args[] ) throws Exception {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[] seqArray = new int[n];\n for (int i = 0; i < n; i++) {\n seqArray[i] = scanner.nextInt();\n }\n // getSeqValue(seqArray); //this method is an accepted one on Hackerrank but time complexity is not order n; i.e. !O(n);\n getLinearOrderY(seqArray); // trying to get O(n) time complexity;\n }", "public static void main(String[] args) {\n // TODO Auto-generated method stub\n String test = \"abcabcbb\";\n int result = LongestSubStringWithoutRepeatingCharacters.solution(test);\n System.out.println(result);\n }", "public static int solution(int[] A) {\n int[] copy = A.clone();\n Arrays.sort(A);\n int left = A.length;\n int right = 0;\n int strIdx = 0;\n int endIdx = A.length - 1;\n while (left > right && (strIdx != endIdx)) {\n for (int i = 0; i < A.length; i++) {\n if (copy[i] == A[strIdx]) {\n left = i;\n }\n if (copy[i] == A[endIdx]) {\n right = i;\n }\n }\n if (A[strIdx + 1] - A[strIdx] <= A[endIdx] - A[endIdx - 1]) {\n strIdx++;\n } else {\n endIdx--;\n }\n }\n return copy[right] - copy[left];\n }", "static int isSubstring(String s1, String s2) {\n int m = s1.length();\n int n = s2.length();\n\n // A loop to slide pat[] one by one\n for (int i = 0; i <= n - m; i++) {\n int j;\n\n // For current index i, check for pattern match\n for (j = 0; j < m; j++) {\n if (s2.charAt(i + j) != s1.charAt(j)) {\n break;\n }\n }\n\n if (j == m) {\n return i;\n }\n }\n return -1;\n }", "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }", "public boolean repeatedSubstringPattern(String s) {\n char[] ch = s.toCharArray();\n int[] pi = new int[ch.length];\n pi[0] = 0;\n int matched = 0;\n for (int i = 1; i < pi.length; i++) {\n while (matched > 0 && ch[matched] != ch[i])\n matched = pi[matched-1];\n if (ch[matched] == ch[i])\n matched++;\n pi[i] = matched;\n }\n return pi[pi.length-1] != 0 && pi.length % (pi.length - pi[pi.length-1]) == 0;\n }", "public int findLongestCommonIncreasingSubsequence(int [] arr, int [] arr2) {\n\n // length of lcs ending at arr2[i] \n int [] dp = new int[arr2.length];\n\n for (int i = 0; i < arr.length; i++) {\n int current = 0;\n for (int j = 0; j < arr2.length; j++) {\n\n if (arr[i] == arr2[j]) {\n if (current + 1 > dp[j]) {\n dp[j] = current + 1;\n }\n }\n\n if (arr[i] > arr[j]) {\n if (table[j] > current) {\n current = table[j];\n }\n }\n }\n }\n\n for (int i = 0; i < arr2.length; i++) {\n res = Math.max(res, dp[i]);\n }\n\n return res;\n }", "@Test\r\n\tpublic void testL1IsSubSeqOfL2WithElementsAtheEndOfL2() {\r\n\t\tl1 = Arrays.asList(2, 4, 5);\r\n\t\tl2 = Arrays.asList(23, 1, 1, 3,4,5,2);\r\n\t\tassertTrue(\"The list L1 is a subseq of L2\", sequencer.subSeq(l1, l2));\r\n\t}", "public static void main(String args[])\n {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int ar[] = new int[n];\n for(int i=0 ; i<n ; i++)\n {\n \n ar[i] = in.nextInt(); \n }\n for(int j=1; j<=n;j++)\n { int count =0;\n for(int k=0 ; k<n ; k++) \n { \n if(j==ar[k])\n count++;\n \n }\n if(count == 0)\n {\n System.out.print(j); \n \n }\n }\n}", "static String findSubString(String str) \n { \n int n = str.length(); \n \n // Count all distinct characters. \n int dist_count = 0; \n \n boolean[] visited = new boolean[MAX_CHARS]; \n Arrays.fill(visited, false); \n for (int i=0; i<n; i++) \n { \n if (visited[str.charAt(i)] == false) \n { \n visited[str.charAt(i)] = true; \n dist_count++; \n } \n } \n \n // We basically maintain a window of characters that contains all characters of given string. \n int start = 0, start_index = -1; \n int min_len = Integer.MAX_VALUE; \n \n int count = 0; \n int[] curr_count = new int[MAX_CHARS]; \n for (int j=0; j<n; j++) \n { \n // Count occurrence of characters of string \n curr_count[str.charAt(j)]++; \n \n // If any distinct character matched, then increment count \n if (curr_count[str.charAt(j)] == 1 ) \n count++; \n \n // if all the characters are matched \n if (count == dist_count) \n { \n // Try to minimize the window i.e., check if \n // any character is occurring more no. of times \n // than its occurrence in pattern, if yes \n // then remove it from starting and also remove \n // the useless characters. \n while (curr_count[str.charAt(start)] > 1) \n { \n if (curr_count[str.charAt(start)] > 1) \n curr_count[str.charAt(start)]--; \n start++; \n } \n \n // Update window size \n int len_window = j - start + 1; \n if (min_len > len_window) \n { \n min_len = len_window; \n start_index = start; \n } \n } \n } \n // Return substring starting from start_index \n // and length min_len \n return str.substring(start_index, start_index+min_len); \n }", "private static int solution(final int[] A)\n {\n Arrays.sort(A);\n\n for(int i=0; i<A.length - 1; i=i+2)\n {\n if (A[i] != A[i + 1])\n {\n return A[i];\n }\n }\n\n return A[A.length - 1];\n }", "private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }", "public static void main(String[] args) {\n\t\n\tString a = \"aabbbc\", b= \"cabbbac\";\n\t// a = abc, b=cab\n\t//we will remove all dublicated values from \"a\"\n\tString a1 = \"\"; //store all the non duplicated values from \"a\"\n\t\n\tfor (int j=0; j<a.length();j++) //this method is with nested loop\n\tfor (int i=0; i<a.length();i++) {\n\t\tif (!a1.contains(a.substring(j, j+1))) {\n\t\t\ta1 += a.substring(j, j+1);\n\t\t}\n\t\t\t\n\t}\n\tSystem.out.println(a1);\n\t//we will remove all duplicated values from \"b\"\n\tString b1 = \"\"; //store all the non duplicated values from \"b\"\n\tfor(int i=0; i<b.length();i++) { //this is with simple loop\n\t\tif(!b1.contains(b.substring(i, i+1))) {\n\t\t\t // \"\"+b.charAt(i)\n\t\t\tb1 += b.substring(i, i+1);\n\t\t\t// \"\"+b.charAt(i);\n\t\t}\n\t}\n\tSystem.out.println(b1);\n\t\n\t\n\t//a1 = \"acb\", b1 = \"cab\"\n\tchar[] ch1 = a1.toCharArray();\n\tSystem.out.println(Arrays.toString(ch1));\n\t\n\tchar[] ch2 = b1.toCharArray();\n\tSystem.out.println(Arrays.toString(ch2));\n\t\n\tArrays.sort(ch1);\n\tArrays.sort(ch2);\n\t\n\tSystem.out.println(\"========================\");\n\tSystem.out.println(Arrays.toString(ch1));\n\tSystem.out.println(Arrays.toString(ch2));\n\t\n\t\n\tString str1 = Arrays.toString(ch1);\n\tString str2 = Arrays.toString(ch2);\n\t\n\tif(str1.equals(str2)) {\n\t\tSystem.out.println(\"true, they are same letters\");\n\t}else {\n\t\tSystem.out.println(\"false, they are contain different letters\");\n\t}\n\t\n\t\n\t// solution 2:\n\t\t\t String Str1 = \"cccccaaaabbbbccc\" , Str2 = \"cccaaabbb\";\n\t\t\t \n\t\t\t Str1 = new TreeSet<String>( Arrays.asList( Str1.split(\"\"))).toString();\n\t\t\t Str2 = new TreeSet<String>( Arrays.asList( Str2.split(\"\"))).toString();\n\t\t\t \n\t\t\t System.out.println(Str1.equals(Str2));\n\t\t\t\t \n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n}", "private static void findDuplicatesBruteForce(int[] arr) {\n\t\t\n\t\tfor(int i = 0; i< arr.length ; i++)\n\t\t{\n\t\t\tfor ( int j = i+1 ; j < arr.length ; j++)\n\t\t\t{\n\t\t\t\tif(arr[i] == arr[j])\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(arr[i] + \" is duplicate by brute force method\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public List<String> findRepeatedDnaSequences(String s) {\n if (s == null) return null;\n HashSet<String> result = new HashSet<String>();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < s.length() - 9; ++i) {\n String seq = s.substring(i, i + 10);\n int code = encode(seq);\n if (!set.contains(code)) {\n set.add(code);\n } else {\n result.add(seq);\n }\n }\n return new ArrayList<String>(result);\n }", "static void findTwoMissingNumber(int a[]) {\n int miss1 = 0;\n int miss2;\n int miss1miss2 = 0;\n\n int size = a.length;\n for (int i = 0; i < size; i++) {\n miss1miss2 ^= ((i + 1) ^ a[i]);\n }\n\n miss1miss2 ^= (size + 1);\n miss1miss2 ^= (size + 2);\n\n int diff = miss1miss2 & (-miss1miss2);\n\n for (int i = 0; i < size; i++) {\n if (((i + 1) & diff) > 0)\n miss1 ^= (i + 1);\n\n if ((a[i] & diff) > 0)\n miss1 ^= a[i];\n }\n\n if (((size + 1) ^ diff) > 0)\n miss1 ^= (size + 1);\n\n if (((size + 2) ^ diff) > 0)\n miss1 ^= (size + 2);\n\n miss2 = miss1miss2 ^ miss1;\n\n System.out.println(miss1);\n System.out.println(miss2);\n }", "static void findI1s(final int length, int[] B) {\r\n\t final long max = 1 << length;\r\n\t for (long i = 0; i < max; i++) {\r\n\t long currentNumber = i;\r\n\t final int[] buffer = new int[length];\r\n\t boolean[] I1 = new boolean[length]; // I1 to be passed to next method\r\n\t int bufferPosition = buffer.length;\r\n\t while (bufferPosition > 0) {\r\n\t buffer[--bufferPosition] = (int) (currentNumber & 1);\r\n\t currentNumber >>>= 1;\r\n\t }\r\n\t for(int x = 0; x < buffer.length; x++) {\r\n\t \tif(buffer[x] == 1) {\r\n\t \t\tI1[x] = true;\r\n\t \t}\r\n\t \telse {\r\n\t \t\tI1[x] = false;\r\n\t \t}\r\n\t \tSystem.out.print(buffer[x]);\r\n\t }\r\n\t\t System.out.println();\r\n\t }\r\n\t}", "boolean hasSeq();", "public Set<List<String>> getCombination(int[] inHand) {\n Set<List<String>> result = new HashSet<>();\n for (int i = 0; i < inHand.length; i++) {\n if (inHand[i] < 1) continue;\n int[] copyHand = copyArray(inHand);\n //possibility of A AA AAA\n for (int j = 1; j <= inHand[i]; j++) {\n if (j == 1) {\n String cSet = \"\";\n\n for (int seq = i; seq <= i + 2; seq++) {\n if (seq >= inHand.length || copyHand[seq] < 1) continue;\n cSet += seq;\n copyHand[seq] -= 1;\n }\n// System.out.println(\"i: \" + i + \" j: \" + j+\"inhand: \" + arrayToString\n// (inHand));\n\n Set<List<String>> a = getCombination(copyHand);\n Set<List<String>> newA = new HashSet<>();\n for (List<String> s : a) {\n s.add(cSet);\n s.sort(Comparator.naturalOrder());\n if (s.equals(\"\")) continue;\n newA.add(s);\n }\n result.addAll(newA);\n continue;\n }\n\n String currentSet = \"\";\n int[] copyOfInHand = copyArray(inHand);\n for (int t = 0; t < j; t++) {\n currentSet += i;\n }\n\n copyOfInHand[i] -= j;\n Set<List<String>> after = getCombination(copyOfInHand);\n Set<List<String>> newAfter = new HashSet<>();\n for (List<String> s : after) {\n s.add(currentSet);\n s.sort(Comparator.naturalOrder());\n newAfter.add(s);\n }\n result.addAll(newAfter);\n }\n }\n if (result.isEmpty()) result.add(new ArrayList<>());\n int min = result.stream().map(set -> set.size()).min(Comparator\n .naturalOrder()).get();\n Set<List<String>> minSets = result.stream().filter(set -> set.size() == min)\n .collect(Collectors\n .toSet());\n// combinationCache.put(inHand, minSets);\n return minSets;\n }" ]
[ "0.6753521", "0.6487365", "0.6295196", "0.62054193", "0.6205011", "0.6142827", "0.60979116", "0.59954315", "0.5968445", "0.5966364", "0.59569585", "0.5949307", "0.5929026", "0.58746934", "0.5856206", "0.5844241", "0.57875574", "0.5773664", "0.57725704", "0.571213", "0.57028633", "0.5673225", "0.56587803", "0.565356", "0.56380934", "0.5627091", "0.56213737", "0.5607342", "0.56043476", "0.5590276", "0.55808526", "0.5574987", "0.55569535", "0.5536245", "0.55324924", "0.55186266", "0.5514847", "0.54926896", "0.5490516", "0.54676694", "0.54618365", "0.54610085", "0.54517335", "0.5440462", "0.54340816", "0.5394307", "0.5392113", "0.53888613", "0.5375072", "0.536665", "0.5349275", "0.5339513", "0.5331763", "0.53290117", "0.53178436", "0.5317391", "0.5307839", "0.53026474", "0.5295407", "0.5293721", "0.5283027", "0.5280795", "0.5276726", "0.52751875", "0.5272789", "0.52689636", "0.52563167", "0.5254876", "0.5253264", "0.52333105", "0.5233293", "0.52330416", "0.52325505", "0.52242815", "0.52070886", "0.51993424", "0.519845", "0.5196342", "0.5190619", "0.5188151", "0.5181339", "0.51804686", "0.5172742", "0.51715696", "0.5164726", "0.51639813", "0.51596713", "0.5153244", "0.5153198", "0.51492065", "0.51471215", "0.5146075", "0.51408195", "0.5137036", "0.513471", "0.5134237", "0.51304877", "0.5125341", "0.5124052", "0.5120501" ]
0.5780581
17
This is the main method which drives the program.
public static void main(String[] args) { String s = "abc"; String t = "ahbgdc"; boolean res = isSubsequence(s,t); System.out.println(res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main() {\n \n }", "public static void main()\n\t{\n\t}", "public static void main() {\n }", "public static void main(){\n\t}", "public static void main (String []args){\n }", "public static void main(String[] args) {\n \n\n }", "public static void main(String []args){\n\n }", "public void main(){\n }", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "public static void main(String []args){\n }", "public static void main(String []args){\n }", "public static void main(String[] args) {\r\n// Use for unit testing\r\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 static void main(String[] args) {\n \n }", "public static void main (String [] args){\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n\n }", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "public static void main (String args[]) {\n\t\t\n }", "public static void main (String[]args) throws IOException {\n }", "public static void main(String[] args) {\n \n \n \n\t}", "static void main(String[] args)\n {\n }", "public Main() {\n \n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {}", "public static void main(String[] args) {}", "static void main(String[] args) {\n }", "public static void main(String args[]) throws IOException {\r\n\t\t\r\n\t}", "public static void main (String [] args){\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)\r\n {\r\n \r\n \r\n \r\n }", "public static void main (String[] args) {\n\n }", "public static void main(String[] args) {\n\n\n\n\n\n\n\n }", "public static void main(String[] args) \n {\n\t \n\t \n\t \n}", "public static void main (String[] args) {\r\n\t\t \r\n\t\t}", "public static void main (String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n \n }", "public static void main(String[] args){\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }", "public static void main(String[] args)\r\n {\n \r\n \r\n }", "public static void main (String[] args) {\n }", "public static void main(String[] args) {\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\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args) {\n \r\n}", "public static void main(String[] args)\n {\n\t\n }", "public static void main(String[] args) {\n \r\n\t}", "public static void main(String[] args) {\n\r\n}", "public static void main(String[] args) {\n \n\t}", "public static void main(String args[]){\n\t\t\n\t\n\t}", "public static void main (String[] args)\r\n {\n }", "public static void main(String[] args) throws IOException {\n\r\n \r\n \r\n }", "public static void main(String[] args)\n {\n\n }", "public static void main(String[] args) {\n\n\n\n }", "public static void main(String[] args) {\n\n\n\n }", "public static void main(String[] args) {\n\n\n\n }", "public static void main(String[] args) {\n\r\n }", "public static void main(String[] args) { }", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\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}", "public static void main(String[] args){\n \t\n }", "public static void main (String [] args) {\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\t}", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n\t\r\n}", "public static void main (String [] args) {\n\t}", "public static void main(String[] args) throws IOException {\n \t\n }", "public static void main(String[] args) {\n\t \t\n\t \t\n\t}", "public static void main(String[] args)\r\n {\n\r\n }", "public void Main(){\n }", "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){\r\n\t\t\r\n\tSystem.out.println(\"main method(-)\");\r\n\t\r\n\t}", "static public void main(String[] args) {\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String args[]){\n\t\t\n\t}", "public static void main(String[] args) {\r\n }", "public static void main(String[] args) {\r\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 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 static void main(String[] args) {\n\n }", "public static void main(String[] args) {\n\n }" ]
[ "0.83747923", "0.8301215", "0.81466335", "0.8077481", "0.78347987", "0.772925", "0.7702447", "0.76924074", "0.76908964", "0.7680108", "0.7677582", "0.7677582", "0.7645699", "0.76346767", "0.76346767", "0.7622221", "0.7617592", "0.7617592", "0.7617592", "0.7617592", "0.7617592", "0.7617592", "0.7603368", "0.75956213", "0.75956213", "0.7583123", "0.7579528", "0.7575915", "0.7568803", "0.7561733", "0.75412846", "0.7540446", "0.7540446", "0.750031", "0.74790436", "0.7477303", "0.7476389", "0.74730927", "0.7472147", "0.7469327", "0.7466339", "0.7462327", "0.7459703", "0.74588776", "0.7450143", "0.74450886", "0.7442453", "0.7440888", "0.7434873", "0.7434873", "0.7425727", "0.74243015", "0.742417", "0.7423156", "0.74207824", "0.7413181", "0.74105394", "0.74055165", "0.7403923", "0.7401385", "0.73960936", "0.73960936", "0.73960936", "0.7395695", "0.7388946", "0.7387423", "0.7387423", "0.7387423", "0.7387423", "0.73829925", "0.7382775", "0.7376202", "0.7375873", "0.73739266", "0.7362088", "0.7361755", "0.7355945", "0.7354981", "0.7354165", "0.73418033", "0.73397565", "0.7337468", "0.73366266", "0.73335606", "0.733335", "0.7333255", "0.7332718", "0.7332718", "0.7328917", "0.7328917", "0.7328917", "0.7328917", "0.7328917", "0.7328917", "0.7328917", "0.7328917", "0.7328917", "0.7328917", "0.7328917", "0.7328917", "0.7328917" ]
0.0
-1
Gets if two players are on the same team
public boolean areOnSameTeam(Player p1, Player p2) { return areOnSameTeam(p1.getUniqueId(), p2.getUniqueId()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean areOnSameTeam(UUID s1, UUID s2) {\n\t\tTeam team = plugin.getTeamManager().getPlayerTeam(s1);\n\t\tTeam warpeeTeam = plugin.getTeamManager().getPlayerTeam(s2);\n\n\t\tif (team == null || warpeeTeam == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (team != warpeeTeam)\n\t\t\treturn false;\n\n\t\tif (team == warpeeTeam)\n\t\t\treturn true;\n\t\treturn false;\n\n\t}", "boolean hasTeam();", "@Override\n\tpublic boolean isIsTeamMatch() {\n\t\treturn _esfTournament.isIsTeamMatch();\n\t}", "private boolean isEqual(Roster r2)\n\t{\n\t\tIterator<Player> it1 = iterator();\n\t\twhile(it1.hasNext())\n\t\t{\n\t\t\tPlayer p = it1.next();\n\t\t\tif(!r2.has(p))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tIterator<Player> it2 = r2.iterator();\n\t\twhile(it2.hasNext())\n\t\t{\n\t\t\tPlayer p = it2.next();\n\t\t\tif(!has(p))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic int compareTo(Team team) {\n\n\t\tif (this.numOfPlayer == team.numOfPlayer) {\n\t\t\tSystem.out.println(\"Both teams have same number of players\");\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "private boolean multipleTeams(SettingsClass s){\r\n int a =s.getPlayerColor(0);\r\n for(int i=0;i<s.getNumPlayers();i++){\r\n if(a!=s.getPlayerColor(i)){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "default public boolean isTeamLeader() {\n return equals(team().leader());\n }", "@Override\n public boolean isLocalPlayersTurn() {\n return getTeam().equals(currentBoard.turn());\n }", "boolean hasSameAs();", "public Player getTeamMate(){\n\t\tif(team == null) return null;\n\t\tCollection<Player> players = team.getPlayers();\n\t\tfor(Player p : players){\n\t\t\tif(!p.equals(this))return p; \n\t\t}\n\t\treturn null;\n\t}", "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "@Override\n\tpublic boolean getIsTeamMatch() {\n\t\treturn _esfTournament.getIsTeamMatch();\n\t}", "public String winningTeam(String team1, String team2)\n {\n int r = new Random().nextInt(3 + 1);\n\n int team1Standing = -10;\n int team2Standing = -10;\n for (int i = 0 ; i < playoffs.length; i++)\n {\n if (playoffs[i].equals(team1))\n {\n team1Standing = i;\n break;\n }\n }\n\n for (int i = 0 ; i < playoffs.length; i++)\n {\n if (playoffs[i].equals(team2))\n {\n team2Standing = i;\n break;\n }\n }\n\n if(team1Standing < team2Standing && r == 1)\n return team1;\n else if (team1Standing > team2Standing && r == 1)\n return team2;\n\n else\n {\n r = new Random().nextInt(1 + 1);\n if(r == 0)\n return team1;\n else\n return team2;\n }\n\n }", "public boolean winner(){\n\t\treturn goals1 > goals2;\n\t}", "@Override\n public boolean equals(Object other) {\n if(this == other)\n return true;\n if(other instanceof Player)\n return this.hashCode() == other.hashCode();\n return false;\n }", "public boolean isPlayer1() {\n\t\treturn currentPlayer.equals(player1);\n\t}", "public boolean isWinner(ArrayList<Player> allPlayers,Player player){\n\t\tPlayer winner=player;\n\t\tfor (Player p : allPlayers) {\n\t\t\tif(p.getTimeStamp()>winner.getTimeStamp()){\n\t\t\t\twinner = p;\n\t\t\t}\n\t\t}\n\t\treturn winner.equals(player);\n\t}", "private boolean sameTeamCheck(char state)\r\n {\r\n if((state == 'b' && isHuman) || (state == 'p' && !isHuman))\r\n return true;\r\n return false;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TeamDTO)) {\n return false;\n }\n TeamDTO other = (TeamDTO) object;\n if ((this.teamID == null && other.teamID != null) || (this.teamID != null && !this.teamID.equals(other.teamID))) {\n return false;\n }\n return true;\n }", "public boolean whoIsHere(){\r\n\t\treturn otherPlayer;\r\n\t}", "@Override\n public boolean equals(Object other) {\n if (!(other instanceof Player)) {\n return false;\n }\n\n return (playerColor().equals(((Player) other).playerColor()));\n }", "public boolean areSameSport(StudentAthlete other){\n return this.sport.equalsIgnoreCase(other.sport);\n }", "@Override\n public boolean gameOver() {\n return player1Wins() || player2Wins();\n }", "public boolean isPlayerInThisGame(Player player) {\n return player.equals(getRedPlayer()) || player.equals(getWhitePlayer());\n }", "private static boolean comparePlayerPosition(RSTile tile) {\n RSTile player_position = Player07.getPosition();\n if (tile == null || player_position == null) {\n return false;\n }\n return tile.equals(player_position);\n }", "public boolean betterEquals(Object obj)\n\t{\n\t\tif (obj instanceof Player)\n\t\t{\n\t\t\tPlayer other = (Player) obj;\n\t\t\treturn this.name.equals(other.name) && this.pawn == other.pawn;\n\t\t}\n\t\treturn false;\n\t}", "public boolean versus(Player player1, Player player2, Player player3) {\n Card player1FaceCard = player1.getHand().removeCardFromTop();\n Card player2FaceCard = player2.getHand().removeCardFromTop();\n Card player3FaceCard = player3.getHand().removeCardFromTop();\n if (player1FaceCard == null || player2FaceCard == null || player3FaceCard == null)\n return false;\n // modifyPile(pile, player1FaceCard, player2FaceCard, player3FaceCard);\n return compareAllPlayers(player1FaceCard, player2FaceCard, player3FaceCard);\n }", "@Test\n public final void testPlayer2Win() {\n checkPlayerWin(player2);\n }", "public boolean hasTeam(User std) {\r\n\t\tboolean hasTeam = false;\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.students WHERE id = \" + std.getID() + \" ;\");\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint teamId \t= Integer.parseInt(array.get(3));\r\n\t\t\t\r\n\t\t\tif(teamId != 0){\r\n\t\t\t\thasTeam = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn hasTeam;\r\n\t}", "public static Team whoWonGameTeam() {\r\n\t\tint highest = Main.winScoreNumb;\r\n\t\tTeam winner = null;\r\n\t\t\r\n\t\t//Winner is team one.\r\n\t\tif (Utils.stringToInt(Main.team1Score) >= highest) {\r\n\t\t\thighest = Utils.stringToInt(Main.team1Score);\r\n\t\t\twinner = Main.teamOne;\r\n\t\t}\r\n\t\t//Winner is team two.\r\n\t\tif (Utils.stringToInt(Main.team2Score) >= highest) {\r\n\t\t\thighest = Utils.stringToInt(Main.team2Score);\r\n\t\t\twinner = Main.teamTwo;\r\n\t\t}\r\n\t\t\r\n\t\treturn winner;\r\n\t}", "public boolean winOfJuggernaut(){\n\tString [] names=getJoueurs();\n\tfor(int i=0; i<players.size(); i++){\n\t if(i!=juggernaut && players.get(names[i])) return false;\n\t}\n\treturn true;\n }", "Match getTeam2LooserOfMatch();", "private boolean inSameSuit() {\n for (int i = 0; i < cards.length-2; i++) {\n if (cards[i].charAt(1) != cards[i + 1].charAt(1)) {\n return false;\n }\n }\n \n return true;\n }", "public boolean getPlayerTwo()\n\t{\n\t\treturn playerTwo;\n\t}", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }", "public boolean GameOver() {\r\n if(Main.player1.SuaVida()==0 || Main.player2.SuaVida()==0)\r\n return true;\r\n return false;\r\n }", "@Override\n\tpublic boolean equals(Object obj) {\n if (obj == this) { \n return true; \n } \n // Check if obj is an instance of Position or not \n if (!(obj instanceof Player)) { \n return false; \n } \n // Type cast obj to \"Player\" so that we can compare the name & side attributes \n Player p = (Player) obj; \n return ( this.name == p.getName() && this.side == p.getSide() ); \n }", "private boolean checkMatch(String first, String second, String third)\n {\n // First makes sure the given inputs aren't empty\n if (!first.isEmpty())\n {\n // Set the winner to be the current player\n return first.equals(second) && first.equals(third);\n }\n /*\n * If one or more of them are empty, set he current winner to -1 and\n * return false\n */\n return false;\n }", "private boolean twoCornersWithSameColor(OthelloBitBoard board) {\r\n\t\tlong playerBoard = board.getBitBoardOf(playerColor);\r\n\t\tlong opponentBoard = board.getBitBoardOf(opponentColor);\r\n\t\treturn Long.bitCount(playerBoard & CORNER_MASK) > 1 || Long.bitCount(opponentBoard & CORNER_MASK) > 1;\r\n\t}", "private static boolean checkWinner(Player playerA, Player playerB) {\n\t\tboolean gameOver = false;\n\t\tif (playerA.getShips().isEmpty()) {\n\t\t\tSystem.out.println(playerB.getName() + \" Won the Battle\");\n\t\t\tgameOver = true;\n\t\t} else if (playerB.getShips().isEmpty()) {\n\t\t\tSystem.out.println(playerA.getName() + \" Won the Battle\");\n\t\t\tgameOver = true;\n\t\t} else if (playerA.getTargetList().isEmpty() && playerB.getTargetList().isEmpty()) {\n\t\t\tSystem.out.println(\"peace\");\n\t\t\tgameOver = true;\n\t\t}\n\t\treturn gameOver;\n\t}", "@Override\n\tpublic boolean isIsSingleMatch() {\n\t\treturn _esfTournament.isIsSingleMatch();\n\t}", "public Player getLoser() {\n\t\treturn getLeader() == player1 ? player2 : player1;\n\t}", "public boolean equals(Object o){\n Game comparedGame = (Game) o;\n\n //Comparing current player names\n if (!comparedGame.getCurrentPlayer().equals(this.getCurrentPlayer())) return false;\n\n //Comparing queued player order\n for (int i = 0; i<this.getPlayersList().size(); i++){\n if (!this.getPlayersList().get(i).equals(comparedGame.getPlayersList().get(i))) return false;\n }\n\n //Comparing all territories\n for(int i = 0; i<this.getGenericWorldMap().getAllTerritories().size(); i++){\n if (!this.getGenericWorldMap().getAllTerritories().get(i).equals(comparedGame.getGenericWorldMap().getAllTerritories().get(i)))return false;\n }\n\n return true;\n }", "@Override\n public boolean equals(Object o) {\n if (o instanceof GameLobby) {\n GameLobby other = (GameLobby) o;\n return this.getGameID() == other.getGameID();\n } else {\n return false;\n }\n }", "private int otherPlayer() {\n return (currentPlayer == 1 ? 2 : 1);\n }", "private boolean isWinner(byte player) {\n for (int row = 0; row <= 2; row++) {\n if (board[row][0] == player && board[row][1] == player && board[row][2] == player) {\n return true;\n }\n }\n for (int column = 0; column <= 2; column++) {\n if (board[0][column] == player && board[1][column] == player && board[2][column] == player) {\n return true;\n }\n }\n if (board[0][0] == player && board[1][1] == player && board[2][2] == player) {\n return true;\n } else if (board[0][2] == player && board[1][1] == player && board[2][0] == player) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n public boolean equals(Object object) {\n if (this == object) return true;\n if (!(object instanceof Player)) return false;\n Player player = (Player) object;\n return getId().equals(player.getId()) &&\n username.equals(player.username);\n }", "public boolean getPair()\n {\n return die1.getFacevalue() == die2.getFacevalue();\n }", "public boolean isEqual(MatchingCardsTile other){\n return this.getNumber() == other.getNumber();\n }", "@Override\n public boolean equals(Object otherPlayer) {\n return otherPlayer != null && mName.contentEquals(((Player)otherPlayer).mName);\n }", "public boolean topPlayerWon() {\n return winner == 2;\n }", "@Test\n\tpublic void test_equals2() {\n\tTennisPlayer c1 = new TennisPlayer(11,\"Joe Tsonga\");\n\tTennisPlayer c2 = new TennisPlayer(521,\"Joe Tsonga\");\n\tassertFalse(c1.equals(c2));\n }", "@Override\n public boolean hasWonGame( int team ) {\n boolean canReach = false;\n if(team == 1){\n for(Dot sDot:board.getStartNodes1()){\n for(Dot eDot:board.getEndNodes1()){\n if(canReachDFS(sDot,eDot)){\n canReach = true;\n }\n }\n }\n }\n else if(team ==2){\n for(Dot sDot:board.getStartNodes2()){\n for(Dot eDot:board.getEndNodes2()){\n if(canReachDFS(sDot,eDot)){\n canReach = true;\n }\n }\n }\n }\n return canReach;\n }", "public SoccerTeam getTeamTwo() {\n return teamTwo;\n }", "Match getTeam1LooserOfMatch();", "@Override\r\n\tprotected boolean prerequisites() {\n\t\treturn _player1.getClient().getPlayer().getWrappedObject().getPosition()\r\n\t\t\t\t.equals(_player2.getClient().getPlayer().getWrappedObject().getPosition());\r\n\t}", "public static boolean getIsPlayersTurn()\r\n {\r\n return isPlayersTurn;\r\n }", "@Test\n public final void testPlayer1Win() {\n checkPlayerWin(player1);\n }", "default boolean isOpponent(Player player, UUID playerToCheckId) {\n return !player.getId().equals(playerToCheckId);\n }", "public boolean isWinnerMe() {\n if (gameStatus == null || userId == null) return false;\n return userId.equals(gameStatus.getWinner())\n || (getMyPlayerNumber() == 1 && getPlayerTwoPoints() == 0)\n || (getMyPlayerNumber() == 2 && getPlayerOnePoints() == 0)\n || getMyPlayerNumber() == 1 && getPlayerOnePoints() > getPlayerTwoPoints()\n || getMyPlayerNumber() == 2 && getPlayerOnePoints() < getPlayerTwoPoints();\n }", "public Result getResultOfSecondPlayer() {\r\n\t\treturn this.resultOfFirstPlayer.getOpposite();\r\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tMove other = (Move)obj;\n\t\treturn (other.game==game) && (other.player==player) && (other.conseq==conseq);\n\t}", "public boolean amIWinning(){\n if (playerScore > oppoScore) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\t//check if object is null\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\t//check if object is from difference class\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\t//check if name is different\n\t\tSport other = (Sport) obj;\n\t\tif (sport != other.sport)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean hasHeWon(int player) {\n if ((board[0][0] == board[1][1] && board[0][0] == board[2][2] && board[0][0] == player) ||\n (board[0][2] == board[1][1] && board[0][2] == board[2][0] && board[0][2] == player)) {\n return true;\n }\n for (int i = 0; i < 3; i++) {\n // check for row i\n if (board[i][0] == board[i][1] && board[i][0] == board[i][2] && board[i][0] == player) {\n return true;\n } else\n // check for column i\n if (board[0][i] == board[1][i] && board[0][i] == board[2][i] && board[0][i] == player) {\n return true;\n }\n }\n return false;\n }", "@Override\n public boolean equals(@Nullable final Object obj) {\n return obj instanceof Player && pseudo.equals(((Player) obj).pseudo);\n }", "private boolean teamExist(String teamName) {\n boolean doesExist = false;\n for (Team team : scoreboard.getTeams()) if (team.getName().equals(teamName)) doesExist = true;\n return doesExist;\n }", "public static boolean winRound(Player p1, Player p2) {\n if (p1.getCard().getCardValue() == 6 && \n p2.getCard().getCardValue() == 14) {\n return true;\n } else if (p1.getCard().getCardValue() == 14 && \n p2.getCard().getCardValue() == 6) {\n return false;\n }\n return (p1.getCard().getCardValue() > p2.getCard().getCardValue());\n }", "public static boolean goDoubleTeam(Team team) {\r\n\t\tint highest = -100;\r\n\t\tboolean allowed = false;\r\n\t\t\r\n\t\t//Find the highest score.\r\n\t\tif (Utils.stringToInt(Main.teamOne.score) > highest) \r\n\t\t\thighest = Utils.stringToInt(Main.teamOne.score);\r\n\t\tif (Utils.stringToInt(Main.teamTwo.score) > highest) \r\n\t\t\thighest = Utils.stringToInt(Main.teamTwo.score);\r\n\t\t\r\n\t\t//Compare highest with team to see if difference exceeds 200.\r\n\t\tif (Utils.stringToInt(team.score) + 200 <= highest)\r\n\t\t\tallowed = true;\r\n\t\r\n\t\treturn allowed;\r\n\t}", "@Override\n public int compareTo(Team other) {\n if(equals(other)) {\n return 0;\n } \n int coachNameCmp = this.teamName.compareTo(other.teamName);\n if (coachNameCmp == 0) {\n return this.coachName.compareTo(other.coachName);\n }\n \n return coachNameCmp;\n }", "public SoccerTeam getWinner() {\n SoccerTeam winner = null;\n\n if (this.scoreOne > this.scoreTwo) {\n winner = this.teamOne;\n }\n else if (this.scoreOne < this.scoreTwo) {\n winner = this.teamTwo;\n }\n\n return winner;\n }", "public SoccerTeam getTeamOne() {\n return teamOne;\n }", "public boolean getPlayer2Comp() {\n\n return player2comp;\n }", "private boolean playerWin(Board board)\n {\n return check(board, PLAYER);\n }", "public boolean isPlayerWinner(int player)\n {\n return players[player] == 100;\n }", "public Integer getIDByOpponents(Player player1, Player player2){\n synchronized (games) {\n for (Integer id: games.keySet()){\n CheckersGame game = games.get(id);\n if (game.hasPlayer(player1) && game.hasPlayer(player2) && !game.isGameOver()) {\n return id;\n }\n }\n return null;\n }\n }", "private boolean testIfGameIsValid(ChesspairingGame game) {\n\t\tChesspairingPlayer playerA = game.getWhitePlayer();\n\t\tString keyA = playerA.getPlayerKey();\n\t\tChesspairingPlayer playerB = game.getBlackPlayer();\n\t\tString keyB = playerB.getPlayerKey();\n\t\tif (keyA.equals(keyB)) {\n\t\t\tthrow new IllegalStateException(\"You shuld never try to pare a players agains himself\");\n\t\t}\n\t\t/**\n\t\t * two players shall not meet more than once\n\t\t */\n\t\tList<String> partnersA = partnerHistory.get(keyA);\n\t\tif (partnersA.contains(keyB)) {\n\t\t\treturn false;\n\t\t}\n\t\tList<String> partnersB = partnerHistory.get(keyB);\n\t\tif (partnersB.contains(keyA)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * the color difference is the number of games played with white minus\n\t\t * the number of games played with black\n\t\t * \n\t\t * -2 < diff < 2\n\t\t */\n\t\tint aHistoryColor = getColorDifference(keyA);\n\t\tint bHistoryColor = getColorDifference(keyB);\n\n\t\t// if a is white\n\t\tint aWhite = aHistoryColor + 1;\n\t\tint bBlach = bHistoryColor - 1;\n\t\tboolean aPlaysWite = false;\n\t\tif ((-2 < aWhite) && (aWhite < 2) && (-2 < bBlach) && (bBlach < 2)) {\n\t\t\taPlaysWite = true;\n\t\t}\n\n\t\t// if a is black\n\t\tboolean aPlaysBlack = false;\n\t\tif (!aPlaysWite) {\n\t\t\tint aBlack = aHistoryColor - 1;\n\t\t\tint bWhite = bHistoryColor + 1;\n\t\t\tif ((-2 < aBlack) && (aBlack < 2) && (-2 < bWhite) && (bWhite < 2)) {\n\t\t\t\taPlaysBlack = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!aPlaysWite && !aPlaysBlack) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// basic tests have passed. time to return true\n\t\treturn true;\n\t}", "public boolean transferTo(Team team) {\n\t\t//TODO\n\t\t// input check\n\t\tif (team == null || (team != null && team.equals(currentTeam)))\n\t\t\treturn false;\n\n\t\t// if the team exists in the teams array, we remove it \n\t\tif (teams.contains(team))\n\t\t\tteams.remove(team);\n\t\t\n\t\t// adding coach to new team and transferring old team to teams' Set\n\t\tif (addTeam(currentTeam) && team.registerCoach(this)) {\n\t\t\tcurrentTeam.setCoach(null);\n\t\t\tcurrentTeam = team;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "@java.lang.Override\n public boolean hasOpponent() {\n return opponent_ != null;\n }", "int otherPlayer(int player) {\n switch (player) {\n case 0: return 1;\n case 1: return 0;\n default: return 0;\n }\n }", "@Test\n public void testGetOtherPlayer2Player() {\n Player p = new Player();\n Player p2 = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n pL.add(p2);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n\n Player l = j.getOtherPlayer(p);\n\n assertEquals(\"Le player ne devrai pas etre le même que celui mis dans la fonction\", p2, l);\n }", "public boolean check2DDimWinner(Cell play) {\n\t\tfor(int row = 0; row < board.length; row++) {// for row\n\t\t\tfor(int col = 0; col < board.length; col++) {// for col\n\t\t\t\tif(board[0][row][col] == board[1][row][col] && board[1][row][col]==board[2][row][col] && board[2][row][col]==board[3][row][col] && board[3][row][col].equals(play)) \n\t\t\t\t{\n\t\t\t\t\t//\t\t\t\t\tSystem.out.println(\"Dimensional win by \"+play.toString()+ \" at row=\" + row +\" & col= \" + col);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public int against(String team1, String team2) {\n return games[getTeamByName(team1).order][getTeamByName(team2).order];\r\n }", "public int against(String team1, String team2) {\n validateTeam(team1);\n validateTeam(team2);\n return gamesLeft[teamsMap.get(team1)][teamsMap.get(team2)];\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Player player = (Player) o;\n return id == player.id &&\n color == player.color;\n }", "public boolean equals(Player player){\n\t\treturn this.jid.equals(player.getJid());\n\t}", "@Override\n public boolean isWin() {\n for (Observer winner : winners) {\n if (winner.getName().equals(chosenHorse.getName())) {\n return true;\n }\n }\n return false;\n }", "public Player getOtherPlayer() {\n if (getCurrentPlayer().getNumber() == 1) {\n return joueur2;\n } else {\n return joueur1;\n }\n }", "public boolean isWinner(Coordinates guess, String playerSymbol){\n //idea for antidiag win test from\n // https://stackoverflow.com/questions/1056316/algorithm-for-determining-tic-tac-toe-game-over\n for (int i = 0; i < 3; i++) {\n if (board[guess.getRow()][i].getSymbol() != playerSymbol) {\n break;\n }\n if (i == 3 - 1) {\n return true;\n }\n }\n\n for (int j = 0; j < 3; j++) {\n if (board[j][guess.getColumn()].getSymbol() != playerSymbol) {\n break;\n }\n if (j==3-1) {\n return true;\n }\n }\n\n if (guess.getColumn()==guess.getRow()){\n for(int k = 0; k < 3; k++){\n if(board[k][k].getSymbol() != playerSymbol)\n break;\n if(k == 3-1){\n return true;\n }\n }\n }\n\n if (guess.getColumn()+guess.getRow()==3-1){\n for (int l = 0; l < 3; l++) {\n if(board[l][3-1-l].getSymbol()!= playerSymbol){\n break;\n }\n if (l==3-1){\n return true;\n }\n }\n }\n\n return false;\n }", "public Match findMatchFromTeamName(String name1, String name2){\r\n Iterator<Match> itr = this.resultsTree.iterator();\r\n Match m;\r\n while (itr.hasNext()) {\r\n m = itr.next();\r\n if (m.getTeam1().getName().equals(name1) \r\n && m.getTeam2().getName().equals(name2)){\r\n return m;\r\n }\r\n }\r\n return null;\r\n }", "public Player checkWin ()\n {\n //checks rows\n for (int row = 0; row < 3; row++)\n if (getGridElement(row, 0).getPlayer() == getGridElement(row, 1).getPlayer() &&\n getGridElement(row, 1).getPlayer() == getGridElement(row, 2).getPlayer() &&\n getGridElement(row, 0).getPlayer() != Player.NONE)\n return getGridElement(row, 0).getPlayer();\n\n //checks columns\n for (int column = 0; column < 3; column++)\n if (getGridElement(0, column).getPlayer() == getGridElement(1, column).getPlayer() &&\n getGridElement(1, column).getPlayer() == getGridElement(2, column).getPlayer() &&\n getGridElement(0, column).getPlayer() != Player.NONE)\n return getGridElement(0, column).getPlayer();\n\n //checks diagonals\n if (getGridElement(0, 0).getPlayer() == getGridElement(1, 1).getPlayer() &&\n getGridElement(1, 1).getPlayer() == getGridElement(2, 2).getPlayer() &&\n getGridElement(0, 0).getPlayer() != Player.NONE)\n return getGridElement(0, 0).getPlayer();\n if (getGridElement(2, 0).getPlayer() == getGridElement(1, 1).getPlayer() &&\n getGridElement(1, 1).getPlayer() == getGridElement(0, 2).getPlayer() &&\n getGridElement(0, 0).getPlayer() != Player.NONE)\n return getGridElement(2, 0).getPlayer();\n\n return Player.NONE;\n }", "public long getWinner() {\n long winner = member_1_id;\n if (getMember2Score() > getMember1Score()) {\n winner = member_2_id;\n }\n return winner;\n }", "private boolean winner(int player) {\r\n\t\treturn (board[0][0] == player && board[0][1] == player && board[0][2] == player)\r\n\t\t\t\t|| (board[1][0] == player && board[1][1] == player && board[1][2] == player)\r\n\t\t\t\t|| (board[2][0] == player && board[2][1] == player && board[2][2] == player)\r\n\t\t\t\t|| (board[0][0] == player && board[1][0] == player && board[2][0] == player)\r\n\t\t\t\t|| (board[0][1] == player && board[1][1] == player && board[2][1] == player)\r\n\t\t\t\t|| (board[0][2] == player && board[1][2] == player && board[2][2] == player)\r\n\t\t\t\t|| (board[0][0] == player && board[1][1] == player && board[2][2] == player)\r\n\t\t\t\t|| (board[0][2] == player && board[1][1] == player && board[2][0] == player);\r\n\t}", "public boolean isTwoPair() {\n int numbersSame = 0;\n int pairs = 0;\n for (int i = 0; i < dice.length && numbersSame < 3; i++) {\n numbersSame = 0;\n for (int x = 0; x < dice.length; x++) {\n if (dice[i].getFaceValue() == dice[x].getFaceValue()) {\n numbersSame++;\n }\n }\n if (numbersSame == 2) {\n pairs++;\n }\n }\n return (pairs == 4);\n }", "@Test\n public void equals2() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 1);\n SmartPlayer y = new SmartPlayer(0, 2);\n assertFalse(x.equals(y));\n }", "public boolean hasTeam() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "boolean isPlayerTurn();", "public boolean checkEquality(){\n boolean flag = true;\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(this.currentBoardState[i][j] != this.goalBoardState[i][j]){\n flag = false;\n }\n }\n }\n return flag;\n }", "public boolean isSwitchingPlayerOneTime()\n {\n boolean change = changePlayerOneTime != null;\n changePlayerOneTime = null;\n return change;\n }" ]
[ "0.7272877", "0.6665779", "0.65363246", "0.6449471", "0.63878196", "0.6292455", "0.62776214", "0.62712353", "0.6259556", "0.6250007", "0.6225547", "0.62209815", "0.613574", "0.6097381", "0.6091866", "0.6066729", "0.6060349", "0.60588676", "0.60261464", "0.5957731", "0.5933836", "0.59176564", "0.58975524", "0.589748", "0.589183", "0.5863788", "0.5837634", "0.5817883", "0.5810477", "0.5794874", "0.57882863", "0.5787617", "0.5775574", "0.5769656", "0.5751641", "0.5724132", "0.57227683", "0.57223076", "0.5706663", "0.5701398", "0.5696203", "0.5692556", "0.56912494", "0.56906146", "0.5689254", "0.56792706", "0.5678251", "0.5678177", "0.56732535", "0.5672147", "0.5654625", "0.56469464", "0.56465", "0.56389594", "0.56348664", "0.5624092", "0.56171274", "0.5600846", "0.5599858", "0.5599723", "0.559341", "0.5587886", "0.5582173", "0.5581805", "0.55812335", "0.5567732", "0.55671674", "0.5559117", "0.5559101", "0.55534875", "0.555225", "0.5551907", "0.55509895", "0.55401343", "0.5535266", "0.5533448", "0.5518952", "0.5518053", "0.55146056", "0.55111164", "0.5509423", "0.550375", "0.55031204", "0.55002016", "0.5487339", "0.5484718", "0.5482792", "0.5482552", "0.54789424", "0.5472299", "0.5467436", "0.5460068", "0.54594487", "0.5455862", "0.54545885", "0.545351", "0.5452541", "0.5452106", "0.54503083", "0.5447269" ]
0.763584
0
Gets whether two names are on the same team
public boolean areOnSameTeam(UUID s1, UUID s2) { Team team = plugin.getTeamManager().getPlayerTeam(s1); Team warpeeTeam = plugin.getTeamManager().getPlayerTeam(s2); if (team == null || warpeeTeam == null) { return false; } if (team != warpeeTeam) return false; if (team == warpeeTeam) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean areOnSameTeam(Player p1, Player p2) {\n\t\treturn areOnSameTeam(p1.getUniqueId(), p2.getUniqueId());\n\n\t}", "boolean hasSameAs();", "boolean hasTeam();", "private boolean teamExist(String teamName) {\n boolean doesExist = false;\n for (Team team : scoreboard.getTeams()) if (team.getName().equals(teamName)) doesExist = true;\n return doesExist;\n }", "private boolean sameTeamCheck(char state)\r\n {\r\n if((state == 'b' && isHuman) || (state == 'p' && !isHuman))\r\n return true;\r\n return false;\r\n }", "@Override\n\tpublic boolean isIsTeamMatch() {\n\t\treturn _esfTournament.isIsTeamMatch();\n\t}", "public boolean areSameSport(StudentAthlete other){\n return this.sport.equalsIgnoreCase(other.sport);\n }", "public static boolean namesEqual(String name1, String name2) {\n if (StringUtil.isEmpty(name1) && StringUtil.isEmpty(name2)) {\n return true;\n }\n if (normalizer.isDelimited(defaultRule, name1)) {\n if (!Objects.equals(name1, name2)) {\n return false;\n }\n } else {\n if (!StringUtil.equalsIgnoreCase(name1, name2)) {\n return false;\n }\n }\n return true;\n }", "private boolean inSameSuit() {\n for (int i = 0; i < cards.length-2; i++) {\n if (cards[i].charAt(1) != cards[i + 1].charAt(1)) {\n return false;\n }\n }\n \n return true;\n }", "public boolean equalsName(String otherName) {\n return name.equals(otherName);\n }", "boolean sameName(String a, String b){\n\t\tif(a.length()!=b.length()){\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tfor(int i=0;i<a.length();i++){\r\n\t\t\tif(a.charAt(i)!=b.charAt(i)){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public Match findMatchFromTeamName(String name1, String name2){\r\n Iterator<Match> itr = this.resultsTree.iterator();\r\n Match m;\r\n while (itr.hasNext()) {\r\n m = itr.next();\r\n if (m.getTeam1().getName().equals(name1) \r\n && m.getTeam2().getName().equals(name2)){\r\n return m;\r\n }\r\n }\r\n return null;\r\n }", "default public boolean isTeamLeader() {\n return equals(team().leader());\n }", "@Override\n public int compareTo(Team other) {\n if(equals(other)) {\n return 0;\n } \n int coachNameCmp = this.teamName.compareTo(other.teamName);\n if (coachNameCmp == 0) {\n return this.coachName.compareTo(other.coachName);\n }\n \n return coachNameCmp;\n }", "public boolean isNameEquals(String name) {\n\n return (_name.equalsIgnoreCase(name));//Checks not case sensitive\n }", "public boolean isSameAccount(BankAccount account1, BankAccount account2){\n return account1.accountName == account2.accountName;\n }", "public static boolean fullNamesEqual(String name1, String name2) {\n if (StringUtil.isEmpty(name1) && StringUtil.isEmpty(name2)) {\n return true;\n }\n // Split multi-part names into individual components and compare\n // each component. If delimited, do case compare.\n String[] names1 = normalizer.splitName(defaultRule, name1);\n String[] names2 = normalizer.splitName(defaultRule, name2);\n if (names1.length != names2.length) {\n return false;\n }\n for (int i = 0; i < names1.length; i++) {\n if (normalizer.isDelimited(defaultRule, names1[i])) {\n if (!Objects.equals(names1[i],names2[i])) {\n return false;\n }\n } else {\n if (!StringUtil.equalsIgnoreCase(names1[i],names2[i])) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean betterEquals(Object obj)\n\t{\n\t\tif (obj instanceof Player)\n\t\t{\n\t\t\tPlayer other = (Player) obj;\n\t\t\treturn this.name.equals(other.name) && this.pawn == other.pawn;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isSetTeamName() {\n return this.teamName != null;\n }", "private boolean isEqual(Roster r2)\n\t{\n\t\tIterator<Player> it1 = iterator();\n\t\twhile(it1.hasNext())\n\t\t{\n\t\t\tPlayer p = it1.next();\n\t\t\tif(!r2.has(p))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tIterator<Player> it2 = r2.iterator();\n\t\twhile(it2.hasNext())\n\t\t{\n\t\t\tPlayer p = it2.next();\n\t\t\tif(!has(p))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean getIsTeamMatch() {\n\t\treturn _esfTournament.getIsTeamMatch();\n\t}", "@Override\n\tpublic int compareTo(Team other) {\n\t\treturn this.getmTeamName().compareTo(other.getmTeamName());\n\t}", "public boolean hasTeam(User std) {\r\n\t\tboolean hasTeam = false;\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.students WHERE id = \" + std.getID() + \" ;\");\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint teamId \t= Integer.parseInt(array.get(3));\r\n\t\t\t\r\n\t\t\tif(teamId != 0){\r\n\t\t\t\thasTeam = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn hasTeam;\r\n\t}", "public String getTeamName() {\r\n return teamName;\r\n }", "private boolean multipleTeams(SettingsClass s){\r\n int a =s.getPlayerColor(0);\r\n for(int i=0;i<s.getNumPlayers();i++){\r\n if(a!=s.getPlayerColor(i)){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean equalsName(String otherCode) {\n return CODE.equals(otherCode);\n }", "private boolean checkMatch(String first, String second, String third)\n {\n // First makes sure the given inputs aren't empty\n if (!first.isEmpty())\n {\n // Set the winner to be the current player\n return first.equals(second) && first.equals(third);\n }\n /*\n * If one or more of them are empty, set he current winner to -1 and\n * return false\n */\n return false;\n }", "public final static boolean checkNames(String playerOneName, String playerTwoName)\n\t{\n\t\tif(playerOneName.length()>15||playerOneName.length()<2||playerTwoName.length()<2||playerTwoName.length()>15) return false;\n\t\tif(!playerOneName.matches(\"[a-zA-Z]+\")||!playerTwoName.matches(\"[a-zA-Z]+\")) return false;\n\t\tif(playerOneName.substring(0,1).equals(playerTwoName.substring(0,1))) return false;\n\t\treturn true;\n\t}", "public boolean findTeam(String teamName) throws SQLException {\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:sqlite:users\");\n\t\tStatement stmt = conn.createStatement();\n\t\tString SQL = \"select * from leaguestandings where TeamName = '\" + teamName + \"';\";\n\n\t\tResultSet rset = stmt.executeQuery(SQL);\n\n\t\tif (rset.next()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\t//check if object is null\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\t//check if object is from difference class\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\t//check if name is different\n\t\tSport other = (Sport) obj;\n\t\tif (sport != other.sport)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean teamExist(Team t) {\n return getTeam(t.getName()) != null;\n }", "private boolean exist(List<PlayerTeam> l, String name) {\n boolean ex = false;\n PlayerTeam curr = l.first();\n while (curr != null) {\n if (curr.getName().equals(name))\n return true;\n curr = l.next();\n }\n return ex;\n }", "@Override\n public boolean isSame(Bike other) {\n if (other == this) {\n return true;\n }\n\n return other != null\n && other.getName().equals(this.getName());\n }", "public boolean is(String fName, String lName)\n {\n return firstName.equals(fName) && lastName.equals(lName);\n }", "public String getTeamName() {\n\t\treturn teamName;\n\t}", "public String getTeamName() {\n\t\treturn teamName;\n\t}", "public boolean isSameWorkout(Workout otherWorkout) {\n if (otherWorkout == this) {\n return true;\n }\n\n return otherWorkout != null\n && otherWorkout.getWorkoutName().equals(getWorkoutName());\n }", "@Override\n\tpublic int compareTo(Team team) {\n\n\t\tif (this.numOfPlayer == team.numOfPlayer) {\n\t\t\tSystem.out.println(\"Both teams have same number of players\");\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "String getWonTeam() {\r\n return this.teamName;\r\n }", "public boolean equals(Person otherPerson) {\n return this.name.equals(otherPerson.name);\n }", "public boolean doWeHaveSameStops(String corridorA, String corridorB);", "boolean sameArtist(Artist that) {\r\n\t\treturn this.name.equals(that.name); \r\n\t\t// && this.painting.samePainting(that.painting);\r\n\t}", "public String winningTeam(String team1, String team2)\n {\n int r = new Random().nextInt(3 + 1);\n\n int team1Standing = -10;\n int team2Standing = -10;\n for (int i = 0 ; i < playoffs.length; i++)\n {\n if (playoffs[i].equals(team1))\n {\n team1Standing = i;\n break;\n }\n }\n\n for (int i = 0 ; i < playoffs.length; i++)\n {\n if (playoffs[i].equals(team2))\n {\n team2Standing = i;\n break;\n }\n }\n\n if(team1Standing < team2Standing && r == 1)\n return team1;\n else if (team1Standing > team2Standing && r == 1)\n return team2;\n\n else\n {\n r = new Random().nextInt(1 + 1);\n if(r == 0)\n return team1;\n else\n return team2;\n }\n\n }", "@Override\n public boolean equals(Object person) {\n if(!(person instanceof Person)){\n // If the argument is not a person object return false\n return false;\n }\n // Create person object\n Person btPerson = (Person) person;\n\n // Check equality\n boolean status = (this.getName().equals(btPerson.getName()) &&\n this.getCrossingTime() == btPerson.getCrossingTime());\n return status;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TeamDTO)) {\n return false;\n }\n TeamDTO other = (TeamDTO) object;\n if ((this.teamID == null && other.teamID != null) || (this.teamID != null && !this.teamID.equals(other.teamID))) {\n return false;\n }\n return true;\n }", "public boolean winOfJuggernaut(){\n\tString [] names=getJoueurs();\n\tfor(int i=0; i<players.size(); i++){\n\t if(i!=juggernaut && players.get(names[i])) return false;\n\t}\n\treturn true;\n }", "public boolean match(String name) {\n\t\t\treturn (this.equals(directions.get(name.toUpperCase())));\n\t\t}", "@Override\n\tpublic boolean equals(Object target) {\n\t\treturn name.equals(((Person)target).getName());\n\t}", "private boolean hasNomeRepetido(String[] listaNomes) {\n for (int i = 0; i < listaNomes.length; i++) {\n for (int j = 0; j < listaNomes.length; j++) {\n if ((i != j) && (listaNomes[i].equals(listaNomes[j]))) {\n return true;\n }\n }\n }\n\n return false;\n }", "@Override\n public boolean isLocalPlayersTurn() {\n return getTeam().equals(currentBoard.turn());\n }", "@Override\n public boolean equals(Object otherPlayer) {\n return otherPlayer != null && mName.contentEquals(((Player)otherPlayer).mName);\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n if (!(other instanceof Workout)) {\n return false;\n }\n\n Workout otherWorkout = (Workout) other;\n return otherWorkout.getWorkoutName().equals(getWorkoutName())\n && otherWorkout.getWorkoutExercises().equals(getWorkoutExercises());\n }", "@Test\n public void equals_returnsTrueIfNameIsTheSame_false() {\n Animal firstAnimal = new Animal(\"Deer\");\n Animal anotherAnimal = new Animal(\"Deer\");\n assertTrue(firstAnimal.equals(anotherAnimal));\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj == null) \n\t\t\treturn false;\n\t\t\n\t\tif (!(obj instanceof Player))\n\t\t\treturn false;\n\t\t\n\t\tPlayer other = (Player) obj;\n\t\t\n\t\treturn this.getName().equals(other.getName());\n\t}", "private static boolean diffOne(String s1, String s2) {\n int count = 0;\n for (int i = 0; i < s1.length(); i++) {\n if (s1.charAt(i) != s2.charAt(i)) count++;\n if (count > 1) return false;\n }\n return count == 1;\n }", "public boolean checkSam(String stringA, String stringB) {\r\n\t\tString[] s1 = stringA.split(\" \");\r\n\t\tString[] s2 = stringB.split(\" \");\r\n\t\tif(s1.length == s2.length){\r\n\t\t\tint count = 0;\r\n\t\t\tfor (String sB : s2) {\r\n\t\t\t\tfor (String sA : s1) {\r\n\t\t\t\t\tif(sA.equals(sB)){\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(count == s2.length){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n }", "@Override\n\tpublic boolean isIsSingleMatch() {\n\t\treturn _esfTournament.isIsSingleMatch();\n\t}", "static Boolean isOneAway(String s1, String s2) {\r\n\t\tboolean results = false;\r\n\t\tchar[] chars1 = s1.toCharArray();\r\n\t\tchar[] chars2 = s2.toCharArray();\r\n\t\tif(s1.equals(s2)) {\r\n\t\t\tresults = true;\r\n\t\t}else if(chars1.length==chars2.length) {\r\n\t\t\tint mismatches = 0;\r\n\t\t\tfor(int i = 0; i < chars1.length; i++ ) {\r\n\t\t\t\tif(chars1[i]!=chars2[i]) {\r\n\t\t\t\t\tmismatches++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(mismatches <= 1) results = true;\r\n\t\t}else if(Math.abs(s1.length() - s2.length())==1) {\r\n\t\t\tif(s1.length() > s2.length()) {\r\n\t\t\t\tchars1 = s1.toCharArray();\r\n\t\t\t\tchars2 = s2.toCharArray();\r\n\t\t\t}else {\r\n\t\t\t\tchars1 = s2.toCharArray();\r\n\t\t\t\tchars2 = s1.toCharArray();\r\n\t\t\t}\r\n\t\t\tint mismatches = 0;\r\n\t\t\tint cursor1 = 0;\r\n\t\t\tint cursor2 = 0;\r\n\t\t\twhile((cursor1 < chars1.length) && (cursor2 < chars2.length)) {\r\n\t\t\t\tif(chars1[cursor1] != chars2[cursor2]) {\r\n\t\t\t\t\tmismatches++;\r\n\t\t\t\t\tcursor1++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tcursor1++;\r\n\t\t\t\t\tcursor2++;\r\n\t\t\t\t}\t\t\t\t \r\n\t\t\t}\r\n\t\t\tif(mismatches <= 1) results = true;\r\n\t\t}else {\r\n\t\t\tresults = false;\r\n\t\t}\r\n\t\r\n\t\treturn results;\r\n\t}", "boolean hasTargetPlayerName();", "static boolean pokemonEq(Pokemon a, Pokemon b) {\r\n if (a == null || b == null) {\r\n System.out.println(\"null error\");\r\n return false;\r\n }\r\n String aStr = a.getName();\r\n String bStr = b.getName();\r\n if (aStr == null || !aStr.equals(bStr)) {\r\n System.out.print(\"name not match: \");\r\n System.out.print(aStr);\r\n System.out.println(bStr);\r\n return false;\r\n }\r\n aStr = a.getType1();\r\n bStr = b.getType1();\r\n if (aStr == null || !aStr.equals(bStr)) {\r\n System.out.print(\"type1 not match: \");\r\n System.out.print(aStr);\r\n System.out.println(bStr);\r\n return false;\r\n }\r\n aStr = a.getType2();\r\n bStr = b.getType2();\r\n if (aStr == null || !aStr.equals(bStr)) {\r\n System.out.print(\"type2 not match: \");\r\n System.out.print(aStr);\r\n System.out.println(bStr);\r\n return false;\r\n }\r\n if (a.getHp() != b.getHp()) {\r\n System.out.println(\"hp not match\");\r\n return false;\r\n }\r\n if (a.getAttack() != b.getAttack()) {\r\n System.out.println(\"attack not match\");\r\n return false;\r\n }\r\n if (a.getDefense() != b.getDefense()) {\r\n System.out.println(\"defense not match\");\r\n return false;\r\n }\r\n if (a.getSpAttack() != b.getSpAttack()) {\r\n System.out.println(\"SpAttack not match\");\r\n return false;\r\n }\r\n if (a.getSpDefense() != b.getSpDefense()) {\r\n System.out.println(\"SpDefense not match\");\r\n return false;\r\n }\r\n if (a.getSpeed() != b.getSpeed()) {\r\n System.out.println(\"speed not match\");\r\n return false;\r\n }\r\n if (a.isLegendary() != b.isLegendary()) {\r\n System.out.println(\"legendary not match\");\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean winner(){\n\t\treturn goals1 > goals2;\n\t}", "private static boolean letterDifferByOne(String word1, String word2) {\n if (word1.length() != word2.length()) {\n return false;\n }\n\n int differenceCount = 0;\n for (int i = 0; i < word1.length(); i++) {\n if (word1.charAt(i) != word2.charAt(i)) {\n differenceCount++;\n }\n }\n return (differenceCount == 1);\n }", "public static boolean equalName(Enum<?> source, Enum<?> target) {\n if (source == null && target == null) {\n return true;\n } else if (source == null || target == null) {\n return false;\n }\n return StringUtils.equals(source.name(), target.name());\n }", "public boolean equals(Actor a){\n return (x == a.getX() && y == a.getY() && pok.getName().equalsIgnoreCase(a.getPokemon().getName()));\n }", "private boolean isNameUnique(String name) {\n boolean isUnique = true;\n for (User user : this.users) {\n if (user.getName().equals(name)) {\n isUnique = false;\n break;\n }\n }\n return isUnique;\n }", "public boolean usernameMatches(Account a) {\n return usernameMatches(a.getCredential());\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\n\t\t\n\n\t\tEmployee employee = (Employee) obj;\n\n\t\treturn (this.city.equalsIgnoreCase(employee.city) && this.name.equalsIgnoreCase(employee.name));\n\t\t\n\t}", "public static void checkNamesAreAllDiferent(HoldemPlayerDecider players[], HoldemServerMiddleMan middleMan) {\n\t\tfor(int i=0; i<players.length; i++) {\n\t\t\tfor(int j=i+1; j<players.length; j++) {\n\t\t\t\tif( (players[i].getName()).equals( players[j].getName() ) ) {\n\t\t\t\t\tmiddleMan.sendMessageToGroup(\"ERROR: 2 of the player names are the same!\");\n\t\t\t\t\tmiddleMan.sendMessageToGroup(players[i].getName());\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean equals (Object o){\n if (o == this) {\n return true;\n }\n if (!(o instanceof Player)) {\n return false;\n }\n Player other = (Player) o;\n return this.name == other.name;\n }", "public void setTeamName(String name) {\n\t\tteamName = name;\n\t}", "private boolean equals(String str1, String str2)\n\t{\n\t\tif (str1.length() != str2.length()) // Easiest to check is if they are the same to potentially avoid running remaining code\n\t\t\treturn false;\n\t\tfor(int i = 0; i < str1.length(); i++)\n\t\t{\n\t\t\tif (str1.charAt(i) != str2.charAt(i)) // If at any point one char is not equal to the same char at a given index then they are disimilar\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true; // If no discrepancies are found then the strings must be equal\n\t}", "public boolean isEqual(Object objectname1, Object objectname2, Class<?> voClass) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean equals(Object o) {\n\t\tboolean res= false;\r\n\t\t\r\n\t\tif (o instanceof Member) {\r\n\t\t\tMember other = (Member) o;\t\t\t\t\t\r\n\t\t\tres= _name.equals(other._name);\t\r\n\t\t}\t\t\r\n\t\treturn res;\r\n\t}", "@Override\n\tpublic boolean isIsIndividualMatch() {\n\t\treturn _esfTournament.isIsIndividualMatch();\n\t}", "public int against(String team1, String team2) {\n validate(team1);\n validate(team2);\n\n int t1 = st.get(team1);\n int t2 = st.get(team2);\n return matTeam[t1][t2 + 4];\n }", "public boolean isPlayer1() {\n\t\treturn currentPlayer.equals(player1);\n\t}", "public boolean isSamePerson(Person otherPerson) {\n if (otherPerson == this) {\n return true;\n }\n\n return otherPerson != null\n && otherPerson.getName().equals(getName())\n && otherPerson.getUsername().equals(getUsername())\n && (otherPerson.getPhone().equals(getPhone()) || otherPerson.getEmail().equals(getEmail()));\n }", "@Test\n void compareTo_PotentialMatch_OnlyNameMatches()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.no, AnswerType.no, AnswerType.no, ContactMatchType.PotentialMatch);\n }", "@Override\r\n public boolean equals(Object o) {\r\n if (this == o) return true;\r\n if (o == null || getClass() != o.getClass()) return false;\r\n\r\n Player player = (Player) o;\r\n\r\n return name.equals(player.getName());\r\n }", "public static Team whoWonGameTeam() {\r\n\t\tint highest = Main.winScoreNumb;\r\n\t\tTeam winner = null;\r\n\t\t\r\n\t\t//Winner is team one.\r\n\t\tif (Utils.stringToInt(Main.team1Score) >= highest) {\r\n\t\t\thighest = Utils.stringToInt(Main.team1Score);\r\n\t\t\twinner = Main.teamOne;\r\n\t\t}\r\n\t\t//Winner is team two.\r\n\t\tif (Utils.stringToInt(Main.team2Score) >= highest) {\r\n\t\t\thighest = Utils.stringToInt(Main.team2Score);\r\n\t\t\twinner = Main.teamTwo;\r\n\t\t}\r\n\t\t\r\n\t\treturn winner;\r\n\t}", "public boolean transferTo(Team team) {\n\t\t//TODO\n\t\t// input check\n\t\tif (team == null || (team != null && team.equals(currentTeam)))\n\t\t\treturn false;\n\n\t\t// if the team exists in the teams array, we remove it \n\t\tif (teams.contains(team))\n\t\t\tteams.remove(team);\n\t\t\n\t\t// adding coach to new team and transferring old team to teams' Set\n\t\tif (addTeam(currentTeam) && team.registerCoach(this)) {\n\t\t\tcurrentTeam.setCoach(null);\n\t\t\tcurrentTeam = team;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public boolean isSame(MoveLabel other) {\n if (other == this) {\n return true;\n }\n return Objects.equals(in, other.in) && Objects.equals(out, other.out);\n }", "boolean isMatch();", "public String getTeamId() {\r\n\t\treturn teamName;\r\n\t}", "@Override\r\n\tpublic boolean equals(Object obj) {\r\n\t\tif( !(obj instanceof Person ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tPerson p2 = (Person) obj;\r\n\t\treturn vorname.equals(p2.vorname) && nachname.equals(p2.nachname);\r\n\t}", "public boolean isAutoTeam() {\n return isPreventCollision() && getBoolean(\"auto-team\", true);\n }", "public static boolean validateFellow(String name){\n\n for(String n : fellows)\n {\n if (n.equals(name))\n return true; \n } \n return false;\n }", "public boolean equivalent(Tradeoff trade)\r\n\t{\r\n\t\tboolean eq = false;\r\n\t\tif ((trade.getOnt1().toString().equals(ont1.toString())) &&\r\n\t\t\t\t(trade.getOnt2().toString().equals(ont2.toString())))\r\n\t\t\teq = true;\r\n\t\telse if ((trade.getOnt1().toString().equals(ont2.toString())) &&\r\n\t\t\t\t(trade.getOnt2().toString().equals(ont1.toString())))\r\n\t\t\teq = true;\r\n\t\treturn eq;\r\n\t}", "public boolean equals(String that);", "public String getTeam() {\n return team;\n }", "public static void oneTeam(String[] name, int[] team)\n {\n int a=0;\n System.out.println(\"The following players played with one team for their entire NHL careers:\");\n for(int i=0;i<team.length;i++)\n { \n if(team[i]==1)\n {\n System.out.println(name[i]);\n }//end of if statement\n }//end of for loop\n }", "public boolean jackpot()\n {\n\treturn (_fruits[0].equals(_fruits[1]) \n\t\t&& _fruits[1].equals(_fruits[2]));\n }", "public boolean equals(User other) {\n return (username.equals(other.username));\n }", "public boolean isIdentical(Remote obj1, Remote obj2)\n {\n\torg.omg.CORBA.Object corbaObj1 = (org.omg.CORBA.Object)obj1;\n\torg.omg.CORBA.Object corbaObj2 = (org.omg.CORBA.Object)obj2;\n\n\treturn corbaObj1._is_equivalent(corbaObj2);\n }", "public boolean equals(Object other)\n {\n if (this == other) return true;\n if (other == null) return false;\n if (getClass() != other.getClass()) return false;\n \n // Arenas must have different names.\n if (other instanceof ArenaStandard && ((ArenaStandard)other).name.equals(name))\n return true;\n \n return false;\n }", "public boolean isSameAccount(LoggedInAccount otherAccount) {\n if (otherAccount == this) {\n return true;\n }\n\n return otherAccount != null\n && (otherAccount.getUsername().fullUsername.toLowerCase()).equals(getUsername().fullUsername\n .toLowerCase());\n }", "@Test\n void compareTo_Match_NameAndAddress()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, null,\n null, ContactMatchType.Match,\n true, true, true);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif(obj instanceof StopDTO)\n\t {\n\t\t\tStopDTO temp = (StopDTO) obj;\n\t if(this.name.equals(temp.name) && this.lat == temp.lat && this.lon == temp.lon)\n\t return true;\n\t }\n\t return false;\n\t}", "boolean hasSendPlayerName();", "public boolean isEliminated(String team) {\n\n return false;\n }" ]
[ "0.6920566", "0.6430983", "0.6381688", "0.6330937", "0.6286805", "0.6199843", "0.6179467", "0.61596143", "0.6144398", "0.6024231", "0.5984302", "0.5977782", "0.5962007", "0.5949137", "0.58938354", "0.5879742", "0.5878825", "0.5791538", "0.5775689", "0.57518876", "0.57420874", "0.5735837", "0.5720765", "0.57134235", "0.5703035", "0.5693459", "0.56635606", "0.5658313", "0.56566113", "0.56293124", "0.5625066", "0.56245506", "0.5603732", "0.558792", "0.55787057", "0.55787057", "0.55643713", "0.5543924", "0.5530389", "0.55289185", "0.5515696", "0.55054563", "0.548871", "0.54847157", "0.54818994", "0.54472697", "0.54387057", "0.5436864", "0.54350054", "0.54277706", "0.5422542", "0.5422403", "0.5421799", "0.5419691", "0.5414257", "0.5412128", "0.5409428", "0.54057914", "0.54021144", "0.53847367", "0.53839475", "0.53830135", "0.53815603", "0.53792304", "0.5372711", "0.5367715", "0.5362775", "0.5360717", "0.535849", "0.53308976", "0.53297335", "0.5321794", "0.53204143", "0.53196496", "0.53102285", "0.5308046", "0.5304635", "0.5298193", "0.5297371", "0.5294398", "0.52931625", "0.52918947", "0.5276093", "0.52693635", "0.52666444", "0.5259711", "0.5255134", "0.5251824", "0.5250405", "0.5249705", "0.5249574", "0.52434564", "0.5237274", "0.5236863", "0.5234755", "0.5233908", "0.52297246", "0.5223186", "0.52173805", "0.52162904" ]
0.72719383
0
Gets if the player should be deathbanned or not in the End.
public boolean shouldDeathban(Player player) { PlayerInventory pi = player.getInventory(); try { for (Method m : ARMOR_METHODS) { ItemStack item = (ItemStack) m.invoke(pi); if (item == null) { return true; } String name = item.getType().name(); if (!(name.contains("IRON_") || name.contains("DIAMOND_"))) { return true; } } } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { e.printStackTrace(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDeath() {\n return death;\n }", "public boolean checkDeath() {\r\n\t\tif (death) {\r\n\t\t\tdeath = false;\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static boolean isDead(Entity e) {\r\n return e.getAttribute(\"state:death\", false);\r\n }", "public static boolean characterDeathCheck(){\n if (MainCharacter.hpNow <= 0){\n return true;\n }\n return false;\n }", "public void checkDeath()\n {\n if (player.getY() >= 549)\n {\n gameOver();\n }\n }", "public boolean isDeadByChance() {\n\t\tdouble deathChance = 0.0001 * this.age * this.sicknessLevel;\n\t\tif (deathChance < 0.5) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean isEndGameDelay() {\n\t\treturn endGameDelay;\n\t}", "boolean GameOver() {\n\t\treturn player.isDead();\n\t}", "Boolean checkEndGame() {\n for (WarPlayer player : players) {\n if (player.getHand().size() == 0)\n return true;\n }\n return false;\n }", "public void isStillInCombat() {\n isInCombat = enemiesInCombat.size() > 0;\n }", "public static boolean monsterDeathCheck(){\n if (currentMonster.currentHp <= 0){\n return true;\n }\n return false;\n }", "public boolean isGameOver(){\n if( character.getHp() <= 0 ){\n System.out.println(\"GAME IS OVER BECAUSE CHARACTER DEAD\");\n return true;\n }\n for (int i = 0 ; i < enemies.size() ; i++)\n {\n if(!enemies.get(i).isDead()){\n System.out.println(\"NOT ALL ENEMIES DEAD\");\n return false;\n }\n }\n if( !isGameOver ){\n endGame();\n isGameOver = true;\n }\n System.out.println(\"GAME IS OVER BECAUSE ALL ENEMIES ARE DEAD\");\n return true;\n }", "public boolean gameEnd(){\r\n return !hasMovements(model.getCurrentPlayer().getColor());\r\n }", "public boolean deathTick(Game game) {\n\t\treturn false;\n\t}", "public boolean isPlayerDefeated() {\n if (player.getHealth() <= 0) {\n return true;\n }\n return false;\n }", "private void checkDeath() {\n\t\tif (player.getLives() == 0) {\n shooty.setIv(new Image(\"/img/shipdeath.png\"));\n\t\t\tdie();\n\t\t}\n\t\t// another way to die: the blocks hit you\n\t\tif(btnList.get(0).getLayoutY() >= FATAL_BUTTON_DIST) {\n\t\t\tendGame.play();\n\t\t\tdie();\n\t\t}\n\t}", "public boolean isBattleOver(){\n\n if(battleEnemies.size() == 0) {\n System.out.println(\"Battle over all enemies dead\");\n findDefeated();\n cleanStatuses();\n result = true;\n\n return true;\n }\n if(character.getCurrHP() <= 0){\n System.out.println(\"Battle over character has died\");\n //findDefeated();\n cleanStatuses();\n result = false;\n\n return true;\n }\n //System.out.printf(\"remaining enemies: %s\\n\", battleEnemies.size());\n return false;\n }", "boolean end() {\r\n\t\tif (this.gameOver == true)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public boolean deathChecker(PC[] Players) {\n\tint length = Players.length;\n\tint healthSum = 0;\n\tfor (int c = 0; c < length; c++) {\n\t healthSum+=Players[c].getHealth();\n\t}\n\treturn (healthSum <= 0);\n }", "public boolean isBanned() {\n\t\treturn banned;\n\t}", "public boolean sendDeath() {\n return true;\n }", "public String getOnDeath () {\n return this.onDeath;\n }", "boolean reach() {\n\t\treturn PlayerreachEnd;\n\t}", "@Override\n public boolean isDead() {\n return (this.getLife() <= 0);\n }", "public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}", "public boolean isDead() {\n\t\treturn (currentHP<=0);\n\t}", "public boolean getGameEndedNicely() {\n\t\treturn gameEndedNicely;\n\t}", "public boolean isDead() {\r\n\t\treturn health <= 0;\r\n\t}", "public static void checkTurnEnd(){\n\t\tboolean end = true;\n\t\tfor (int i = 0; i < heroList.length && end; i++) {\n\t\t\t\n\t\t\tif (heroList[i].isAlive()){\n\t\t\t\tif (heroList[i].getOtherAction()){\n\t\t\t\t\tend = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (checkVictory()) {\n\t\t\tinBattle = false;\n\t\t\t//screenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t//gui.setScreenID(screenNumber);\n\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\tCutscene.loadCutscene(player.getCurLevel(), false);\n\t\t\tgui.setScreenID(screenNumber);\n\t\t\tgui.initializeCutscene();\n\t\t\tplayer.setCurLevel(player.getCurLevel()+1);\n\t\t}\n\t\t\n\t\tif (end) {\n\t\t\tai.play();\n\t\t\tgui.setEnemyPath(ai.getMoveCommands());\n\t\t\t\n\t\t\ttotalEnemyAttacks = 0;\n\t\t\tcurEnemyAttacker = -1;\n\t\t\t\n\t\t\tfor (int i = 0; i < enemyList.length; i++){\n\t\t\t\t\n\t\t\t\tif (ai.getAttackCommands(i) != null){\n\t\t\t\t\ttotalEnemyAttacks++;\n\t\t\t\t\t\n\t\t\t\t\tif (curEnemyAttacker == -1){\n\t\t\t\t\t\tcurEnemyAttacker = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (totalEnemyAttacks > 0){\n\t\t\t\tgui.setEnemyHasAttackCommand(true);\n\t\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t\tisEnemyAttacking = true;\n\t\t\t\t//gui.setScreenID(screenNumber);\n\t\t\t\tString message = ((Enemy)enemyList[curEnemyAttacker]).getEnemyType() + \" did \" + ai.getAttackCommandsDamage(curEnemyAttacker) + \" damage to \" + ((Hero)ai.getAttackCommands(curEnemyAttacker)).getName() + \"!\";\n\t\t\t\tCutscene.loadAttackCutscene(((Enemy)enemyList[curEnemyAttacker]).getEnemyID() * -1 - 1, ai.getAttackCommands(curEnemyAttacker).getUnitID(), message, map.getTileNumber(enemyList[curEnemyAttacker].getCoordinate()));\n\t\t\t\t\n\t\t\t\tcurEnemyAttack = 1;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tplayer.resetAllHeroes();\n\t\t\t}\n\n\t\t}\n\t}", "public void checkGameEndState() {\n\t\tfor(MapCharacter c : friendlyMissionCriticals) {\n\t\t\tif(!friendlies.contains(c))\n\t\t\t\tthrow new PlayerLosesException();\n\t\t}\n\t\tif(getEnemies().size() == 0)\n\t\t\tthrow new PlayerWinsException();\n\t}", "public boolean isEndState()\n {\n return !this.safe || (this.e.size() == 0) || (this.d.size() == 0);\n }", "public boolean getIsBattleOver()\r\n {\r\n return isBattleOver;\r\n }", "public boolean inBattle() {\r\n\t\t\treturn this.inBattle;\r\n\t\t}", "public boolean hasAnyoneLost()\n {\n gameOver = false;\n if(dw.isEmpty() || de.isEmpty())\n gameOver = true;\n \n return gameOver;\n }", "public void checkBanStatus() {\n if(getBanned() != null && getBanned().after(getLast_join())) {\n Date today = new Date();\n Date banDate = getBanned();\n String timeLeft = ClymeSkyblockCore.getInstance().getTimeUtil().getTimeDifference(banDate, today);\n\n Bukkit.getScheduler().runTask(ClymeSkyblockCore.getInstance(), () -> {\n getPlayer().kickPlayer(\" \\n\" +\n ClymeSkyblockCore.getInstance().getClymeMessage().getRawPrefix() + \"\\n\" +\n \" \\n\" +\n \" \\n\" +\n \"§cYou are banned from the Server!\\n\" +\n \" \\n\" +\n \"§f§lReason: §7\" + getBanReason() + \"\\n\" +\n \"§f§lTime left: §7\" + timeLeft + \"\\n\" +\n \"\\n\\n\" +\n \"§c§oIf you think you have been wrongly punished,\\n\" +\n \"please contact our support team!\\n\" +\n \"§c§oor purchase a ban evasion in our store: §fshop.clyme.games§c§o!\" +\n \"\\n\");\n\n Bukkit.getConsoleSender().sendMessage(\"[ClymeGames] §4Player \" + getUsername() + \" tried to join but is banned!\");\n });\n }\n }", "private boolean playerDetection() {\n\t\tAxisAlignedBB axisalignedbb = new AxisAlignedBB(posX, posY, posZ, posX + 1, posY + 1, posZ + 1).grow(DETECTION_RANGE);\n\t\tList<EntityPlayer> list = world.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb);\n\n\t\treturn !list.isEmpty();\n\t}", "public boolean gameIsOver() {\r\n int cpt = 0;\r\n for (Player p : players) {\r\n if (p.getLife() > 0) {\r\n cpt++;\r\n }\r\n }\r\n return cpt==1;\r\n }", "public boolean isInCombat() {\n return isInCombat;\n }", "public boolean isDead() {\r\n\t\treturn this.lives == 0;\r\n\t}", "boolean hasLeaveGameReqeuest();", "public boolean canDisplayAwayMessage() {\n long now = System.currentTimeMillis();\n\n if (this.playerAwayMsgTimeStamp + PlayerImpl.AWAY_MSG_DISPLAY_PERIOD < now) {\n this.playerAwayMsgTimeStamp = now;\n return true;\n }\n\n return false;\n }", "@Override\n\tpublic boolean getBanned() {\n\t\treturn this.banned;\n\t}", "public boolean canEndTurn(){\n\t\treturn moved;\n\n\t}", "public boolean canEndTurn() {\n\t\tif (hasMoved || hasCaptured) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isDead() {\n\t\tif (_currentHealth <= 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "boolean hasGameEndedResponse();", "public boolean isDead() {\r\n\t\tif (health <= 0.0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public boolean isOutstanding() {\n return !cancelled && !invitationSent;\n }", "public boolean deathChecker(NPC[] Mobs) {\n\tint length = Mobs.length;\n\tint healthSum = 0;\n\tfor (int c = 0; c < length; c++) {\n\t healthSum+=Mobs[c].getHealth();\n\t}\n\treturn (healthSum <= 0);\n }", "public boolean isEndGameSpectator() {\n\t\treturn endGameSpectator;\n\t}", "private boolean GameEnds(){\n \tif(endGameCounter!=0) {\n \t\treturn false;\n \t\t\n \t}\n \t\n \treturn true;\n }", "boolean checkEndGame() throws RemoteException;", "public Boolean contributedToDeath() {\n return data.getBoolean(FhirPropertyNames.PROPERTY_CONTRIBUTED_TO_DEATH);\n }", "private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}", "public boolean isGameWon(){\r\n for(Card c: this.cards){\r\n if (c.getFace() == false){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean getEndTurn() {\n\t\treturn turnEnd;\n\t}", "public boolean gameEnd(){\n\t\treturn(\tturn >= 50 || evaluateState()==true );\r\n\t}", "public boolean blockedGame() {\r\n int pointsperplayer = 0;\r\n if (playedDominoes.size() > 9) {\r\n if (end[0] == end[1]) {\r\n List<Domino> aux = new ArrayList();\r\n for (Domino d : playedDominoes) {\r\n if (d.getBothNumbers().contains(end[0])) {\r\n System.out.println(\"Adding domino\" + d.toString());\r\n aux.add(d);\r\n }\r\n }\r\n return aux.size() == 7;\r\n }\r\n }\r\n return false;\r\n }", "public boolean hasDied() {\n return !isAlive();\n }", "public boolean isTurnOngoing() {\n int numEntitiesWithActions = 0;\n for (Entity entity : entitiesInCombat) {\n if (entity.canAct()) {\n numEntitiesWithActions++;\n }\n }\n return numEntitiesWithActions > 0;\n }", "public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}", "@Override\n\tpublic boolean isComplete() {\n\t\tif (this.defeated == this.totalEnemies)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "boolean hasPlayerBag();", "public boolean isTheBoss()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public boolean endOfGame() {\n\t\tfor (int i = 0; i < getNumOfPlayers(); i++) {\n\t\t\tif (this.getPlayerList().get(i).getCardsInHand().isEmpty()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }", "public boolean isDead() {\n if (getHealth() == 0){\n this.world.destroyBody(this.b2body);\n return true;\n }\n return false;\n }", "public boolean isAlive() {\n return health > 0;\n }", "public boolean isGameOver ()\n\t{\n\t\t return lives <= 0;\n\t}", "boolean updateDeathsTillForget() {\n\t\tdeathsTillForget -= 1;\n\t\treturn (deathsTillForget < 1);\n\t}", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "private boolean didPlayerLose() {\r\n return mouseListeningMode && bird.getNumThrowsRemaining() == 0;\r\n }", "private boolean checkGameOver() {\n\t\tboolean singlePlayerWon = otherPlayer.getLife() == 0;\n\t\tboolean otherPlayerWon = singlePlayer.getLife() == 0;\n\n\t\tif (singlePlayerWon || otherPlayerWon) {\n\t\t\tthis.singlePlayer.createEndButton(singlePlayerWon);\n\t\t\tthis.singlePlayer.onGameOver();\n\t\t\tthis.otherPlayer.onGameOver();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isBot() {\n \t\treturn (type == PLAYER_BOT);\n \t}", "public boolean isGameOver(){\n return checkKingReachedEnd() || checkNoDragonsLeft() || checkIfKingSurrounded();\n }", "public boolean isEndPortalFrame() {\n return this.type == Type.ENDPORTALFRAME;\n }", "public boolean getStatus() {\n return (rnd.nextInt(obstructionChanceBound) <= obstructionChance);\n }", "public boolean isAlive(){\r\n\t\tif(dead==true){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public boolean isDead();", "public boolean continueGame(){\n for (Player p : super.getPlayers()) {\n // check if p is dead\n if (p.isDead()) {\n return false;\n }\n }\n return true;\n }", "boolean hasVisitEndtime();", "boolean hasVisitEndtime();", "public static boolean checkVictory(){\n\t\tboolean victory = true;\n\t\t\n\t\tfor (int i = 0; i < enemyList.length && victory; i++) {\n\t\t\tif (enemyList[i].isAlive()) {\n\t\t\t\tvictory = false;\n\t\t\t}\n\t\t}\n\t\treturn victory;\n\t}", "public boolean checkPet() {\r\n return this.player.pet.getIsAlive();\r\n }", "public boolean hasGameEnded() {\n return winner != 0;\n }", "Boolean isDead();", "public boolean endOfGame() {\n\t\tfor(CardGamePlayer player : playerList) {\n\t\t\tif(gameStarted && player.getNumOfCards() == 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "public boolean isHangmanDead()\n {\n return hangmanIndex >= hangmanShapes.length;\n }", "public boolean inPvpCombat(World world) {\n if (this.lastPvpTimestamp == 0) {\n return false;\n }\n\n long now = Calendar.getInstance().getTimeInMillis();\n\n long elapsed = now - this.lastPvpTimestamp;\n\n if (elapsed > GriefPreventionPlugin.getActiveConfig(world.getProperties()).getConfig().pvp.combatTimeout * 1000) // X seconds\n {\n this.lastPvpTimestamp = 0;\n return false;\n }\n\n return true;\n }", "public boolean isDead() {\n return hullStrength <= 0;\n }", "public boolean gameOver() {\r\n return didPlayerLose() || didPlayerWin();\r\n }", "public boolean isAlive(){\r\n if (currHP > 0){\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean checkAccountClosed() {\n return this.accountStatus == \"Closed\";\n }", "public boolean shouldExecute() {\n LivingEntity livingentity = ShulkerEntity.this.getAttackTarget();\n if (livingentity != null && livingentity.isAlive()) {\n return ShulkerEntity.this.world.getDifficulty() != Difficulty.PEACEFUL;\n } else {\n return false;\n }\n }", "public boolean isDead() {\r\n \t\treturn this.isDead;\r\n \t}", "public boolean isDead() {\r\n return this.dead;\r\n }" ]
[ "0.7066744", "0.6665105", "0.6560607", "0.64268064", "0.64246213", "0.6320889", "0.63127553", "0.62595", "0.6168054", "0.607793", "0.6045047", "0.6023985", "0.6015699", "0.59540707", "0.5953213", "0.59510905", "0.5921621", "0.59068364", "0.5906575", "0.5896529", "0.5867628", "0.58599186", "0.5843628", "0.5821616", "0.5816206", "0.58153015", "0.58094007", "0.58033925", "0.58005446", "0.5793756", "0.5790898", "0.5787424", "0.57868123", "0.5772634", "0.57685506", "0.5721413", "0.5721084", "0.5719848", "0.5710605", "0.5696369", "0.5690896", "0.5688651", "0.5685266", "0.5680236", "0.56802225", "0.5677911", "0.5663196", "0.56586546", "0.5654857", "0.5648741", "0.564818", "0.5646353", "0.56450045", "0.5642767", "0.5639484", "0.56330895", "0.56241673", "0.5621022", "0.5615312", "0.5614341", "0.5612562", "0.559875", "0.5594778", "0.5587594", "0.55852723", "0.55810344", "0.5576656", "0.556571", "0.5565502", "0.55644554", "0.5557885", "0.5557885", "0.5557885", "0.5557885", "0.5557885", "0.55576277", "0.5555431", "0.5553879", "0.554767", "0.5546944", "0.5545021", "0.554371", "0.554127", "0.5537977", "0.55361795", "0.55361795", "0.55353445", "0.5531867", "0.553147", "0.5527796", "0.5517632", "0.5516281", "0.55152607", "0.55093634", "0.55024165", "0.5501538", "0.55002785", "0.5488614", "0.54863834", "0.54856133", "0.548016" ]
0.0
-1
Gets if the location's region is outer spawn
public boolean isOuterSpawn(Location loc) { return RegionManager.get().hasTag(loc, "outer-spawn"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean inRegion(Location loc)\n {\n if (!loc.getWorld().getName().equals(world.getName()) || !setup)\n return false;\n \n int x = loc.getBlockX();\n int y = loc.getBlockY();\n int z = loc.getBlockZ();\n \n // Check the lobby first.\n if (lobbySetup)\n {\n if ((x >= l1.getBlockX() && x <= l2.getBlockX()) && \n (z >= l1.getBlockZ() && z <= l2.getBlockZ()) && \n (y >= l1.getBlockY() && y <= l2.getBlockY()))\n return true;\n }\n \n // Returns false if the location is outside of the region.\n return ((x >= p1.getBlockX() && x <= p2.getBlockX()) && \n (z >= p1.getBlockZ() && z <= p2.getBlockZ()) && \n (y >= p1.getBlockY() && y <= p2.getBlockY()));\n }", "public boolean isSpawn(Location loc) {\n\t\treturn RegionManager.get().hasTag(loc, \"spawn\");\n\t}", "public boolean isInside(){\n\t\tinside = true;\n\t\tif(map.contains(new Rectangle(x,y,(int)spriteSize.getHeight(), (int)spriteSize.getWidth()))==false){\n\t\t\tinside = false;\n\t\t}\n\t\treturn(inside);\n\t}", "public boolean inGoalRegion() {\n return position >= GOAL_POSITION;\n }", "private boolean checkInsideZone() {\n for (Zone z : shiftZones) {\n if (PolyUtil.containsLocation(userLocation, Arrays.asList(z.getCoords()), true)) {\n return true;\n }\n }\n return false;\n }", "public boolean isSpawnable(Location loc) {\n Block block = loc.getBlock();\n Block under = loc.getBlock().getRelative(BlockFace.DOWN);\n Block above = loc.getBlock().getRelative(BlockFace.UP);\n if (block.getType().equals(Material.AIR) && !under.getType().equals(Material.AIR) && above.getType().equals(Material.AIR)) {\n if (block.getLightLevel() <= plugin.CONFIG.SPAWNING_LIGHT) {\n return true;\n }\n }\n return false;\n }", "public boolean isSpawn()\n\t{\n\t\treturn block == Block.FRUIT_SPAWN || block == Block.GHOST_SPAWN || block == Block.PAC_SPAWN;\n\t}", "@Override\n\tpublic boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint i = worldObj.getFirstUncoveredBlock(par1, par2);\n\t\tif (i == 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn Block.blocksList[i].blockMaterial.blocksMovement();\n\t\t}\n\t}", "public boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint var3 = this.worldObj.getFirstUncoveredBlock(par1, par2);\n\t\treturn var3 == 0 ? false : Block.blocksList[var3].blockMaterial.blocksMovement();\n\t}", "public static boolean isInColosseum(Location loc) {\n\t\tif (!(loc.getWorld() == Bukkit.getWorld(\"redacted2\"))) return false;\n\t\t// bad hotfix\n\t\tif (loc.clone().add(0, -1, 0).getBlock().getType() == Material.GRASS) return false;\n\t\tint locX = loc.getBlockX();\n\t\tint locY = loc.getBlockY();\n\t\tint locZ = loc.getBlockZ();\n\t\t//Test if player is in main launcher ignore box\n\t\t// -4 98 10 to -23 30 23 - ignore zone for main launcher\n\t\tif (-23 <= locX && locX <= -4 && 30 <= locY && locY <= 98 && 10 <= locZ && locZ <= 23) return false;\n\t\t//Test if player is in side launcher ignore box\n\t\t//-4 98 98 to -25 30 75 - ignore zone for side launcher\n\t\tif (-25 <= locX && locX <= -4 && 30 <= locY && locY <= 98 && 75 <= locZ && locZ <= 98) return false;\n\t\t//If the player is not in either of the ignore boxes, check if they are in the colosseum boundaries\n\t\t//-4 98 10 to -100 30 98 - Colosseum boundaries\n\t\tif (-100 <= locX && locX <= -4 && 30 <= locY && locY <= 98 && 10 <= locZ && locZ <= 98) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean inRegionRadius(Location loc, int radius)\n {\n if (!loc.getWorld().getName().equals(world.getName()) || !setup)\n return false;\n \n int x = loc.getBlockX();\n int y = loc.getBlockY();\n int z = loc.getBlockZ();\n \n // Check the lobby first.\n if (lobbySetup)\n {\n if ((x + radius >= l1.getBlockX() && x - radius <= l2.getBlockX()) && \n (z + radius >= l1.getBlockZ() && z - radius <= l2.getBlockZ()) && \n (y + radius >= l1.getBlockY() && y - radius <= l2.getBlockY()))\n return true;\n }\n \n return ((x + radius >= p1.getBlockX() && x - radius <= p2.getBlockX()) &&\n (z + radius >= p1.getBlockZ() && z - radius <= p2.getBlockZ()) &&\n (y + radius >= p1.getBlockY() && y - radius <= p2.getBlockY()));\n }", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "boolean haveAnySpawn();", "private boolean isOccupied(Location loc)\n\t{\n\t\treturn grid[loc.getRow()][loc.getCol()] != null;\n\t}", "public boolean onGround() {\n return getLocation().getY() <= 0 || (interactingWithY != null && interactingWithY.getLocation().getY() + interactingWithY.size.height <= getLocation().getY());\n }", "public boolean isSpawnPoint() {\n return isSpawnPoint;\n }", "private boolean isUnderground(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().isUnderground() == true){return true; }\n else{ return false; }\n }", "public boolean isOnGround() {\n return this.sim_pos.getY() <= 2;\n }", "private final boolean isInsideWorld() {\n\t\t// Check it is inside the world\n\t\tif (x<=0 || y<=0 || x+width>=_world.getWidth() || y+height>=_world.getHeight()) {\n\t\t\tif (_mass == 0 && alive && x == 0 && y == 0)\n\t\t\t\tdie(this);\n\t\t\t// Adjust direction\n\t\t\tif (x <= 0 || x + width >= _world.getWidth())\n\t\t\t\tdx = -dx;\n\t\t\tif (y <= 0 || y + height >= _world.getHeight())\n\t\t\t\tdy = -dy;\n\t\t\tdtheta = 0;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private Location verifyLocation(Location location)\n {\n Block playerBlock = location.getBlock();\n World world = location.getWorld();\n\n if (rootC.getStringList(RootNode.WORLDS).contains(world.getName()))\n {\n // Only spawn monsters in normal world. End is crowded with endermen\n // and nether is too extreme anyway, add config later\n int lightLvl = location.getBlock().getLightFromSky();\n if (world.getEnvironment() == Environment.NORMAL\n && (location.getY() < rootC.getInt(RootNode.MORE_MONSTERS_MAX_Y) && lightLvl < 3))\n {\n // the playerBlock should always be air, but if the player stands\n // on a slab he actually is in the slab, checking a few blocks under because player could have jumped etc..\n if (playerBlock.getType().equals(Material.AIR))\n {\n for (int i = 0; i <= 3; i++)\n {\n playerBlock = location.getBlock().getRelative(BlockFace.DOWN, 1);\n\n if (playerBlock.getType().equals(Material.AIR))\n {\n location.subtract(0, 1, 0);\n playerBlock = location.getBlock();\n // the playerBlock is now the block where the monster\n // should spawn on, next up: verify block\n }\n else\n {\n break;\n }\n }\n }\n // no spawning on steps, stairs and transparent blocks\n if (playerBlock.getType().name().endsWith(\"STEP\") || playerBlock.getType().name().endsWith(\"STAIRS\")\n || playerBlock.getType().isTransparent() || !playerBlock.getType().isOccluding() || playerBlock.getType().equals(Material.AIR))\n {\n // don't spawn here\n return null;\n }\n\n if (quickVerify(location))\n return location;\n }\n\n }\n return null;\n }", "public boolean isInterior() {\n return true;\n }", "@Override\n\tpublic boolean isInside() {\n\t\treturn false;\n\t}", "private boolean atLeastOneNonWallLocation() {\n\t\tfor (int x = 0; x < this.map.getMapWidth(); x++) {\n\t\t\tfor (int y = 0; y < this.map.getMapHeight(); y++) {\n\n\t\t\t\tif (this.map.getMapCell(new Location(x, y)).isWalkable()) {\n\t\t\t\t\t// If it's not a wall then we can put them there\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean inBounds(Actor a)\n {\n boolean inX = Math.abs(a.getXPos()) < levelWidth/2;\n boolean inY = Math.abs(a.getYPos()) < levelHeight/2;\n return inX && inY;\n }", "public boolean canCoordinateBeSpawn(int par1, int par2)\n {\n return false;\n }", "private void performInsideCheck() {\n if (checkInsideDone) {\n return;\n }\n \n checkInsideDone = true;\n \n final Location playerLoc = World.getPlayer().getLocation();\n final int currX = playerLoc.getScX();\n final int currY = playerLoc.getScY();\n int currZ = playerLoc.getScZ();\n boolean nowOutside = false;\n boolean isInside = false;\n \n for (int i = 0; i < 2; ++i) {\n currZ++;\n if (isInside || parent.isMapAt(currX, currY, currZ)) {\n if (!insideStates[i]) {\n insideStates[i] = true;\n synchronized (unchecked) {\n unchecked.add(Location.getKey(currX, currY, currZ));\n }\n }\n isInside = true;\n } else {\n if (insideStates[i]) {\n insideStates[i] = false;\n nowOutside = true;\n }\n }\n }\n \n /*\n * If one of the values turned from inside to outside, all tiles are added to the list to be checked again.\n */\n if (nowOutside) {\n synchronized (unchecked) {\n unchecked.clear();\n parent.processTiles(this);\n }\n }\n \n World.getWeather().setOutside(!isInside);\n }", "public CellPosition isInside(Vector2i coord){\n\t\tCellPosition pos;\n\t\tpos = display.gridDisplay.isInside(coord);\n\t\tif(pos.isFound)\n\t\t\treturn pos;\n\t\t\n\t\tpos = canva.isInside(coord);\n\t\treturn pos;\n\t}", "public boolean isMine(int x, int y);", "boolean hasLocation();", "boolean hasLocation();", "private boolean getValidRespawnPosition(int x, int y, int imageW, int imageH) {\n\t\tRectangle iRect = new Rectangle(x, y, imageW, imageH);\n\t\t// dont spawn on a wall\n\t\tfor (Wall w : wallArray) {\n\t\t\tRectangle wRect = w.getBounds();\n\t\t\tif (iRect.intersects(wRect)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// dont spawn on a powerup\n\t\tfor (Powerup p : powerupArray) {\n\t\t\tRectangle pRect = p.getBounds();\n\t\t\tif (iRect.intersects(pRect)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isInterior() {\n return false;\n }", "public abstract boolean isInterior();", "public boolean isInterior() {\n\t\tif (this.eltZero != null && this.eltOne != null && this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean isInsideZone(int x, int y)\r\n\t{\r\n\t\tboolean inside = false;\r\n\t\tfor (Shape sh : _shapes)\r\n\t\t{\r\n\t\t\tif (sh.contains(x, y))\r\n\t\t\t{\r\n\t\t\t\tinside = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (_exShapes != null && inside)\r\n\t\t{\r\n\t\t\tfor (Shape sh : _exShapes)\r\n\t\t\t{\r\n\t\t\t\tif (sh.contains(x, y))\r\n\t\t\t\t{\r\n\t\t\t\t\tinside = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn inside;\r\n\t}", "boolean hasIsBoundaryNodeOf();", "public boolean zoneStructuresAreOutside() {\n\t\tfor (Team team : this.zone.getTeams()) {\n\t\t\tfor (Volume spawnVolume : team.getSpawnVolumes().values()) {\n\t\t\t\tif (!this.isInside(spawnVolume.getCornerOne()) || !this.isInside(spawnVolume.getCornerTwo())) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (team.getTeamFlag() != null) {\n\t\t\t\tif (!this.isInside(team.getFlagVolume().getCornerOne()) || !this.isInside(team.getFlagVolume().getCornerTwo())) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// check monuments\n\t\tfor (Monument monument : this.zone.getMonuments()) {\n\t\t\tif (monument.getVolume() != null) {\n\t\t\t\tif (!this.isInside(monument.getVolume().getCornerOne()) || !this.isInside(monument.getVolume().getCornerTwo())) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean liesOnWall() {\n return getBaseParameters().getWorld()[this.getX()][this.getY()] == getBaseParameters().getWall();\n }", "public boolean isInBoundaries() {\n\t return Referee.playfield.isInBoundaries(this);\n }", "public boolean atWorldEdge()\n {\n if(getX() < 20 || getX() > getWorld().getWidth() - 20)\n return true;\n if(getY() < 20 || getY() > getWorld().getHeight() - 20)\n return true;\n else\n return false;\n }", "public boolean atWorldEdge()\n {\n if(getX() < 20 || getX() > getWorld().getWidth() - 20)\n return true;\n if(getY() < 20 || getY() > getWorld().getHeight() - 20)\n return true;\n else\n return false;\n }", "public boolean getCanSpawnHere()\n {\n return this.isValidLightLevel() && super.getCanSpawnHere();\n }", "public boolean isWarp()\n\t{\n\t\treturn block == Block.WARP_SPACE;\n\t}", "public boolean isInGroup(Object cell) {\r\n \t\tObject[] celgru = null;\r\n \t\tObject[] celless = null;\r\n \r\n \t\tcells = graph.getDescendants(graph.getRoots());\r\n \t\tif (cells.length > 0) {\r\n \t\t\tfor (Object cell2 : cells) {\r\n \t\t\t\tif (cell2 instanceof BlockingRegion) {\r\n \t\t\t\t\tcelgru = new Object[1];\r\n \t\t\t\t\tcelgru[0] = cell2;\r\n \t\t\t\t\t// celle presenti nel blocking region incluse port e regione\r\n \r\n \t\t\t\t\tcelless = graph.getDescendants(celgru);\r\n \t\t\t\t\tfor (Object celles : celless) {\r\n \t\t\t\t\t\tif (celles.equals(cell)) {\r\n \t\t\t\t\t\t\treturn true;\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 false;\r\n \t}", "private boolean compareLocation(Location location){\n return location.getBlockX()==this.location.getBlockX() && location.getBlockY()==this.location.getBlockY() && location.getBlockZ() == this.location.getBlockZ();\n }", "public Location mainSpawn(){\r\n\t\treturn mainSpawn;\r\n\t}", "boolean isGoodLocation(World world, int x, int y, int z);", "public boolean isInPlanet() {\n return this.currentPlanet != null;\n }", "public isWithin() {\n\t\tsuper();\n\t}", "public boolean isAt(Point punto) {\r\n Point inner = toInnerPoint(punto);\r\n for (Point block : innerPiece.getPoints())\r\n \tif (block.X() == inner.X() && block.Y() == inner.Y())\r\n \t\treturn true;\r\n return false;\r\n }", "@Override\n\tpublic boolean isInside(float x, float y, float z) {\n\t\treturn false;\n\t}", "private boolean hasHitEdge() {\n if (!enableClusterExitPurging) {\n return false;\n }\n int lx = (int) location.x, ly = (int) location.y;\n int sx = chip.getSizeX(), sy = chip.getSizeY();\n if (lx < radiusX || lx > sx - radiusX || ly < radiusY || ly > sy - radiusY) {\n if (hitEdgeTime == 0) {\n hitEdgeTime = getLastEventTimestamp();\n return false;\n } else {\n if (getLastEventTimestamp() - hitEdgeTime > 0/* getClusterLifetimeWithoutSupportUs()*/) {\n return true;\n } else {\n return false;\n }\n }\n }\n return false;\n }", "boolean isLocator();", "boolean isInsideScreen() {\n if (_hitbox.length == 1) {\n float r = _hitbox[0].x;\n PVector c = _getCenter();\n return 0 <= c.x + r && c.x - r < width && 0 <= c.y + r && c.y - r < height;\n }\n \n PVector[] points = this._getPoints();\n for(PVector p : points) {\n if(0 <= p.x && p.x < width && 0 <= p.y && p.y < height) {\n return true;\n }\n }\n return false;\n }", "@Test\n public void isOccupiedAndGetBlockReturnTheSameAnswer() {\n Tetromino tetromino = Tetromino.Z;\n Direction direction = Direction.DOWN;\n\n for (int y = 0; y < tetromino.height; y++) {\n for (int x = 0; x < tetromino.width; x++) {\n String coordinates = String.format(\"Tetromino Z[DOWN] block (x,y) = (%d,%d)\", x, y);\n\n boolean isOccupied = tetromino.isOccupied(direction, x, y);\n Block block = tetromino.getBlock(direction, x, y);\n\n assertEquals(coordinates, isOccupied, (block != null));\n }\n }\n }", "boolean canPlaceCity(VertexLocation vertLoc);", "public boolean isOver() {\n return this.treeNode.getBuilding().isFinished();\n }", "public boolean isTotallyOnGrid() {\n\t\t\tfor(int i=0; i<4; i++) {\n\t\t\t\tif(position.y + i >= 0)\n\t\t\t\t\treturn true; //everything from here down is on grid\n\t\t\t\t// this row is above grid so look for non-empty squares\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tif(squares[i][j])\n\t\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\tSystem.err.println(\"TetrisPiece.isTotallyOnGrid internal error\");\n\t\t\treturn false;\n\t\t}", "boolean isIncludeBounds();", "private boolean isInside(int i, int j) {\n\t\tif (i < 0 || j < 0 || i > side || j > side)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public synchronized boolean isInPosition(){\r\n\t\tSystem.out.println(\"wheel: \" + flywheel.isFlywheelAtSpeed() + \r\n\t\t\t\t\" hood: \" + hood.isInPosition() + \r\n\t\t\t\t\" turret: \" + turret.isInPosition() + \r\n\t\t\t\t\" kicker: \" + kicker.isInPosition());\r\n\t\treturn flywheel.isFlywheelAtSpeed() && \r\n\t\t\t\thood.isInPosition() && \r\n\t\t\t\tturret.isInPosition() && \r\n\t\t\t\tkicker.isInPosition();\r\n\t}", "protected boolean isInside(int x, int y){\n if(x <= super.getLocationX())\n return false;\n\n if(x >= (super.getLocationX() + super.getWidth() - 1))\n return false;\n\n if(y <= super.getLocationY())\n return false;\n\n if(y >= (super.getLocationY() + super.getHeight() - 1))\n return false;\n\n //return true if inside\n return true;\n\n }", "boolean hasElevation();", "public boolean canMove (Location loc) {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return false;\n if (!gr.isValid(loc))\n return false;\n Actor neighbor = gr.get(loc);\n return !(neighbor instanceof Wall);\n }", "public boolean hasLocation()\n {\n return targetLocation != null;\n }", "public boolean getCanSpawnHere()\r\n {\r\n return false;\r\n }", "private boolean towerLocation(final Point current_point) {\r\n\t\tfor (int i = 0; i < my_towers.size(); i++) {\r\n\t\t\tif (my_towers.get(i).getLocation().equals(current_point)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean hasCoordinates();", "boolean hasCoordinates();", "boolean hasCoordinates();", "public final boolean checkIfInZone(int x, int y) { return (getSiege(x, y) != null); }", "private boolean isFullWest()\r\n\t{\r\n\t\treturn (westElem == maxSize);\r\n\t}", "public boolean itemonfloor(){\n\t\tint XI = 0;\n\t\tint YI = 0;\n\t\tint Xyou = 1;\n\t\tint Yyou = 1;\n\t\tfor(int i = 0 ; i < this.Items.length;i++){\n\t\t\tfor(int p = 0; p < this.Items.length;p++){\n\t\t\t\tif(this.Items[i][p] != null && this.position[i][p] == 1){\n\t\t\t\t\tYI = i;\n\t\t\t\t\tXI = p;\n\t\t\t\t\tYyou = i;\n\t\t\t\t\tXyou = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}//end of outter for\n\t\tif(YI==Yyou && XI==Xyou){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean isLocationEmpty(Unit unit, int x, int y)\n {\n Unit resident = master.getLocation(x, y).getResident();\n // if there's nothing there, yeah...\n if (resident == null)\n return true;\n // say it's not there if we dunno it's there\n if (resident.model.hidden && !confirmedVisibles.contains(resident)) \n return true;\n // otherwise, consult the fog map and master map\n return isLocationFogged(x, y) || master.isLocationEmpty(unit, x, y);\n }", "public boolean canInteractWithBlock(Player player, Location location) {\n\t\tif (mayor.equals(player.getUniqueId()) || councils.containsKey(player.getUniqueId())) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tPlot plot = getPlotHere(location);\n\t\t\treturn (inhabitants.contains(player.getUniqueId()) && plot == null) || (plot != null && plot.canBuild(player, location));\n\t\t}\n\t}", "public boolean hasRegionLocationMatrix() {\n return regionLocationMatrixBuilder_ != null || regionLocationMatrix_ != null;\n }", "private boolean quickVerify(Location loc)\n {\n //quickly check if 2 blocks above this is clear\n Block oneAbove = loc.getBlock();\n Block twoAbove = oneAbove.getRelative(BlockFace.UP, 1);\n return oneAbove.getType().equals(Material.AIR) && twoAbove.getType().equals(Material.AIR);\n }", "boolean isOccupiedByAnimal(Vector2d position);", "public boolean isVisible() {\r\n return !((x + width) < ocean.getXmin() || x > ocean.getXmax() || (y + height) < ocean.getYmin()\r\n || y > ocean.getYmax());\r\n }", "public boolean isAdjacentFloor(int x, int y) {\n Position pUp = new Position(x, y + 1);\n Position pDown = new Position(x, y - 1);\n Position pLeft = new Position(x - 1, y);\n Position pRight = new Position(x + 1, y);\n Position pUpLeft = new Position(x - 1, y + 1);\n Position pUpRight = new Position(x + 1, y + 1);\n Position pDownLeft = new Position(x - 1, y - 1);\n Position pDownRight = new Position(x + 1, y - 1);\n if (pUp.y < worldHeight - 1) {\n if (world[pUp.x][pUp.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pDown.y > 0) {\n if (world[pDown.x][pDown.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pLeft.x > 0) {\n if (world[pLeft.x][pLeft.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pRight.x < worldWidth - 1) {\n if (world[pRight.x][pRight.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pUpLeft.y < worldHeight - 1 && pUpLeft.x > 0) {\n if (world[pUpLeft.x][pUpLeft.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pUpRight.y < worldHeight - 1 && pUpRight.x < worldWidth - 1) {\n if (world[pUpRight.x][pUpRight.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pDownLeft.y > 0 && pDownLeft.x > 0) {\n if (world[pDownLeft.x][pDownLeft.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pDownRight.y > 0 && pDownRight.x < worldWidth - 1) {\n if (world[pDownRight.x][pDownRight.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n return false;\n }", "private boolean placeNear(Organism parent) {\n\t\tint nPos = Utils.random.nextInt(8);\n\t\t// Try to put it in any possible position, starting from a randomly chosen one.\n\t\tfor (int nSide = 0; nSide < 8; nSide++) {\n\t\t\t// Calculate candidate position\n\t\t\t_dCenterX = parent._dCenterX + (parent.width / 2 + width / 2+ 1) * Utils.side[nPos][0]; \n\t\t\t_dCenterY = parent._dCenterY + (parent.height / 2 + height / 2 + 1) * Utils.side[nPos][1];\n\t\t\t_centerX = (int) _dCenterX;\n\t\t\t_centerY = (int) _dCenterY;\n\t\t\tcalculateBounds(true);\n\t\t\t// Check this position is inside the world.\n\t\t\tif (isInsideWorld()) {\n\t\t\t\t// Check that it doesn't overlap with other organisms.\n\t\t\t\tif (_world.fastCheckHit(this) == null) {\n\t\t\t\t\tif (parent._geneticCode.getDisperseChildren()) {\n\t\t\t\t\t\tdx = Utils.side[nPos][0];\n\t\t\t\t\t\tdy = Utils.side[nPos][1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdx = parent.dx;\n\t\t\t\t\t\tdy = parent.dy;\n\t\t\t\t\t}\n\t\t\t\t\t// Generate an identification\n\t\t\t\t\t_ID = _world.getNewId();\n\t\t\t\t\t// Substract the energy from the parent\n\t\t\t\t\tparent._energy -= _energy;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnPos = (nPos + 1) % 8;\n\t\t}\n\t\t// It can't be placed.\n\t\treturn false;\n\t}", "public boolean isInside(Rectangle boundary) {\n\t\t\n\t\t// Use TLAP to see if it is or it is not\n\t\tif (x + diameter / 2 >= boundary.getX() - boundary.getWidth() && x + diameter / 2 <= boundary.getX() + boundary.getWidth()\n\t\t\t\t&& y + diameter / 2 >= boundary.getY() - boundary.getHeight() && y + diameter / 2 <= boundary.getY() + boundary.getHeight()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isThereANeighborChest(World par1World, int par2, int par3, int par4) {\n\t\treturn par1World.getBlock(par2, par3, par4) != this ? false : (par1World.getBlock(par2 - 1, par3, par4) == this ? true : (par1World.getBlock(par2 + 1,\n\t\t\t\tpar3, par4) == this ? true : (par1World.getBlock(par2, par3, par4 - 1) == this ? true : par1World.getBlock(par2, par3, par4 + 1) == this)));\n\t}", "public boolean situatedInside(double x, double y) {\n if(y>this.bottomleft.x && y<this.topright.x && x <this.topright.y && x > this.bottomleft.y)\n return true;\n else\n return false;\n }", "public boolean isInsideVehicle ( ) {\n\t\treturn extract ( handle -> handle.isInsideVehicle ( ) );\n\t}", "boolean hasCoordInfo();", "public boolean isGameObjectInNeighbourhood(GameObject gO) {\n return Math.abs(this.getGridCoordinates().x - gO.getGridCoordinates().x) == 0 && Math.abs(this.getGridCoordinates().y - gO.getGridCoordinates().y) == 1 ||\n Math.abs(this.getGridCoordinates().x - gO.getGridCoordinates().x) == 1 && Math.abs(this.getGridCoordinates().y - gO.getGridCoordinates().y) == 0;\n }", "public boolean work() {\n // get the next block so the cart knows where to mine\n Vec3 next = getNextblock();\n // save thee coordinates for easy access\n int x = (int) next.xCoord;\n int y = (int) next.yCoord;\n int z = (int) next.zCoord;\n\n // loop through the blocks in the \"hole\" in front of the cart\n\n for (int i = -getRange(); i <= getRange(); i++) {\n for (int j = -getRange(); j <= getRange(); j++) {\n // calculate the coordinates of this \"hole\"\n int coordX = x + i;\n int coordY = y - 1;\n int coordZ = z + j;\n\n if (farm(coordX, coordY, coordZ)) {\n return true;\n } else if (till(coordX, coordY, coordZ)) {\n return true;\n } else if (plant(coordX, coordY, coordZ)) {\n return true;\n }\n }\n }\n\n return false;\n }", "boolean hasGrid();", "public boolean containsLoc(final Location3D loc) {\n\t\tif (loc == null || !loc.getWorld().equals(highPoint.getWorld())) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn lowPoint.getBlockX() <= loc.getBlockX()\n\t\t\t\t&& highPoint.getBlockX() >= loc.getBlockX()\n\t\t\t\t&& lowPoint.getBlockZ() <= loc.getBlockZ()\n\t\t\t\t&& highPoint.getBlockZ() >= loc.getBlockZ()\n\t\t\t\t&& lowPoint.getBlockY() <= loc.getBlockY()\n\t\t\t\t&& highPoint.getBlockY() >= loc.getBlockY();\n\t}", "public boolean isInThing(Graphics2D g, CoordinateMapper cm, int worldX, int worldY){\n\t\treturn false;\n/*\n\t\treturn((worldX >= t.getX1()) &&\n\t\t\t(worldX <= t.getX2()) &&\n\t\t\t(worldY >= t.getY1()) &&\n\t\t\t(worldY <= t.getY2()));\n\t\t\t*/\n\t}", "boolean checkCreatureInAdjacentCells(CreatureType creatureType);", "public boolean isSafe(Location location) {\r\n\r\n\t\tLocation northNeighbor = map.getLocation(location, Direction.NORTH);\r\n\t\tLocation southNeighbor = map.getLocation(location, Direction.SOUTH);\r\n\t\tLocation eastNeighbor = map.getLocation(location, Direction.EAST);\r\n\t\tLocation westNeighbor = map.getLocation(location, Direction.WEST);\r\n\r\n\t\tArrayList<Location> neighbors = new ArrayList<Location>(4);\r\n\t\tneighbors.add(northNeighbor);\r\n\t\tneighbors.add(southNeighbor);\r\n\t\tneighbors.add(eastNeighbor);\r\n\t\tneighbors.add(westNeighbor);\r\n\r\n\t\tif (northNeighbor.getSite().owner == myID && southNeighbor.getSite().owner == myID &&\r\n\t\t\t\teastNeighbor.getSite().owner == myID && westNeighbor.getSite().owner == myID){\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\treturn false;\r\n\r\n\t}", "public boolean isInsideZone(int x, int y, int z)\r\n\t{\r\n\t\tboolean inside = false;\r\n\t\tfor (Shape sh : _shapes)\r\n\t\t{\r\n\t\t\tif (sh.contains(x, y, z))\r\n\t\t\t{\r\n\t\t\t\tinside = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (_exShapes != null && inside)\r\n\t\t{\r\n\t\t\tfor (Shape sh : _exShapes)\r\n\t\t\t{\r\n\t\t\t\tif (sh.contains(x, y, z))\r\n\t\t\t\t{\r\n\t\t\t\t\tinside = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn inside;\r\n\t}", "public boolean isWalkable() {\n return type != CellType.WALL && isInBoundaries();\n }", "boolean isBound();", "public boolean canSpawnLightningBolt()\n {\n return this.func_150559_j() ? false : this.enableRain;\n }", "protected boolean isFinished() {\n \tif (Robot.clawElevator.getContainerHeight() == 0) {\n \t\treturn Robot.clawElevator.getLowerSwitch();\n \t} else {\n \t\treturn Robot.clawElevator.getLowerSwitch() || Robot.clawElevator.isAtIntemediateStop(Math.abs(Robot.clawElevator.getContainerHeight() - 3), false);\n \t}\n }", "public boolean isInsideZone(L2Object object)\r\n\t{\r\n\t\treturn isInsideZone(object.getX(), object.getY(), object.getZ());\r\n\t}", "private boolean isInDoor(Entity player){\n Sprite playerSprite= (Sprite) player.getComponent(Sprite.class);\n for(int i = 0; i<Main.colliderWallMap.size(); i++){\n if(Main.colliderWallMap.get(i).intersects(playerSprite.getValue().getX(), playerSprite.getValue().getY(),playerSprite.getValue().getWidth(), playerSprite.getValue().getHeight())){\n return false;\n }\n }\n\n return true;\n }" ]
[ "0.6801204", "0.6786711", "0.67398334", "0.6665115", "0.6641679", "0.6616575", "0.65743726", "0.6553889", "0.64463276", "0.6414243", "0.6413001", "0.6343317", "0.62933403", "0.62562084", "0.6234022", "0.6233812", "0.6223363", "0.62072766", "0.61875194", "0.61775625", "0.6175051", "0.61657333", "0.6137372", "0.6136421", "0.61316484", "0.612614", "0.611796", "0.61126107", "0.6096165", "0.6096165", "0.60826033", "0.60744613", "0.6052724", "0.60189575", "0.60072255", "0.600069", "0.5991371", "0.5976941", "0.5947783", "0.59381133", "0.59381133", "0.5937531", "0.5932323", "0.5908777", "0.5868514", "0.58679575", "0.58548516", "0.5844314", "0.5836934", "0.583079", "0.5808759", "0.58044535", "0.57964504", "0.5785491", "0.57817537", "0.5780206", "0.57649326", "0.5759989", "0.575159", "0.5747928", "0.5738582", "0.5738007", "0.5730198", "0.572746", "0.57147324", "0.5712641", "0.5704329", "0.57022446", "0.57022446", "0.57022446", "0.5694415", "0.5683114", "0.56828797", "0.5682208", "0.56779134", "0.5676864", "0.5672649", "0.5668356", "0.56580985", "0.5652393", "0.564554", "0.5632001", "0.5630645", "0.5628171", "0.5627765", "0.56256247", "0.5622425", "0.5617358", "0.5615706", "0.56128657", "0.5599209", "0.55991954", "0.5597641", "0.5572523", "0.5570385", "0.5563159", "0.5560149", "0.55506325", "0.55481976", "0.554753" ]
0.8007499
0
Gets if the location's region is spawn
public boolean isSpawn(Location loc) { return RegionManager.get().hasTag(loc, "spawn"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSpawn()\n\t{\n\t\treturn block == Block.FRUIT_SPAWN || block == Block.GHOST_SPAWN || block == Block.PAC_SPAWN;\n\t}", "public boolean isOuterSpawn(Location loc) {\n\t\treturn RegionManager.get().hasTag(loc, \"outer-spawn\");\n\n\t}", "public boolean isSpawnable(Location loc) {\n Block block = loc.getBlock();\n Block under = loc.getBlock().getRelative(BlockFace.DOWN);\n Block above = loc.getBlock().getRelative(BlockFace.UP);\n if (block.getType().equals(Material.AIR) && !under.getType().equals(Material.AIR) && above.getType().equals(Material.AIR)) {\n if (block.getLightLevel() <= plugin.CONFIG.SPAWNING_LIGHT) {\n return true;\n }\n }\n return false;\n }", "public boolean inRegion(Location loc)\n {\n if (!loc.getWorld().getName().equals(world.getName()) || !setup)\n return false;\n \n int x = loc.getBlockX();\n int y = loc.getBlockY();\n int z = loc.getBlockZ();\n \n // Check the lobby first.\n if (lobbySetup)\n {\n if ((x >= l1.getBlockX() && x <= l2.getBlockX()) && \n (z >= l1.getBlockZ() && z <= l2.getBlockZ()) && \n (y >= l1.getBlockY() && y <= l2.getBlockY()))\n return true;\n }\n \n // Returns false if the location is outside of the region.\n return ((x >= p1.getBlockX() && x <= p2.getBlockX()) && \n (z >= p1.getBlockZ() && z <= p2.getBlockZ()) && \n (y >= p1.getBlockY() && y <= p2.getBlockY()));\n }", "@Override\n\tpublic boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint i = worldObj.getFirstUncoveredBlock(par1, par2);\n\t\tif (i == 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn Block.blocksList[i].blockMaterial.blocksMovement();\n\t\t}\n\t}", "public boolean inGoalRegion() {\n return position >= GOAL_POSITION;\n }", "public boolean isSpawnPoint() {\n return isSpawnPoint;\n }", "boolean haveAnySpawn();", "public boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint var3 = this.worldObj.getFirstUncoveredBlock(par1, par2);\n\t\treturn var3 == 0 ? false : Block.blocksList[var3].blockMaterial.blocksMovement();\n\t}", "boolean hasLocation();", "boolean hasLocation();", "public boolean getCanSpawnHere()\r\n {\r\n return false;\r\n }", "public boolean getCanSpawnHere()\n {\n return this.isValidLightLevel() && super.getCanSpawnHere();\n }", "public boolean inRegionRadius(Location loc, int radius)\n {\n if (!loc.getWorld().getName().equals(world.getName()) || !setup)\n return false;\n \n int x = loc.getBlockX();\n int y = loc.getBlockY();\n int z = loc.getBlockZ();\n \n // Check the lobby first.\n if (lobbySetup)\n {\n if ((x + radius >= l1.getBlockX() && x - radius <= l2.getBlockX()) && \n (z + radius >= l1.getBlockZ() && z - radius <= l2.getBlockZ()) && \n (y + radius >= l1.getBlockY() && y - radius <= l2.getBlockY()))\n return true;\n }\n \n return ((x + radius >= p1.getBlockX() && x - radius <= p2.getBlockX()) &&\n (z + radius >= p1.getBlockZ() && z - radius <= p2.getBlockZ()) &&\n (y + radius >= p1.getBlockY() && y - radius <= p2.getBlockY()));\n }", "public boolean canCoordinateBeSpawn(int par1, int par2)\n {\n return false;\n }", "public boolean hasLocation()\n {\n return targetLocation != null;\n }", "private boolean isOccupied(Location loc)\n\t{\n\t\treturn grid[loc.getRow()][loc.getCol()] != null;\n\t}", "public Location getSpawnLocation() {\n return this.spawnLocation;\n }", "private boolean checkInsideZone() {\n for (Zone z : shiftZones) {\n if (PolyUtil.containsLocation(userLocation, Arrays.asList(z.getCoords()), true)) {\n return true;\n }\n }\n return false;\n }", "private Location verifyLocation(Location location)\n {\n Block playerBlock = location.getBlock();\n World world = location.getWorld();\n\n if (rootC.getStringList(RootNode.WORLDS).contains(world.getName()))\n {\n // Only spawn monsters in normal world. End is crowded with endermen\n // and nether is too extreme anyway, add config later\n int lightLvl = location.getBlock().getLightFromSky();\n if (world.getEnvironment() == Environment.NORMAL\n && (location.getY() < rootC.getInt(RootNode.MORE_MONSTERS_MAX_Y) && lightLvl < 3))\n {\n // the playerBlock should always be air, but if the player stands\n // on a slab he actually is in the slab, checking a few blocks under because player could have jumped etc..\n if (playerBlock.getType().equals(Material.AIR))\n {\n for (int i = 0; i <= 3; i++)\n {\n playerBlock = location.getBlock().getRelative(BlockFace.DOWN, 1);\n\n if (playerBlock.getType().equals(Material.AIR))\n {\n location.subtract(0, 1, 0);\n playerBlock = location.getBlock();\n // the playerBlock is now the block where the monster\n // should spawn on, next up: verify block\n }\n else\n {\n break;\n }\n }\n }\n // no spawning on steps, stairs and transparent blocks\n if (playerBlock.getType().name().endsWith(\"STEP\") || playerBlock.getType().name().endsWith(\"STAIRS\")\n || playerBlock.getType().isTransparent() || !playerBlock.getType().isOccluding() || playerBlock.getType().equals(Material.AIR))\n {\n // don't spawn here\n return null;\n }\n\n if (quickVerify(location))\n return location;\n }\n\n }\n return null;\n }", "public boolean isMine(int x, int y);", "public boolean hasLocation()\n\t{\n\t\treturn location != null;\n\t}", "public boolean hasRegionLocationMatrix() {\n return regionLocationMatrixBuilder_ != null || regionLocationMatrix_ != null;\n }", "private boolean getValidRespawnPosition(int x, int y, int imageW, int imageH) {\n\t\tRectangle iRect = new Rectangle(x, y, imageW, imageH);\n\t\t// dont spawn on a wall\n\t\tfor (Wall w : wallArray) {\n\t\t\tRectangle wRect = w.getBounds();\n\t\t\tif (iRect.intersects(wRect)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// dont spawn on a powerup\n\t\tfor (Powerup p : powerupArray) {\n\t\t\tRectangle pRect = p.getBounds();\n\t\t\tif (iRect.intersects(pRect)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "@java.lang.Override\n public boolean hasRegionLocationMatrix() {\n return regionLocationMatrix_ != null;\n }", "public boolean isAssignedToLocation() {\n if (location == null) {\n return false;\n }\n return true;\n }", "@Override\n\tpublic void onSpawn()\n\t{\n\t\tsetIsNoRndWalk(true);\n\t\tsuper.onSpawn();\n\n\t\t// check the region where this mob is, do not activate the AI if region is inactive.\n\t\tL2WorldRegion region = WorldManager.getInstance().getRegion(getX(), getY());\n\t\tif(region != null && !region.isActive())\n\t\t{\n\t\t\tgetAI().stopAITask();\n\t\t}\n\t}", "public static boolean isInColosseum(Location loc) {\n\t\tif (!(loc.getWorld() == Bukkit.getWorld(\"redacted2\"))) return false;\n\t\t// bad hotfix\n\t\tif (loc.clone().add(0, -1, 0).getBlock().getType() == Material.GRASS) return false;\n\t\tint locX = loc.getBlockX();\n\t\tint locY = loc.getBlockY();\n\t\tint locZ = loc.getBlockZ();\n\t\t//Test if player is in main launcher ignore box\n\t\t// -4 98 10 to -23 30 23 - ignore zone for main launcher\n\t\tif (-23 <= locX && locX <= -4 && 30 <= locY && locY <= 98 && 10 <= locZ && locZ <= 23) return false;\n\t\t//Test if player is in side launcher ignore box\n\t\t//-4 98 98 to -25 30 75 - ignore zone for side launcher\n\t\tif (-25 <= locX && locX <= -4 && 30 <= locY && locY <= 98 && 75 <= locZ && locZ <= 98) return false;\n\t\t//If the player is not in either of the ignore boxes, check if they are in the colosseum boundaries\n\t\t//-4 98 10 to -100 30 98 - Colosseum boundaries\n\t\tif (-100 <= locX && locX <= -4 && 30 <= locY && locY <= 98 && 10 <= locZ && locZ <= 98) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean hasLocationView();", "boolean isGoodLocation(World world, int x, int y, int z);", "public Location mainSpawn(){\r\n\t\treturn mainSpawn;\r\n\t}", "public boolean isOnGround() {\n return this.sim_pos.getY() <= 2;\n }", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "public boolean isInside(){\n\t\tinside = true;\n\t\tif(map.contains(new Rectangle(x,y,(int)spriteSize.getHeight(), (int)spriteSize.getWidth()))==false){\n\t\t\tinside = false;\n\t\t}\n\t\treturn(inside);\n\t}", "private boolean canSelectCurWorldType() {\n WorldType worldtype = WorldType.WORLD_TYPES[this.selectedIndex];\n if (worldtype != null && worldtype.canBeCreated()) {\n return worldtype == WorldType.DEBUG_ALL_BLOCK_STATES ? hasShiftDown() : true;\n } else {\n return false;\n }\n }", "private boolean isAtStation(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().getStationName() != null){return true; }\n else { return false; }\n }", "public boolean canMove (Location loc) {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return false;\n if (!gr.isValid(loc))\n return false;\n Actor neighbor = gr.get(loc);\n return !(neighbor instanceof Wall);\n }", "boolean hasCoordInfo();", "public boolean isWarp()\n\t{\n\t\treturn block == Block.WARP_SPACE;\n\t}", "public static boolean isFinishedCity()\r\n {\r\n try\r\n {\r\n Building b = astApp.getBuildings().get( astApp.getBuildings().size() - 1 );\r\n \r\n if( b.getBuilding().getXLocation() + b.getBuilding().getWidth() >= 700 )\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n catch( ArrayIndexOutOfBoundsException e )\r\n {\r\n return false;\r\n }\r\n }", "boolean hasGeoTargets();", "public boolean canSpawnLightningBolt()\n {\n return this.func_150559_j() ? false : this.enableRain;\n }", "boolean hasWorldid();", "boolean hasWorldid();", "public boolean isAtLocation(Location loc) {\n return loc.equals(loc);\n }", "public boolean hasLocation() {\n return fieldSetFlags()[3];\n }", "public boolean structureWillSpawn(int xRegion, int zRegion, int xRandom, int zRandom, BiomeGenerator generator){\n if(\t\tgenerator.getBiomeAt(xRegion * 512 + xRandom * 16 + 8, zRegion * 512 +zRandom * 16 + 8) == 24 &&\n isValidBiome(xRegion * 512 + xRandom * 16 + 8, zRegion * 512 +zRandom * 16 + 8, 29, validSurroundingBiomes, generator))\n return true;\n return false;\n }", "private final boolean isInsideWorld() {\n\t\t// Check it is inside the world\n\t\tif (x<=0 || y<=0 || x+width>=_world.getWidth() || y+height>=_world.getHeight()) {\n\t\t\tif (_mass == 0 && alive && x == 0 && y == 0)\n\t\t\t\tdie(this);\n\t\t\t// Adjust direction\n\t\t\tif (x <= 0 || x + width >= _world.getWidth())\n\t\t\t\tdx = -dx;\n\t\t\tif (y <= 0 || y + height >= _world.getHeight())\n\t\t\t\tdy = -dy;\n\t\t\tdtheta = 0;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean canMove(Location loc){\n if(loc.getX() >= theWorld.getX() || loc.getX() < 0){\n System.out.println(\"cant move1\");\n return false;\n }else if(loc.getY() >= theWorld.getY() || loc.getY() < 0){\n System.out.println(\"cant move2\");\n return false;\n }else{\n System.out.println(\"can move\");\n return true;\n }\n }", "SpawnType getGameSpawnType();", "private boolean isInstanceLocationSet() {\n \t\tActivator activator = Activator.getDefault();\n \t\tif (activator == null)\n \t\t\treturn false;\n \t\tLocation service = activator.getInstanceLocation();\n \t\tif (service == null)\n \t\t\treturn false;\n \t\treturn service.isSet();\n \t}", "public ImmutableSimpleLocation getSpawn() {\n return spawn;\n }", "public boolean isCellAlive(int x, int y) {\n return this.startGeneration[x][y];\n }", "boolean hasGeoTargetConstant();", "private boolean compareLocation(Location location){\n return location.getBlockX()==this.location.getBlockX() && location.getBlockY()==this.location.getBlockY() && location.getBlockZ() == this.location.getBlockZ();\n }", "boolean isLocator();", "public boolean isMine() {\r\n\t\treturn isMine;\r\n\t}", "boolean isPlaced();", "public boolean canInteractWithBlock(Player player, Location location) {\n\t\tif (mayor.equals(player.getUniqueId()) || councils.containsKey(player.getUniqueId())) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tPlot plot = getPlotHere(location);\n\t\t\treturn (inhabitants.contains(player.getUniqueId()) && plot == null) || (plot != null && plot.canBuild(player, location));\n\t\t}\n\t}", "public boolean checkForLotus(){\n Object obj=charactersOccupiedTheLocation[2];\n if(obj!=null){return true;}\n return false;\n }", "public boolean checkForTreasure(){\n Object obj=charactersOccupiedTheLocation[3];\n if(obj!=null){return true;}\n return false; \n }", "public boolean placementDone() {return placedShips == 4;}", "public static Boolean isChest(Location loc){\n\t\tif(loc.getBlock() != null){\n\t\t\tif(loc.getBlock().getType() == Material.CHEST){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "private boolean atLeastOneNonWallLocation() {\n\t\tfor (int x = 0; x < this.map.getMapWidth(); x++) {\n\t\t\tfor (int y = 0; y < this.map.getMapHeight(); y++) {\n\n\t\t\t\tif (this.map.getMapCell(new Location(x, y)).isWalkable()) {\n\t\t\t\t\t// If it's not a wall then we can put them there\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public abstract boolean canMoveTo(Case Location);", "boolean hasOrigin();", "boolean hasOrigin();", "boolean getIsOccupation();", "@Override\n public boolean locationIsLeg(int loc) {\n return (loc == LOC_LLEG) || (loc == LOC_RLEG);\n }", "public boolean isThereStandingShips() {\r\n\t\r\n\t/*\t\r\n\t\tint SIZE = 100;\r\n\t\tint state = 0;\r\n\t\tboolean shipPresent = false;\r\n\t\tint x = 0, y = -1;\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tif (i % 10 == 0) {\r\n\t\t\t\tx = 0;\r\n\t\t\t\ty = y + 1;\r\n\t\t\t}\r\n\t\t\tstate = shipStateMap.get(new Point(x, y));\r\n\t\t\tif (state == 1)\r\n\t\t\t\tshipPresent = true;\r\n\t\t\tx++;\r\n\t\t}\r\n\t\treturn shipPresent;\r\n\t*/\r\n\r\n\t\treturn (numberOfAllowedShotsRemaining!=0);\r\n\t}", "boolean hasLatitude();", "boolean hasLatitude();", "boolean hasStartPosition();", "boolean hasStartPosition();", "boolean land();", "boolean hasLocationNames();", "public boolean onGround() {\n return getLocation().getY() <= 0 || (interactingWithY != null && interactingWithY.getLocation().getY() + interactingWithY.size.height <= getLocation().getY());\n }", "public Point getSpawn() {\n\t\treturn spawn;\n\t}", "public boolean hitOrStand(){\r\n\t\treturn hitOrStand;\r\n\t}", "public boolean isChromosome() {\n return this.placement.getSeqId().startsWith(\"NC_\");\n }", "public boolean canSpawnMore() {\n for(int e: enemiesLeft) {\n if(e > 0) {\n return true;\n }\n }\n\n return false;\n }", "public boolean hasLocation() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "boolean hasAuvLoc();", "private boolean isUnderground(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().isUnderground() == true){return true; }\n else{ return false; }\n }", "private boolean canEntityBuild(User user, Location location) {\n Collection<TownBlock> blocks = TownyUniverse.getInstance().getDataSource().getAllTownBlocks();\n\n int x = (int)Math.floor(location.getX() / 16.0);\n int z = (int)Math.floor(location.getZ() / 16.0);\n\n TownyWorld world;\n try {\n world = TownyUniverse.getInstance().getDataSource().getWorld(location.getWorld().getName());\n } catch (Exception e) {\n return true;\n }\n\n TownBlock block = new TownBlock(x, z, world);\n\n return !blocks.contains(block);\n }", "public Location alliesSpawn(){\r\n\t\treturn alliesSpawn;\r\n\t}", "public boolean isInPlanet() {\n return this.currentPlanet != null;\n }", "private boolean towerLocation(final Point current_point) {\r\n\t\tfor (int i = 0; i < my_towers.size(); i++) {\r\n\t\t\tif (my_towers.get(i).getLocation().equals(current_point)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isProjectile();", "boolean hasLongitude();", "boolean hasLongitude();", "boolean canPlaceCity(VertexLocation vertLoc);", "public boolean hasLocation() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "boolean hasNextHopRegion();", "boolean hasCoordinates();", "boolean hasCoordinates();" ]
[ "0.7408096", "0.72347", "0.7034431", "0.69925076", "0.69912094", "0.69151825", "0.6895418", "0.68504786", "0.68436444", "0.6759964", "0.6759964", "0.6431158", "0.6409287", "0.638271", "0.63823324", "0.6380092", "0.6271374", "0.62176144", "0.6165845", "0.612439", "0.6114365", "0.6090946", "0.6089611", "0.6083531", "0.6073036", "0.6067208", "0.6065591", "0.6062793", "0.60316515", "0.6027645", "0.6025121", "0.6011817", "0.5982337", "0.59696615", "0.5956601", "0.59270704", "0.59110487", "0.59028554", "0.5894092", "0.5888611", "0.5869074", "0.58587635", "0.5854438", "0.5854438", "0.585223", "0.58511615", "0.5850328", "0.5846141", "0.5824585", "0.5824516", "0.5822788", "0.58212745", "0.582033", "0.58199716", "0.58154356", "0.5809078", "0.5804034", "0.57931936", "0.57908547", "0.5775847", "0.5751488", "0.57349557", "0.57300705", "0.572926", "0.572926", "0.572926", "0.572926", "0.5722519", "0.5705361", "0.57027316", "0.57027316", "0.5702147", "0.57005566", "0.56916195", "0.5690846", "0.5690846", "0.5684881", "0.5684881", "0.56839573", "0.5679468", "0.5678747", "0.5673172", "0.56730527", "0.566179", "0.5658035", "0.5653416", "0.5638834", "0.5637366", "0.56286436", "0.56271374", "0.56264573", "0.5620743", "0.5614042", "0.56081766", "0.56081766", "0.5607171", "0.5597888", "0.55968744", "0.55966866", "0.55966866" ]
0.7763035
0
Gets if blow flow should be prevented on the block
public boolean shouldPreventFlow(Block b) { return !b.hasMetadata("flow"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isBlocked() {\n return block_state <= 1;\n }", "private boolean isStepBlocked(Step step){\n return step.getOverlays().stream().anyMatch( o -> o instanceof Blockable );\n }", "public boolean isProhibited() {\n return getFlow().isProhibited();\n }", "@Override\n public boolean block() {\n return false;\n }", "public Boolean isBlocked() {\n return this.blocked;\n }", "@Override\r\n\tpublic boolean isBlocked() {\r\n\t\tif (this.status.equals(Status.BLOCKED)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@java.lang.Override\n public boolean getBlocked() {\n return instance.getBlocked();\n }", "public boolean getBlocked() { return this.blocked; }", "public boolean isActionBlock() {\n return false;\n }", "public boolean checkBlockX()\n {\n if (mBlockedTime == 0)\n {\n return false;\n }\n\n double tBlockDelay = mBlockedTime - time();\n mBlockedTime = 0;\n if (tBlockDelay <= 0)\n {\n return false;\n }\n mBlockedMessage.add(mName + \" GC blocked from \" + time() + \" + until \" + (time() + tBlockDelay));\n hold(tBlockDelay);\n out();\n return true;\n }", "@Override\n\tpublic boolean isBlocked() {\n\t\treturn this.parent.isBlocked(this);\n\t}", "@Override\r\n\tprotected boolean shouldBlock(Entity e) {\n\t\treturn super.shouldBlock(e);\r\n\t}", "@java.lang.Override\n public boolean getBlocked() {\n return blocked_;\n }", "public Boolean getBlocked() {\n return this.blocked;\n }", "public boolean isCanBypassIntermediate() {\n return getFlow().isCanBypassIntermediate();\n }", "public abstract boolean isNextBlocked();", "public boolean checkIfBlocked(){\n\t\tsetNextXY();\n\t\t/*if(Physics.hitWall(this, game.wi)){\n\t\t\tblocked=true;\n\t\t}\n\t\telse{\n\t\t\tblocked=false;\n\t\t}\n\t\t*/\n\t\t\n\t\ttry{\n\t\t\tif(game.getController().wallArray[lastX][lastY]||game.getController().wallArray[nextX][nextY]){\n\t\t\t\treturn true;\n\t\t\t}\t\n\t\t}catch(IndexOutOfBoundsException x){\n\t\t\t\n\t\t\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "private boolean isBlocked(View v){\n\t\treturn !v.mayMove(facingDirection);\n\t}", "public boolean steamFailure() {\n double steam = this.steamMessage.getDoubleParameter();\n if (steam < 0) {\n return true;\n }\n if (steam > this.configuration.getMaximualSteamRate()) {\n return true;\n }\n return false;\n }", "private boolean blowBlockUp(final Location at, String eventTypeRep) {\n if (at == null) {\n return false;\n }\n Block block = at.getBlock();\n if (block == null) {\n return false;\n }\n if (block.getType() == Material.AIR) {\n return false;\n }\n\n if (!MaterialManager.getInstance().contains(block.getType().name())) {\n return false;\n }\n\n if (eventTypeRep.equals(\"CraftTNTPrimed\") && !MaterialManager.getInstance().getTntEnabled(block.getType().name())) {\n return false;\n }\n if (eventTypeRep.equals(\"CraftSnowball\") && !MaterialManager.getInstance().getCannonsEnabled(block.getType().name())) {\n return false;\n }\n if (eventTypeRep.equals(\"CraftCreeper\") && !MaterialManager.getInstance().getCreepersEnabled(block.getType().name())) {\n return false;\n }\n if (eventTypeRep.equals(\"CraftWither\") && !MaterialManager.getInstance().getWithersEnabled(block.getType().name())) {\n return false;\n }\n if (eventTypeRep.equals(\"CraftMinecartTNT\") && !MaterialManager.getInstance().getTntMinecartsEnabled(block.getType().name())) {\n return false;\n }\n if ((eventTypeRep.equals(\"CraftFireball\") || eventTypeRep.equals(\"CraftGhast\")) && !MaterialManager.getInstance().getGhastsEnabled(block.getType().name())) {\n return false;\n }\n\n if (MaterialManager.getInstance().getDurabilityEnabled(block.getType().name()) && MaterialManager.getInstance().getDurability(block.getType().name()) > 1) {\n TimerState state = checkDurabilityActive(block.getLocation());\n if (ConfigManager.getInstance().getEffectsEnabled()) {\n final double random = Math.random();\n if (random <= ConfigManager.getInstance().getEffectsChance()) {\n block.getWorld().playEffect(at, Effect.MOBSPAWNER_FLAMES, 0);\n }\n }\n if (state == TimerState.RUN || state == TimerState.INACTIVE) {\n int currentDurability = getMaterialDurability(block);\n currentDurability++;\n if (checkIfMax(currentDurability, block.getType().name())) {\n // counter has reached max durability, remove and drop an item\n dropBlockAndResetTime(at);\n } else {\n // counter has not reached max durability damage yet\n if (!MaterialManager.getInstance().getDurabilityResetTimerEnabled(block.getType().name())) {\n addBlock(block, currentDurability);\n } else {\n startNewTimer(block, currentDurability, state);\n }\n }\n } else {\n if (!MaterialManager.getInstance().getDurabilityResetTimerEnabled(block.getType().name())) {\n addBlock(block, 1);\n } else {\n startNewTimer(block, 1, state);\n }\n if (checkIfMax(1, block.getType().name())) {\n dropBlockAndResetTime(at);\n }\n }\n } else {\n destroyBlockAndDropItem(at);\n }\n return true;\n }", "public boolean isUnblockable();", "@Override\n\tpublic boolean isDenied();", "@Override\n\tpublic boolean isNotBreak() {\n\t\treturn false;\n\t}", "public void blockedAndBlock(){\n\t\tif(player.isAttacking() && random(BASE_BLOCK_PERCENTAJE + ((double)difficulty)/10)){\n\t\t\tplayer.hasBeenBlocked();\n\t\t\tthis.setCurrentAnimation(\"blocked and prepare block_\" + orientation, FRAME_DURATION);\n\t\t\tmanageSword(\"blocked and prepare block\", 0, false);\n\t\t} else{\n\t\t\tthis.setCurrentAnimation(\"attack end blocked_\" + orientation, FRAME_DURATION);\n\t\t\tmanageSword(\"attack end blocked\", 0, false);\n\t\t}\n\t}", "public boolean isBlocking ( ) {\n\t\treturn extract ( handle -> handle.isBlocking ( ) );\n\t}", "public boolean shouldContinueExecuting() {\n return ShulkerEntity.this.getAttackTarget() == null && this.peekTime > 0;\n }", "@Override\n\tpublic boolean isDenied() {\n\t\treturn model.isDenied();\n\t}", "@NonNull boolean canBreakWithHand();", "final boolean isRobotBlocked() {\n return mIsBlocked;\n }", "private boolean shouldStopBeingCombatEngineer() {\r\n\t\tdouble machineUnitsCount = this.getNumberOfMachineUnits();\r\n\t\tdouble combatEngineers = this.informationStorage.getWorkerConfig().getTotalCombatEngineerCount();\r\n\r\n\t\treturn combatEngineers / machineUnitsCount >= this.combatEngineerTriggerPercentageCancel;\r\n\t}", "public boolean isCurrentSourceBlocked() {\n\t\treturn mTVInputManager.isBlock(iGetCurrentSouce());\n\t}", "private boolean isBlocked(Intent intent)\n {\n String newState = intent.getStringExtra(PortalDetectorService.EXTRA_PORTAL_STATE);\n \n return !(State.NO_PORTAL.equals(newState) || State.SIGNED_IN.equals(newState));\n }", "public Boolean isProhibited() {\n throw new NotImplementedException();\n }", "public Boolean shouldAbandon() {\n return false;\n }", "public boolean isExempt();", "public boolean isBlockingTo(Entity wantsToMoveHere)\n\t{\n\t\treturn false;\n\t}", "public boolean shouldContinue() {\n return !shouldBreak;\n }", "boolean isBlockedBy(Task otherTask);", "protected boolean inSomeBlock() {\n return !enclosingBlocks.isEmpty();\n }", "public boolean getIsFlow() {\r\n return !isFlow.get();\r\n }", "public boolean isBlocking() {\n return blocking;\n }", "private void blockedPathNoBeepers() {\n\t\twhile (frontIsBlocked() && noBeepersPresent()) {\n\t\t\tturnLeft();\n\t\t\tturnLeft();\n\t\t} \n\t\tmove();\n\t\tturnRight();\n\t}", "boolean blockUser(User user);", "public boolean canAttackWithItem() {\n/* 215 */ return false;\n/* */ }", "public boolean hasBreakPermission(Player player, Block block) {\n if (bypassBreakPermissions) return true;\n if (player != null && player.hasPermission(\"magic.bypass_break\")) return true;\n if (hasBypassPermission(player)) return true;\n\n boolean allowed = true;\n for (BlockBreakManager manager : blockBreakManagers) {\n if (!manager.hasBreakPermission(player, block)) {\n allowed = false;\n break;\n }\n }\n\n return allowed;\n }", "boolean hasSkipMessage();", "public boolean isBypassable() {\n return mIsBypassable;\n }", "@Override\r\n\tpublic StateBruceDanner swallowSubstance() {\n\t\treturn NON_CONTAMINED;\r\n\t}", "public boolean isCanBreak() {\n\t\treturn canBreak;\n\t}", "boolean shouldBreak(BreakAction a, int fileId, int line)\n\t{\n\t\tboolean should = a.isEnabled();\n\t\tValueExp exp = a.getCondition();\n\t\tif (should && exp != null && !m_requestHalt) // halt request fires true\n\t\t{\n\t\t\t// evaluate it then update our boolean\n\t\t\ttry\n\t\t\t{\n\t\t\t\tEvaluationResult result = evalExpression(exp, false);\n\t\t\t\tif (result != null)\n\t\t\t\t\tshould = ECMA.toBoolean(result.context.toValue(result.value));\n\t\t\t}\n\t\t\tcatch(NullPointerException npe) {}\n\t\t\tcatch(NumberFormatException nfe) {}\n\t\t}\n\t\treturn should;\n\t}", "public boolean canHarvestBlock(Block par1Block)\r\n\t{\r\n\t\treturn par1Block == Block.snow ? true : par1Block == Block.blockSnow;\r\n\t}", "@Override\n\tpublic boolean performsBlockAnimation() {\n\t\treturn false;\n\t}", "@Override\n public boolean isEffectOnCardPrevented(PhysicalCard card) {\n return _preventedCards.contains(card);\n }", "public boolean isAbortable();", "@Override\n\tpublic boolean canPassengerSteer() {\n\t\treturn false;\n\t}", "public boolean canAttackWithItem() {\n/* 253 */ return false;\n/* */ }", "Block getTryBlock();", "public boolean canHarvestBlock(Block var1)\r\n {\r\n return var1.blockID == Block.web.blockID;\r\n }", "@Override\n boolean check(PixelLogicEvent event) {\n if (event instanceof PixelLogicLevelStatusChangeEvent) {\n PixelLogicLevelStatusChangeEvent statusChangeEvent = (PixelLogicLevelStatusChangeEvent) event;\n PixelLogicLevel level = statusChangeEvent.getLevel();\n // 6x6, 5*7, 4*8 are all ok\n if (PixelLogicLevelStatus.loaded.equals(statusChangeEvent.getStatus())) {\n this.isThePuzzelBigEnough = level.getRows() * level.getColumns() >= 32;\n this.blocked = false;\n return false;\n }\n }\n // reset on board is empty\n if (event instanceof PixelLogicBoardChangedEvent) {\n PixelLogicBoardChangedEvent changedBoardEvent = (PixelLogicBoardChangedEvent) event;\n if (changedBoardEvent.getLevel().isEmpty()) {\n this.blocked = false;\n }\n }\n if (this.isThePuzzelBigEnough == null || this.blocked == null || !this.isThePuzzelBigEnough || this.blocked) {\n return false;\n }\n // check if level is solved or destroyed\n if (event instanceof PixelLogicLevelStatusChangeEvent) {\n PixelLogicLevelStatusChangeEvent statusChangeEvent = (PixelLogicLevelStatusChangeEvent) event;\n PixelLogicLevelStatus status = statusChangeEvent.getStatus();\n if (PixelLogicLevelStatus.solved.equals(status)) {\n // ignore certain level's\n PixelLogicLevel level = statusChangeEvent.getLevel();\n if (\"Heart\".equals(level.getName()) || \"Windows\".equals(level.getName())) {\n return false;\n }\n // achievement reached\n return !this.blocked;\n }\n if (PixelLogicLevelStatus.destroyed.equals(status)) {\n this.isThePuzzelBigEnough = null;\n this.blocked = null;\n return false;\n }\n }\n // check if something is blocked by the user\n if (event instanceof PixelLogicBoardChangedEvent) {\n PixelLogicBoardChangedEvent changedBoardEvent = (PixelLogicBoardChangedEvent) event;\n Boolean value = changedBoardEvent.getValue();\n if (changedBoardEvent.isPixelChanged()) {\n if (value != null && !value) {\n this.blocked = true;\n }\n return false;\n }\n }\n return false;\n }", "public boolean partOfInterruptible() {\r\n\t\tif (parent != null)\r\n\t\t\tif (parent instanceof ActivityFlow)\r\n\t\t\t\treturn ((ActivityFlow)parent).isInterruptible();\r\n\t\treturn false;\r\n\t}", "public synchronized void block() {\n\t\tsetBlocked(true);\n\t}", "public boolean onBlockExploded(Explosion ex) {\n\t\treturn true;\n\t}", "public boolean isTheSourceBlocked(String inputsource) {\n\t\treturn mTVInputManager.isBlock(inputsource);\n\t}", "public static boolean isSafeBlock(Block block)\n \t{\n \t\treturn isSafeMaterial(block.getType());\n \t}", "public boolean isCaught() {\n\t\tboolean temp = pokemon.catchCheck();\n\t\tif (temp) {\n\t\t\ttrainer.addPokemon(pokemon);\n\t\t}\n\t\treturn temp;\n\t}", "public boolean isBancrupt(){\r\n \treturn _budget <= 0;\r\n }", "public boolean isUnbreakable() {\n return unbreakable;\n }", "synchronized boolean ignoreForRecovery() {\n return ignoreForRecovery;\n }", "public boolean isSuppressed();", "public SAFENESS isSafe(boolean allowWater, Material blockBelowFeet) {\r\n\t\t// check below feet\r\n\t\tif((!(blockBelowFeet.isSolid() || blockBelowFeet.isOccluding()) && \r\n\t\t\t\t(blockBelowFeet != Material.WATER || !allowWater)) ||\r\n\t\t\t\tblockBelowFeet == Material.LAVA)\r\n\t\t\treturn SAFENESS.UNSAFE_FLOOR;\r\n\r\n\t\treturn SAFENESS.SAFE;\r\n\t}", "@java.lang.Override\n public boolean getCausesDrop() {\n return causesDrop_;\n }", "public boolean isCaughtByBubble() {\n return isCaughtByBubble;\n }", "protected boolean isScriptBlock() {\n return this.scriptBlock;\n }", "boolean getPossiblyBad();", "private boolean weAreTooBrokenToWaitUntilWeAreAbleToCarryThisOut() {\n return (isLineWrappingInvalid() || isShowing() == false);\n }", "public boolean isGuard(){\n return false;\n }", "public boolean isTrackingBlocked() {\n return (this.mConflictingQsExpansionGesture && this.mQsExpanded) || this.mBlockingExpansionForCurrentTouch;\n }", "public boolean continueExecuting()\n {\n double var1 = this.theEntity.getDistanceSq((double)this.entityPosX, (double)this.entityPosY, (double)this.entityPosZ);\n return this.breakingTime <= 240 && !this.field_151504_e.func_150015_f(this.theEntity.worldObj, this.entityPosX, this.entityPosY, this.entityPosZ) && var1 < 4.0D;\n }", "public boolean renderAsNormalBlock(){\r\n return false;\r\n }", "boolean getSkipMessage();", "@java.lang.Override\n public boolean getCausesDrop() {\n return causesDrop_;\n }", "public boolean breakCheck() {\n\t\tnotBroken=false;\n\t\treturn true;\n\t}", "private void setBlocked(boolean value) {\n\n blocked_ = value;\n }", "public boolean isDrooping() {\n return false;\n }", "public boolean verifyNoInactives() {\n\t\treturn !btnInactives.isEnabled();\n\n\t}", "public boolean isSleepingAllowed () {\n\t\treturn body.isSleepingAllowed();\n\t}", "public abstract void isGRRejection(long ms);", "public boolean isRestricted() {\n return restricted || getFlow().getRestriction() != null;\n }", "boolean canBeSkipped();", "public boolean hasRejected() {\n return fieldSetFlags()[19];\n }", "@SuppressWarnings(\"deprecation\")\n\t@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled=true) \n\tpublic void onPhysics(BlockPhysicsEvent e) {\n\t\tBlock block = e.getBlock();\n\t\tMaterial chMat = block.getType(); //getChangedType();\n\t\tLocation loc = block.getLocation();\n\t\tboolean checkBreak = false;\n\t\tif (maybeTracked(chMat) && !pendingChecks.contains(loc)) { // do we even slightly care?\n\t\t\t// Check light levels.\n\t\t\tif (Material.CROPS.equals(chMat) || Material.POTATO.equals(chMat) || Material.CARROT.equals(chMat) || Material.BEETROOT.equals(chMat)) {\n\t\t\t\tif (block.getLightLevel() < 8) {\n\t\t\t\t\tcheckBreak = true;\n\t\t\t\t}\n\t\t\t} else if (Material.RED_MUSHROOM.equals(chMat) || Material.BROWN_MUSHROOM.equals(chMat)) {\n\t\t\t\tBlock below = block.getRelative(BlockFace.DOWN);\n\t\t\t\tMaterial belowM = below.getType();\n\t\t\t\tif (!Material.MYCEL.equals(belowM) && !Material.DIRT.equals(belowM)) {\n\t\t\t\t\tcheckBreak = true;\n\t\t\t\t} else if (Material.DIRT.equals(belowM) && below.getData() != 2) {\n\t\t\t\t\tcheckBreak = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (checkBreak) {\n\t\t\tpendingChecks.add(loc);\n\t\t\thandleBreak(block, BreakType.PHYSICS, null, null);\n\t\t} else { // we haven't found a break condition yet. However, what follows aren't light level checks but rather\n\t\t\t// block checks, so these are controlled by a variety of rules. Some involve physics firing _adjacent_ to the block.\n\t\t\t// Basically it's a crapshoot.\n\t\t\tif (Material.SUGAR_CANE.equals(e.getChangedType())) {\n\t\t\t\t// Sugarcane winds up being weird. I'm still not sure what event fires and removes the bottom block but for\n\t\t\t\t// unattended (non-player) breaks physics events remove middle and top blocks. So, we just register\n\t\t\t\t// breaks for lower and upper blocks and if they are gone, we know it then.\n\t\t\t\t//\n\t\t\t\t// Note this will leave singular base blocks undetected. TODO\n\t\t\t\tif (chMat.equals(e.getChangedType())) {\n\t\t\t\t\tfor (BlockFace a : CropControlEventHandler.traverse) {\n\t\t\t\t\t\tLocation adjL = block.getRelative(a).getLocation();\n\t\t\t\t\t\tif (!pendingChecks.contains(adjL)) {\n\t\t\t\t\t\t\tpendingChecks.add(adjL);\n\t\t\t\t\t\t\t// So, the physics check can take a tick to resolve. We mark our interest but defer resolution.\n\t\t\t\t\t\t\tBukkit.getScheduler().runTaskLater(CropControl.getPlugin(), new Runnable() {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\thandleBreak(adjL.getBlock(), BreakType.PHYSICS, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, 1L);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (Material.CACTUS.equals(e.getChangedType())) {\n\t\t\t\tif (chMat.equals(e.getChangedType())) return; // handled elsewhere\n\t\t\t\t\n\t\t\t\t// Cactus is a little simpler. It breaks on adjacent placements; that's what would trigger this event. \n\t\t\t\tfor (BlockFace face : CropControlEventHandler.directions) {\n\t\t\t\t\t// We look around face-adjacent places and trigger a break-check for any cactus found.\n\t\t\t\t\tBlock adj = block.getRelative(face);\n\t\t\t\t\tMaterial adjM = adj.getType();\n\t\t\t\t\tLocation adjL = adj.getLocation();\n\t\t\t\t\tif (Material.CACTUS == adjM && !pendingChecks.contains(adjL)) {\n\t\t\t\t\t\tpendingChecks.add(adjL);\n\t\t\t\t\t\t// So, the physics check can take a tick to resolve. We mark our interest but defer resolution.\n\t\t\t\t\t\tBukkit.getScheduler().runTaskLater(CropControl.getPlugin(), new Runnable() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\thandleBreak(adj, BreakType.PHYSICS, null, null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 1L);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (Material.CHORUS_FLOWER.equals(e.getChangedType()) || Material.CHORUS_PLANT.equals(e.getChangedType())) {\n\t\t\t\t// TODO: this one is complicated; it's more like sugarcane I guess? Still need rules.\n\t\t\t}\n\t\t}\n\t}", "void blackhole(){ if (zzAtBOL) return; }", "private boolean maybeBelowTracked(Block block) {\n\t\tif (Material.SOIL.equals(block.getType()) || // wheat, carrots, potatoes, beetroot, melon stalk, pumpkin stalk\n\t\t\t\tMaterial.NETHERRACK.equals(block.getType()) || // netherwart\n\t\t\t\tMaterial.SAND.equals(block.getType()) || // cactus, sugarcane\n\t\t\t\tMaterial.END_STONE.equals(block.getType())) { // chorus fruit \n\t\t\treturn true;\n\t\t}\n\t\tBlock up = block.getRelative(BlockFace.UP);\n\t\tif (Material.BROWN_MUSHROOM.equals(up.getType()) || Material.RED_MUSHROOM.equals(up.getType()) || // mushrooms\n\t\t\t\tMaterial.SAPLING.equals(up.getType())) { // saplings\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean damagable() {\n return !this.state.equals(\"knockedBack\")\n && !this.state.equals(\"dodge\");\n }", "private boolean UpdateWithoutCarriedBlock()\r\n {\r\n if ( rand.nextInt(20) == 0 )\r\n {\r\n int i = MathHelper.floor_double( ( posX - 3D ) + rand.nextDouble() * 6D );\r\n int j = MathHelper.floor_double( posY - 1D + rand.nextDouble() * 7D );\r\n int k = MathHelper.floor_double( ( posZ - 3D ) + rand.nextDouble() * 6D );\r\n \r\n int l1 = worldObj.getBlockId( i, j, k );\r\n\r\n if ( CanPickUpBlock( i, j, k ) )\r\n {\r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderBlockCollectAuxFXID, i, j, k, l1 + ( worldObj.getBlockMetadata( i, j, k ) << 12 ) );\r\n\t\t \r\n setCarried( worldObj.getBlockId( i, j, k ) );\r\n setCarryingData( worldObj.getBlockMetadata( i, j, k ) );\r\n worldObj.setBlockToAir( i, j, k );\r\n }\r\n }\r\n else if ( worldObj.provider.dimensionId == 1 )\r\n {\r\n \t// Endermen in the end without a block in hand will eventually teleport back to the overworld\r\n \t\r\n \t\tif ( rand.nextInt( 9600 ) == 0 )\r\n \t\t{\r\n \t\t\t// play dimensional travel effects\r\n \t\t\t\r\n int i = MathHelper.floor_double( posX );\r\n int j = MathHelper.floor_double( posY ) + 1;\r\n int k = MathHelper.floor_double( posZ );\r\n \r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderChangeDimensionAuxFXID, i, j, k, 0 );\r\n\t\t \r\n setDead();\r\n \r\n return false;\r\n \t\t}\r\n }\r\n \r\n return true;\r\n }", "public boolean getThrowBomb() {\n return throwBomb;\n }", "public boolean isBusted() {\n\t\tif (hand.checkHandValue() > 21) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean isDrooping();", "@EventHandler(priority = EventPriority.HIGH)\n\tvoid onBreakBlock(BlockBreakEvent event)\n\t{\n\t\tPlayer player = event.getPlayer();\n\t\t\n\t\t//If the player is in creative mode don't mess with the event\n\t\tif (player.getGameMode().equals(GameMode.CREATIVE))\n\t\t\treturn;\n\t\t\n\t\t//Check if the block is contained within the config\n\t\tSet<String> configBlocks;\n\t\tint exp = 0;\n\t\tString professionReq = null;\n\t\tString tierReq = null;\n\t\t\n\t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n\t\t\n\t\tfor(String p: prof.getProfessions())\n\t\t\tfor (String t: prof.getTiers())\n\t\t\t{\n\t\t\t\ttry { configBlocks = config.getConfigurationSection(\"breakBlocks.\" + p + \".\" + t).getKeys(false); }\n\t\t\t\tcatch (NullPointerException e)\n\t\t\t\t{ continue; }\n\t\t\t\t\n\t\t\t\tfor (String b: configBlocks)\n\t\t\t\t\tif (event.getBlock().getType().toString().equalsIgnoreCase(b))\n\t\t\t\t\t{\n\t\t\t\t\t\texp = config.getInt(\"breakBlocks.\" + p + \".\" + t + \".\" + b);\n\t\t\t\t\t\tprofessionReq = p;\n\t\t\t\t\t\ttierReq = t;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t//If not found, nothing to do here.\n\t\tif (professionReq == null || tierReq == null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//If the player doesn't have at least the tier, cancel the event.\n\t\tlong place_cooldown = config.getLong(\"place_cooldown\");\n\t\t\n\t\tif (!prof.hasTier(professionReq, tierReq))\n\t\t{\n\t\t\tplayer.sendMessage(ChatColor.RED + \"You aren't skilled enough to break that!\");\n\t\t\tevent.setCancelled(true);\n\t\t}\n\t\t//Otherwise award some experience\n\t\telse if ((!event.getBlock().hasMetadata(\"timeplaced\") \n\t\t\t\t|| System.currentTimeMillis() - getMetadataLong(event.getBlock(), \"timeplaced\") > place_cooldown)\n\t\t\t\t&& !prof.isPracticeFatigued(professionReq))\n\t\t\taddExperience(player, professionReq, exp);\n\t}", "public Boolean checkBust() {\n\t\tif (getHandValue() > 21) {\n\t\t\tSystem.out.println(name + \" Busted!\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}" ]
[ "0.7546168", "0.6706888", "0.6626218", "0.66257393", "0.6581235", "0.65037376", "0.64814407", "0.6479315", "0.6463073", "0.64305747", "0.6426178", "0.6380904", "0.63522637", "0.6340361", "0.6337985", "0.62910646", "0.6246703", "0.6184771", "0.6182502", "0.61380994", "0.6076735", "0.6048828", "0.604369", "0.60301507", "0.59880036", "0.59707034", "0.59534824", "0.594325", "0.59139353", "0.5911154", "0.5891754", "0.5876428", "0.58483684", "0.58422", "0.5840115", "0.5825387", "0.5813959", "0.5800362", "0.5788264", "0.5781188", "0.57255775", "0.5722689", "0.5721885", "0.5712298", "0.5707031", "0.5704609", "0.57040197", "0.5689896", "0.56894493", "0.56889105", "0.56865263", "0.56856257", "0.5678706", "0.56703216", "0.5667305", "0.56575936", "0.5654809", "0.5632077", "0.5607168", "0.56058806", "0.55988854", "0.5595805", "0.5590163", "0.55872476", "0.55736065", "0.55718714", "0.55686945", "0.556213", "0.55612415", "0.5558933", "0.55507284", "0.55492806", "0.5547813", "0.55356425", "0.55218965", "0.551915", "0.551546", "0.55124694", "0.55101293", "0.5503613", "0.5495022", "0.54834944", "0.54694796", "0.5462261", "0.54620975", "0.5450581", "0.54496783", "0.54477787", "0.54474515", "0.54378194", "0.5436055", "0.54357135", "0.54335153", "0.54262805", "0.5418763", "0.5415821", "0.5414778", "0.54126775", "0.54107606", "0.54085577" ]
0.78375053
0
Gets the team chat map used for handling team chat
public HashMap<String, String> getTeamChatMap() { return teamChat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<ContactId, GroupChatEvent.Status> getGroupChatEvents(String chatId);", "public void setTeamChatMap(HashMap<String, String> tchat) {\n\t\tthis.teamChat = tchat;\n\t}", "public Map<ParticipantId, ParticipantConfig> getParticipantMap() {\n return _participantMap;\n }", "public Map<String, Player> getPlayersMap(){\n return this.players;\n }", "public Map<Integer, List<Message>> getMessagesMap() {\n return messagesMap;\n }", "public static ConcurrentMap<String, WebSocketServer> getWebSocketMap() {\n\t\treturn webSocketMap;\n\t}", "public java.util.Map<java.lang.String, java.lang.String> getPeersMap() {\n return internalGetPeers().getMap();\n }", "public java.util.Map<java.lang.String, java.lang.String> getPeersMap() {\n return internalGetPeers().getMap();\n }", "@Override\n public Map<Integer, PenghuziPlayer> getSeatMap() {\n return seatMap;\n }", "private List<? extends Map<String, ?>> getSessions() {\n List<Map<String, String>> list = new ArrayList<Map<String, String>>();\n sessions = MXChatManager.getInstance().getGroupChatSessions();\n for (MXGroupChatSession session : sessions) {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"topic\", session.getTopic());\n map.put(\"type\", session.isAChat() ? \"Chat\" : \"Meet\");\n\n list.add(map);\n }\n\n return list;\n }", "@Override\n\tpublic java.util.Map<java.util.Locale, java.lang.String> getDevelopersMap() {\n\t\treturn _scienceApp.getDevelopersMap();\n\t}", "public static Map<Long,Message> getMessages(){\r\n\t\treturn messages;\r\n\t\t\r\n\t}", "public GameMap map() {\n\t\treturn map;\n\t}", "public static Map<String, String> getMapping() {\n\t\treturn ThreadContext.getMapping();\n\t}", "protected Map getProfileMap() {\n \t\t\treturn profileMap;\n \t\t}", "public static Map<String, PlayerConfig> getPlayers() {\n return players;\n }", "@Override\r\n\tpublic IMapInfo getMapInfo() {\r\n\t\treturn replay.mapInfo;\r\n\t}", "Map getConnectionManagerMap();", "public TreeMap<String, String> getPanelUpdate() {\n TreeMap<String, String> map = new TreeMap<>();\n map.put(\"currentAddress\", currentLocation.getAddress());\n\n Location closestBathroom = landmarks.findBathroom(currentLocation);\n if(closestBathroom != null) {\n map.put(\"bathroomAddress\", closestBathroom.getAddress());\n map.put(\"bathroomDirections\", currentLocation.distance(closestBathroom) +\n \", \" + currentLocation.cardinal(closestBathroom));\n }\n\n map.put(\"homeAddress\", home.getAddress());\n map.put(\"homeDirections\", currentLocation.distance(home) + \", \" + currentLocation.cardinal(home));\n if(currentDestination != null) {\n map.put(\"destinationName\", currentDestinationName);\n map.put(\"destinationAddress\", currentDestination.getAddress());\n map.put(\"destinationDirections\", currentLocation.distance(currentDestination) +\n \", \" + currentLocation.cardinal(currentDestination));\n }\n return map;\n }", "public Map getMap(int idRoom){\r\n return cjtMap.get(idRoom);\r\n }", "public final MapWidget getMap() {\n return impl.getMap();\n }", "public List<Team> getAllTeams() { \r\n\t\t\tif(teams==null)\t{\r\n\t\t\t\tteams=dao.listTeams(); //LIST\t\t\t\r\n\t\t\tfor(Team atemp:teams){\t\t\tthis.mapTeam.put(atemp.getTeam(), atemp);\t\t}\r\n\t\t\t\t}\r\n\t\t\treturn teams;\r\n\t\t}", "public Grille getMap() {\n return map;\n }", "public Map<UUID, Boolean> getConversations() {\n return conversationVisibilities;\n }", "public Map<Object, Object> getUserMap() {\n\t\treturn userMap;\n\t}", "public Map<String, IUser> getUserMap() {\n return userMap;\n }", "public java.util.Map<java.lang.Integer, java.lang.Integer> getInfoMap() {\n return internalGetInfo().getMap();\n }", "public HashMap<String, String> getMap() {\n return _map;\n }", "public TileMap getMyTileMap() {\n return this.myTileMap;\n }", "public java.util.Map<java.lang.Integer, java.lang.Integer> getInfoMap() {\n return internalGetInfo().getMap();\n }", "@RequestMapping(\"/messages\")\n public Map<String, List<String>> messages(@RequestParam(value=\"chatterId\", defaultValue=\"\") String chatterId) {\n try {\n Map<String, List<String>> messages = new HashMap<String, List<String>>();\n for (int i = 0; i < 5; i++) {\n int chooseBase = (int) (Math.random()*999);\n int position = chooseBase % this.friendsList.size();\n FriendInfo friend = this.friendsList.get(position);\n List<String> messagesFromFriend = messages.get(friend.getId());\n if (messagesFromFriend != null) {\n messagesFromFriend.add(\"I am fine, thank you. \"+ chatterId);\n }\n else {\n messagesFromFriend = new ArrayList<String>();\n messagesFromFriend.add(\"I have seen you yesterday in Botany downs.\");\n messages.put(friend.getId(), messagesFromFriend);\n }\n }\n return messages;\n }\n catch (Exception e) {\n return null;\n }\n }", "public Map<String, Object> getContextMap(MessageInfo messageInfo) {\n Map<String, Object> internalMap = (Map<String, Object>) messageInfo.getMap()\n .get(AuthenticationFramework.ATTRIBUTE_AUTH_CONTEXT);\n\n if (internalMap == null) {\n internalMap = new HashMap<>();\n messageInfo.getMap().put(AuthenticationFramework.ATTRIBUTE_AUTH_CONTEXT, internalMap);\n }\n\n return internalMap;\n }", "Map<String, Result> getOrganizationsMap();", "public Map<ITreeNode<Topics>, Boolean> getTopicsMap()\r\n\t{\r\n\t\treturn topicsMap;\r\n\t}", "@Override\r\n public Map<String, String> getMembers(String room) {\r\n Objects.requireNonNull(room);\r\n final Map<String, String> roomMembers = members.get(room);\r\n LOG.debug(\"Room: {}, room members: {}\", room, roomMembers);\r\n return roomMembers == null ? Collections.EMPTY_MAP : \r\n Collections.unmodifiableMap(roomMembers);\r\n }", "public String getHomeTeam();", "@Override\n\tpublic Map<Long, Sports> findAllMap() {\n\t\tList<Sports> list1 = shopRepository.findAll();\n\t\tMap<Long,Sports> map1 = new HashMap<Long,Sports>();\n\t\tfor (Sports i : list1) map1.put(i.getId(),i);\n\t\treturn map1;\n\t}", "@Override\n\tpublic TreeMap<Integer, String> getLecturaMap() {\n\t\treturn null;\n\t}", "@SuppressWarnings({ \"unchecked\" })\r\n\tpublic static Map<Class, Integer> getPacketToID() {\n\t\tif (packetToID == null) {\r\n\t\t\ttry {\r\n\t\t\t\tField packetsField = FuzzyReflection.fromClass(Packet.class, true).getFieldByType(\"java\\\\.util\\\\.Map\");\r\n\t\t\t\tpacketToID = (Map<Class, Integer>) FieldUtils.readStaticField(packetsField, true);\r\n\t\t\t\t\r\n\t\t\t} catch (IllegalAccessException e) {\r\n\t\t\t\tthrow new RuntimeException(\"Unable to retrieve the packetClassToIdMap\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn packetToID;\r\n\t}", "public Map<String, String> draftTableMap() {\n return draftTableMap;\n }", "public MapDisplay getMap(){\n\t\treturn map; //gibt die Karte zurück\n\t}", "public static HashMap<UUID, Integer> getSafeLogoutPlayers() {\n return new HashMap<UUID, Integer>(safeLogoutPlayers);\n }", "public List<Team> getListOfTeams(){\n \tMap<String, Object> myMap = new HashMap<String, Object>();\n\t\tJSONObject jsonobj = null;\n\t\tList<Team> team = new ArrayList<>();\n\t\tTeamsJsonReader reader = new TeamsJsonReader();\n\t\tJSONParser parser = new JSONParser();\n\t\tObject obj = null;\n\n\t\ttry {\n\t\t\tobj = parser.parse(new FileReader(\"src/main/resources/db.json\"));\n\t\t\tJSONObject jsonObject = (JSONObject) obj;\n\t\t\tJSONArray jsonarr = (JSONArray) jsonObject.get(\"teams\");\n\t\t\tfor (int size = 0; size < jsonarr.size(); size++) {\n\t\t\t\tList<Individual> individualList = new ArrayList<>();\n\t\t\t\tjsonobj = (JSONObject) jsonarr.get(size);\n\t\t\t\tmyMap.put(\"name\", jsonobj.get(\"name\"));\n\t\t\t\tmyMap.put(\"id\", ((Long) jsonobj.get(\"id\")).intValue());\n\t\t\t\tJSONArray memberArray = (JSONArray) jsonobj.get(\"members\");\n\n\t\t\t\tfor (int index = 0; index < memberArray.size(); index++) {\n\n\t\t\t\t\tindividualList.add(reader.getIndividualById(((Long) memberArray.get(index)).intValue()));\n\n\t\t\t\t}\n\t\t\t\tmyMap.put(\"members\", individualList);\n\t\t\t\t\n\t\t\t\tteam.add(new Team(myMap));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn team;\n }", "@SuppressWarnings(\"unchecked\")\n public Map<String, String> getMapContextPath() {\n FacesContext facesContext = FacesContext.getCurrentInstance();\n ExternalContext extenalContext = facesContext.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) extenalContext.getRequest();\n return (Map<String, String>) request.getSession().getAttribute(\"MAP_CONTEXT_PATH\");\n //xxx_temp end\n }", "protected abstract Map<Map<String, Serializable>, String> getWaitersMap();", "private Map<Integer, WorldAirport> getAirportMap(){\n\t\treturn this.airports;\n\t}", "public static GoogleMap getMap() {\n\t\treturn mMap;\n\t}", "java.util.Map<String, String>\n getReplicationMap();", "public Tile[][] getTileMap(){\r\n\t\treturn tileMap;\r\n\t}", "public Map<Integer, Feed> getFeedMap() {\n if (feedMap == null) {\n List<Feed> feeds = alertService.getFeedsByProvenanceName(ProvenanceNames.HEALTHMAP);\n feedMap = index(feeds, on(Feed.class).getHealthMapFeedId());\n }\n return feedMap;\n }", "public static Map<String, String> getMapping() {\r\n\t\treturn data.get();\r\n\t}", "Map<String, String> getAvailableGames();", "MAP createMAP();", "public static void getMapDetails(){\n\t\tmap=new HashMap<String,String>();\r\n\t map.put(getProjName(), getDevID());\r\n\t //System.out.println(\"\\n[TEST Teamwork]: \"+ map.size());\r\n\t \r\n\t // The HashMap is currently empty.\r\n\t\tif (map.isEmpty()) {\r\n\t\t System.out.println(\"It is empty\");\r\n\t\t \r\n\t\t System.out.println(\"Trying Again:\");\r\n\t\t map=new HashMap<String,String>();\r\n\t\t map.put(getProjName(), getDevID());\r\n\t\t \r\n\t\t System.out.println(map.isEmpty());\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t\t//retrieving values from map\r\n\t Set<String> keys= map.keySet();\r\n\t for(String key : keys){\r\n\t \t//System.out.println(key);\r\n\t System.out.println(key + \": \" + map.get(key));\r\n\t }\r\n\t \r\n\t //searching key on map\r\n\t //System.out.println(\"Map Value: \"+map.containsKey(toStringMap()));\r\n\t System.out.println(\"Map Value: \"+map.get(getProjName()));\r\n\t \r\n\t //searching value on map\r\n\t //System.out.println(\"Map Key: \"+map.containsValue(getDevID()));\r\n\t \r\n\t\t\t\t\t // Put keys into an ArrayList and sort it.\r\n\t\t\t\t\t\t//ArrayList<String> list = new ArrayList<String>();\r\n\t\t\t\t\t\t//list.addAll(keys);\r\n\t\t\t\t\t\t//Collections.sort(list);\r\n\t\t\t\t\r\n\t\t\t\t\t\t// Display sorted keys and their values.\r\n\t\t\t\t\t\t//for (String key : list) {\r\n\t\t\t\t\t\t// System.out.println(key + \": \" + map.get(key));\r\n\t\t\t\t\t\t//}\t\t\t \r\n\t}", "public Map<String, Person> getPeople() {\n return people;\n }", "@Override\n\tpublic HashSet<String> getTeams() {\n return new HashSet<String>();\n\t}", "java.util.Map<java.lang.String, ch.epfl.dedis.proto.StatusProto.Response.Status>\n getSystemMap();", "public static HashMap<String,String> getUsernameEmailMappings()\r\n\t{\r\n\t\treturn usernameToEmail;\r\n\t}", "public TreeMap<String, User> getClientUsersMap() {\n TreeMap<String, User> clients = new TreeMap<>();\n usersConnected.values().stream().forEach((user) -> {\n clients.put(user.getName(), user.toClientUser());\n });\n return clients;\n }", "public Map getMap() {\n\t\treturn this.map;\n\t}", "public Map<String, String> getInformations()\n {\n\n if (userProfile == null)\n {\n return EMPTY_STRING_TO_STRING_MAP;\n }\n\n Map<String, String> infoMap = userProfile.getUserInfoMap();\n Map<String, String> filteredMap = new HashMap<String, String>();\n\n for (String key : infoMap.keySet())\n {\n if (JSR_168_P3P.contains(key))\n {\n filteredMap.put(key, infoMap.get(key));\n }\n }\n\n return Collections.unmodifiableMap(filteredMap);\n }", "public static HashMap<String, Shelter> getMap() {\n return shelters;\n }", "@SuppressWarnings(\"unchecked\")\n private List createTeamList() {\n\n ArrayList result = new ArrayList();\n for( int i = 0 ; i < leagues_array.size() ; ++i ) {\n /* each group need each HashMap-Here for each group we have 3 subgroups */\n ArrayList secList = new ArrayList();\n for( int n = 0 ; n < SplashScreen.full_teams_array.get(i).size() ; n++ ) {\n HashMap child = new HashMap();\n child.put( \"Team\", SplashScreen.full_teams_array.get(i).get(n) );\n boolean favorite_found = false;\n for(int j=0; j<SplashScreen.new_favorites_array.size(); j++) {\n if(SplashScreen.full_teams_array.get(i).get(n).toString().equals(SplashScreen.new_favorites_array.get(j)[1]) &&\n leagues_array.get(i).equals(SplashScreen.new_favorites_array.get(j)[0]) ) {\n favorite_found = true;\n }\n }\n if(favorite_found) { child.put( \"Favorite\", \"1\" ); }\n else { child.put( \"Favorite\", \"0\" ); }/*\n if(SplashScreen.full_teams_array.get(i).get(n).toString().equals(favorite_team) &&\n leagues_array.get(i).equals(favorite_league) ) {\n child.put( \"Favorite\", \"1\" );\n } else {\n }\n child.put( \"Favorite\", \"0\" );/*\n }*/\n secList.add( child );\n }\n result.add( secList );\n }\n return result;\n }", "public Map<String, Counter> getMap(){\n\t\treturn map;\n\t}", "HashMap <String, Command> getMap();", "@Override\n public Map<String,String> getMapGloablCommunityColor(){\n return icommunityColors.getMapGloablCommunityColor();\n }", "int[] getVisualToLogicalMap() {\n if (v2lMap == null) {\n v2lMap = createVisualToLogicalMap(levels);\n }\n return v2lMap;\n }", "public java.util.Map<java.lang.String, ch.epfl.dedis.proto.StatusProto.Response.Status> getSystemMap() {\n return internalGetSystem().getMap();\n }", "public final synchronized Map<String, String> m108w() {\n Map<String, String> map;\n if (this.f112Y.size() <= 0) {\n map = null;\n } else {\n map = new HashMap(this.f112Y);\n }\n return map;\n }", "@UnsupportedAppUsage\n public Map<String, Object> getMap() {\n return this.mMap;\n }", "public void loadMap(){\n level= dataBase.getData(\"MAP\",\"PLAYER\");\n }", "public java.util.Map getMap()\n {\n return __m_Map;\n }", "public static Map<String, String> getTableMap() {\n return tableMap;\n }", "Map<String, Scoreboard> getScoreboards() {\n\t\treturn scoreboards;\n\t}", "public Object getWindowTag() {\n if (null != mChatMap) {\n Object tag = mChatMap.getTag();\n return tag;\n } else {\n Logger.w(TAG, \"getWindowTag() mChatMap is null\");\n return null;\n }\n }", "public String getAwayTeam();", "public java.util.Map<java.lang.String, ch.epfl.dedis.proto.StatusProto.Response.Status> getSystemMap() {\n return internalGetSystem().getMap();\n }", "String getMapName() {\n try {\n fd world = getWorld();\n Class<?> worldclass = world.getClass();\n Field worlddatafield = null;\n while (true) { //\n\n try {\n worlddatafield = worldclass.getDeclaredField(\"x\");\n break;\n } catch (NoSuchFieldException e) {\n worldclass = worldclass.getSuperclass();\n continue;\n }\n }\n if (worlddatafield == null)\n return null;\n worlddatafield.setAccessible(true);\n\n ei worldata;\n\n worldata = (ei) worlddatafield.get(world);\n return worldata.j();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public Map<Integer, Coord> getGlobalMap(){\n\t\tif(mapExists){\r\n\t\t\tMap<Integer, Coord> realCoordMap = new HashMap<Integer, Coord>();\r\n\t\t\tfor(Map.Entry<Integer, Coord> c : this.globalMap.entrySet()){\r\n\t\t\t\t//core.Debug.p(\"c: id\" + c.getKey() + \", v:\" + c.getValue().toString() + \", r:\"+ realCoord(c.getValue()).toString());\r\n\t\t\t\trealCoordMap.put(c.getKey(), realCoord(c.getValue()));\r\n\t\t\t}\r\n\t\t\treturn realCoordMap;\r\n\t\t}\r\n\t\telse return null;\r\n\t}", "private void loadConversationMap() throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(DATA_DIR + \"/assistant.txt\"));\r\n\t\tString line, currentCategory;\r\n\t\tint iline = 0;\r\n\t\tcurrentCategory = \"\";\r\n\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\tline = line.trim();\t\t\t\r\n\t\t\tif ( !line.isEmpty() ) {\r\n\t\t\t\tif (iline % 2 == 0) {\r\n\t\t\t\t\tcurrentCategory = line;\r\n\t\t\t\t\tconversationMap.put(currentCategory, new ArrayList<String>(10));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tint pos = 0;\r\n\t\t\t\t\tint nextSemicolonPos = line.indexOf(\";\");\r\n\t\t\t\t\tif (nextSemicolonPos == -1)\r\n\t\t\t\t\t\tconversationMap.get(currentCategory).add(line);\r\n\t\t\t\t\twhile ( pos < line.length() ) {\r\n\t\t\t\t\t\tif (nextSemicolonPos != -1) {\r\n\t\t\t\t\t\t\tconversationMap.get(currentCategory).add(line.substring(pos, nextSemicolonPos));\r\n\t\t\t\t\t\t\tpos = nextSemicolonPos + 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconversationMap.get(currentCategory).add(line.substring(pos));\r\n\t\t\t\t\t\t\tpos = line.length();\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\tnextSemicolonPos = line.indexOf(\";\", nextSemicolonPos + 1);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\tiline++; \r\n\t\t\t} \r\n\t\t}\r\n\t\tbr.close();\t\t\t\r\n\t}", "public Map<String, Object> toMap() {\n Map<String, Object> map = new HashMap<>();\n map.put(\"message\", message);\n map.put(\"senderID\", senderID);\n map.put(\"time\", time);\n return map;\n }", "public interface IMap \n{ \n String GetMaps(boolean showEnemyShips);\n String GetSpecifiedMap(MapSettings ms);\n \n MapSettings GetUserMap();\n\n boolean HitEnemyCell(int x, int y);\n boolean CheckVictory(boolean checkPlayerMap);\n boolean SetUserMap(MapSettings userMap);\n boolean SetEnemyMap(MapSettings enemyMap);\n}", "public List<ChatMessage> getChatMessages() {\n logger.info(\"**START** getChatMessages \");\n return messagesMapper.findAllMessages();\n }", "public static Map<String,String> getGeoTargetsFromCache(){\n\t\tMap<String,String> dataMap=null; \t\n \tif(memcache !=null && memcache.contains(ALL_GEO_TARGETS_KEY)){\n \t\tdataMap=(Map<String,String>) memcache.get(ALL_GEO_TARGETS_KEY);\n \t\tlog.info(\"Memcache getGeoTargetsFromCache size = \"+dataMap.size());\n \t} \t\n \treturn dataMap;\n\t}", "protected Map createAttachmentsMap() {\n return new HashMap();\n }", "public Map<Integer, Driver> getDreamTeam(Integer k){\r\n\t\t\r\n\t\t// inizializzo qui il tasso di sconofitta perchè se rifaccio ricorsione da zero\r\n\t\t// e non trovo tasso migliore della ricorsione prec che non c'entra nulla\r\n\t\t// non riesco a trovare un nuovo best\r\n\t\tbestTassoSconfitta = Integer.MAX_VALUE;\r\n\t\t// VARIABILI PER LA RICORSIONE\r\n\t\tMap<Integer, Driver> parziale = new HashMap<Integer, Driver>();\r\n\t\tthis.bestTeam = new HashMap<Integer, Driver>();\r\n\r\n\t\tInteger tassoSconfitta = 0;\r\n\t\tcerca(parziale, 0, k, tassoSconfitta);\r\n\t\t\r\n\t\treturn this.bestTeam;\r\n\t\t\r\n\t}", "public Map<String, Object> getInfoMap()\n {\n Map<String, Object> paramMap = new HashMap<String, Object>();\n this.putInMap(paramMap);\n return paramMap;\n }", "public MapBean getMapBean() {\n return theMap;\n }", "private Map<Integer, MessageEncoder> initialiseMap() {\n Map<Integer, MessageEncoder> composerMap = new HashMap<>();\n composerMap.put(AC35MessageType.BOAT_ACTION.getCode(), new BoatActionEncoder());\n composerMap.put(AC35MessageType.REQUEST.getCode(), new RequestEncoder());\n composerMap.put(AC35MessageType.COLOUR.getCode(), new ColourEncoder());\n\n return Collections.unmodifiableMap(composerMap);\n }", "Map<Integer, Symbol> getBoardLayout() {\n return tiles.getBoardLayout();\n }", "public HashMap<String, LttngEventField> getMapContent() {\n return fFieldsMap;\n }", "public Map<String, ModuleDTO> getModuleNameToDtoMap() {\n\t\treturn moduleNameToDtoMap;\n\t}", "public static Tile[][] setUpMap() {\n\n Tile[][] tiles = new Tile[5][9];\n String[][] defaultMapLayout = GameMap.getMapLayout();\n\n for (int i = 0; i < 5; i++) {\n\n for (int j = 0; j < 9; j++) {\n\n String tileType = defaultMapLayout[i][j];\n\n if (tileType.equals(\"P\")) {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"R\")) {\n Tile newTileName = new River();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M1\")) {\n Tile newTileName = new Mountain1();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M2\")) {\n Tile newTileName = new Mountain2();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M3\")) {\n Tile newTileName = new Mountain3();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"SM\")) {\n Tile newTileName = new SwampMonster();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"O\")) {\n Tile newTileName = new Ocean();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"G\")) {\n Tile newTileName = new Grass();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"V\")) {\n Tile newTileName = new Volcano();\n tiles[i][j] = newTileName;\n\n }else {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n newTileName.setOwner(null);\n }\n\n }\n }\n return tiles;\n }", "public Map<Integer, List<String>> getLayout() {\n return map;\n }", "public MapScreen getMap() {\n\t\treturn newScreen;\n\t}", "java.util.Map<java.lang.Integer, java.lang.Integer>\n getInfoMap();", "private static Map<String, User> getUsers() {\n Map<String, User> users = new HashMap<String, User>();\n\n User userOne = new User(\"one\",\"1\");\n User userTwo = new User(\"two\",\"2\");\n\n users.put(userOne.getName(), userOne);\n users.put(userTwo.getName(), userTwo);\n\n return users;\n }", "private String whoIsMVP() {\n int highestValue = 0;\n String mvp = null;\n for (String player : mvpPlayersMap.keySet()) {\n if (highestValue < mvpPlayersMap.get(player)) {\n highestValue = mvpPlayersMap.get(player);\n mvp = player;\n }\n }\n log.info(\"MVP player: {} with {} points\", mvp, highestValue);\n return mvp;\n }", "public Map<String, WorldConfig> getWorldConfigs() {\n\t\treturn Collections.unmodifiableMap(WorldCfg);\n\n\t}", "public Map<String, Object> getInfoMap() {\n\t\tMap<String, Object> paramMap = new HashMap<String, Object>();\n\t\tthis.putInMap(paramMap);\n\t\treturn paramMap;\n\t}" ]
[ "0.62282604", "0.6143595", "0.6094221", "0.60485244", "0.5980351", "0.59593683", "0.5888286", "0.5850095", "0.56712747", "0.5661745", "0.5621478", "0.55687517", "0.55550057", "0.5547262", "0.5512967", "0.5506578", "0.54915833", "0.5414136", "0.5406093", "0.5365248", "0.5332796", "0.529821", "0.52961093", "0.52926815", "0.5292283", "0.5291274", "0.5280058", "0.52685446", "0.52656657", "0.5265427", "0.5260889", "0.52570313", "0.5236263", "0.52351946", "0.5224635", "0.5212143", "0.5198778", "0.51878643", "0.5178838", "0.5171916", "0.5161805", "0.5161677", "0.5160255", "0.5131546", "0.51297826", "0.5122895", "0.5115822", "0.5113636", "0.511204", "0.5108772", "0.51024187", "0.51015645", "0.5098187", "0.5095349", "0.5083465", "0.5082414", "0.50782514", "0.5068061", "0.50671905", "0.5059371", "0.50490004", "0.5038971", "0.50374115", "0.50358474", "0.5031456", "0.5030636", "0.50290215", "0.502256", "0.5018008", "0.5016825", "0.5015588", "0.50092274", "0.5007734", "0.5007061", "0.50018847", "0.49997234", "0.4998204", "0.49878058", "0.49821684", "0.498081", "0.4978559", "0.4975413", "0.49602184", "0.4958427", "0.49560305", "0.4953627", "0.49498218", "0.49497333", "0.49486953", "0.4948663", "0.49454194", "0.49360517", "0.4928637", "0.492501", "0.49233115", "0.4923037", "0.49197334", "0.49197006", "0.49186897", "0.49170357" ]
0.81211597
0
Sets the team chat map used for handling team chat
public void setTeamChatMap(HashMap<String, String> tchat) { this.teamChat = tchat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HashMap<String, String> getTeamChatMap() {\n\t\treturn teamChat;\n\t}", "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "public static void setWebSocketMap(ConcurrentMap<String, WebSocketServer> webSocketMap) {\n\t\tWebSocketServer.webSocketMap = webSocketMap;\n\t}", "@Override\r\n \tpublic void setMap(Map m) {\n \t\t\r\n \t}", "public void setNewViewMap(String inpt,int passedCommunicationTurn) {\n\t\tString[] msgs = inpt.split(\" \");\n\t\tint mapNo = new Integer(msgs[0]).intValue();\n\t\tint player = new Integer(msgs[1]).intValue();\n\t\tMethodParameter parameters = new MethodParameter();\n\t\tparameters.setNewViewMap(mapNo, player);\n\t\tif(passedCommunicationTurn != -1){\n\t\t\tcommands.add(MethodCallup.NEWVIEWMAP, parameters, communicationTurn);\n\t\t}else{\n\t\t\tcommands.add(MethodCallup.NEWVIEWMAP, parameters, passedCommunicationTurn);\n\t\t}\n\t}", "public void setInitMap(int size,String[][] text) {\n\t\tfor(int i=0;i<this.size;i++) {\n\t\t\tfor(int j=0;j<this.size;j++) {\n\t\t\t\tthis.map[i][j] = text[i][j];\n\t\t\t\tif(map[i][j].equals(\"p\")) {\n\t\t\t\t\tsetPlayer(i,j,map[i][j]);\n\t\t\t\t}\n\t\t\t\telse if(map[i][j].equals(\"h\")||map[i][j].equals(\"s\")||map[i][j].equals(\"H\")||map[i][j].equals(\"c\")) {\n\t\t\t\t\tsetEnemy(i,j,map[i][j]);\n\t\t\t\t}\n\t\t\t\telse if(!(map[i][j].equals(\" \")||map[i][j].equals(\"*\"))){\n\t\t\t\t\tsetItemList(i,j,map[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void setDevelopersMap(\n\t\tjava.util.Map<java.util.Locale, java.lang.String> developersMap) {\n\t\t_scienceApp.setDevelopersMap(developersMap);\n\t}", "@Override\n public void setCommunityColorMap(TimeFrame tf, Map<String, String> mapCommunityColorMap) {\n icommunityColors.setCommunityColorMap(tf, mapCommunityColorMap);\n }", "void setMap(Map aMap);", "public void setDirectChatRoomsMap(Map<String, List<String>> directChatRoomsMap, ApiCallback<Void> callback) {\n Log.d(LOG_TAG, \"## setDirectChatRoomsMap()\");\n IMXStore store = getStore();\n if (null != store) {\n // update the store value\n // do not wait the server request echo to update the store\n store.setDirectChatRoomsDict(directChatRoomsMap);\n } else {\n Log.e(LOG_TAG, \"## setDirectChatRoomsMap() : null store\");\n }\n mLocalDirectChatRoomIdsList = null;\n // Upload the new map\n mAccountDataRestClient.setAccountData(getMyUser().user_id, AccountDataElement.ACCOUNT_DATA_TYPE_DIRECT_MESSAGES, directChatRoomsMap, callback);\n }", "private void setUpMapIfNeeded() {\n if (map == null) {\n map = fragMap.getMap();\n if (map != null) {\n setUpMap();\n }\n }\n }", "private void setMap(final Map map) {\n\t\tthis.map = map;\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t}", "@Override\n\tpublic void setMap(ServerMap map, Direction dir)\n\t{\n\t\tchar direction = 'n';\n\t\tif(dir != null)\n\t\t\tswitch(dir)\n\t\t\t{\n\t\t\t\tcase Up:\n\t\t\t\t\tdirection = 'u';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Down:\n\t\t\t\t\tdirection = 'd';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Left:\n\t\t\t\t\tdirection = 'l';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Right:\n\t\t\t\t\tdirection = 'r';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\tsuper.setMap(map, dir);\n\t\tclearRequests();\n\t\t/* Send the map switch packet to the client. */\n\t\tServerMessage message = new ServerMessage(ClientPacket.SET_MAP_AND_WEATHER);\n\t\tmessage.addString(java.lang.Character.toString(direction));\n\t\tmessage.addInt(map.getX());\n\t\tmessage.addInt(map.getY());\n\t\tmessage.addInt(map.isWeatherForced() ? map.getWeatherId() : TimeService.getWeatherId());\n\t\tgetSession().Send(message);\n\t\tCharacter c;\n\t\tString packet = \"\";\n\t\t/* Send all player information to the client. */\n\t\tfor(Player p : map.getPlayers().values())\n\t\t{\n\t\t\tc = p;\n\t\t\tpacket = packet + c.getName() + \",\" + c.getId() + \",\" + c.getSprite() + \",\" + c.getX() + \",\" + c.getY() + \",\"\n\t\t\t\t\t+ (c.getFacing() == Direction.Down ? \"D\" : c.getFacing() == Direction.Up ? \"U\" : c.getFacing() == Direction.Left ? \"L\" : \"R\") + \",\" + p.getAdminLevel() + \",\";\n\t\t}\n\t\t/* Send all npc information to the client. */\n\t\tfor(int i = 0; i < map.getNpcs().size(); i++)\n\t\t{\n\t\t\tc = map.getNpcs().get(i);\n\t\t\tif(!c.getName().equalsIgnoreCase(\"NULL\"))\n\t\t\t\t/* Send no name to indicate NPC */\n\t\t\t\tpacket = packet + \"!NPC!,\" + c.getId() + \",\" + c.getSprite() + \",\" + c.getX() + \",\" + c.getY() + \",\"\n\t\t\t\t\t\t+ (c.getFacing() == Direction.Down ? \"D\" : c.getFacing() == Direction.Up ? \"U\" : c.getFacing() == Direction.Left ? \"L\" : \"R\") + \",0,\";\n\t\t}\n\t\t/* Only send the packet if there were players on the map */\n\t\t/* TODO: Clean this stuff up? */\n\t\tif(packet.length() > 2)\n\t\t{\n\t\t\tServerMessage initPlayers = new ServerMessage(ClientPacket.INIT_PLAYERS);\n\t\t\tinitPlayers.addString(packet);\n\t\t\tgetSession().Send(initPlayers);\n\t\t}\n\t}", "public void setDialogMap(Map dialogMap) {\n this.dialogMap = dialogMap;\n }", "private void setMapView()\n\t{\n\t\tMapContainer.mapView = new MapView(SubMainActivity.this, this.getString(R.string.apiKey));\n\t\tMapContainer.mapView.setClickable(true);\n\t\tMapContainer.mapView.setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));;\n\t}", "public void setGuiHashMap() {\n\n gameMap.setGetGuiHashMapParameter(\"author\",\"Default authorName\");\n gameMap.setGetGuiHashMapParameter(\"warn\",\"Default warning\");\n gameMap.setGetGuiHashMapParameter(\"image\",\"Default image\");\n gameMap.setGetGuiHashMapParameter(\"wrap\",\"Default wrapping\");\n gameMap.setGetGuiHashMapParameter(\"scroll\",\"Default scrolling\");\n }", "private void setupMapView(){\n Log.d(TAG, \"setupMapView: Started\");\n\n view_stage_map = VIEW_MAP_FULL;\n cycleMapView();\n\n }", "@Override\n public void setPlayers(PlayerId ownId, Map<PlayerId, String> playerNames) {\n underlyingPlayer.setPlayers(ownId, playerNames);\n }", "private void initDefaultTeams() {\n // Loop through the list of user groups and register\n // them as teams.\n for (UserGroup userGroup : UserGroup.values()) {\n // Register the new Team.\n Team team = scoreboard.registerNewTeam(userGroup.getTeamName());\n team.setCanSeeFriendlyInvisibles(true);\n\n // If the prefix does not exist, skip the part below.\n if (userGroup.getUserGroupPrefix().isEmpty()) continue;\n\n // Add the prefix.\n team.setPrefix(userGroup.getUserGroupPrefix());\n }\n }", "public void setTileMap(Tile[][] tileMap) {\r\n\t\tthis.tileMap = tileMap;\r\n\t}", "@Override\n\tpublic void setHomeTeam() {\n\t\t\n\t}", "public void setPlugboard(String pbMap){\r\n\t\tplugboard = new Plugboard(pbMap);\r\n\t}", "private void setUpMapIfNeeded() {\n \tif (mMap == null) {\r\n \t\t//Instanciamos el objeto mMap a partir del MapFragment definido bajo el Id \"map\"\r\n \t\tmMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\r\n \t\t// Chequeamos si se ha obtenido correctamente una referencia al objeto GoogleMap\r\n \t\tif (mMap != null) {\r\n \t\t\t// El objeto GoogleMap ha sido referenciado correctamente\r\n \t\t\t//ahora podemos manipular sus propiedades\r\n \t\t\t//Seteamos el tipo de mapa\r\n \t\t\tmMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n \t\t\t//Activamos la capa o layer MyLocation\r\n \t\t\tmMap.setMyLocationEnabled(true);\r\n \t\t\t\r\n \t\t\tAgregarPuntos();\r\n \t\t\t\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }", "public void populateMap(int playerNumber){\n\t\tint factor = 1;\n\t\t\n\t\t\n\t}", "public final void setMap(MapWidget mapWidget) {\n impl.setMap(mapWidget);\n }", "private void setupMap() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n \t\tif ( status != ConnectionResult.SUCCESS ) {\n \t\t\t// Google Play Services are not available.\n \t\t\tint requestCode = 10;\n \t\t\tGooglePlayServicesUtil.getErrorDialog( status, this, requestCode ).show();\n \t\t} else {\n \t\t\t// Google Play Services are available.\n \t\t\tif ( this.googleMap == null ) {\n \t\t\t\tFragmentManager fragManager = this.getSupportFragmentManager();\n \t\t\t\tSupportMapFragment mapFrag = (SupportMapFragment) fragManager.findFragmentById( R.id.edit_gpsfilter_area_google_map );\n \t\t\t\tthis.googleMap = mapFrag.getMap();\n \n \t\t\t\tif ( this.googleMap != null ) {\n \t\t\t\t\t// The Map is verified. It is now safe to manipulate the map.\n \t\t\t\t\tthis.configMap();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "private void setMapPos()\r\n {\r\n try\r\n {\r\n Thread.sleep(1000);//so that you can see players move\r\n }\r\n catch(Exception e){}\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n int unitPos = 0;\r\n int firstX = 0;\r\n int firstY = 0;\r\n if (currentPlayer == 1)\r\n {\r\n unitPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n }\r\n if (currentPlayer == 2)\r\n {\r\n unitPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n }\r\n int tempX = unitPos % mapWidth;\r\n int tempY = unitPos - tempX;\r\n if (tempY == 0) {}\r\n else\r\n tempY = tempY / mapHeight;\r\n tempX = tempX - 11;\r\n tempY = tempY - 7;\r\n if (tempX >= 0)\r\n firstX = tempX;\r\n else\r\n firstX = tempX + mapWidth;\r\n if (tempY >= 0)\r\n firstY = tempY;\r\n else\r\n firstY = tempY + mapWidth;\r\n\r\n int drawWidth = worldPanel.getDrawWidth();\r\n int drawHeight = worldPanel.getDrawHeight();\r\n worldPanel.setNewXYPos(firstX, firstY);\r\n miniMap.setNewXY(firstX, firstY, drawWidth, drawHeight);\r\n }", "void chooseMap(String username);", "private void updateMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (newMap[i][j] instanceof Player) {\n\t\t\t\t\tmap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof BlankSpace) {\n\t\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Mho) {\n\t\t\t\t\tmap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Fence) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }", "void setScoreboards(Map<String, Scoreboard> scoreboards) {\n\t\tthis.scoreboards = scoreboards;\n\t}", "public void setUserMap(Map<Object, Object> userMap) {\n\t\tthis.userMap = userMap;\n\t}", "public void setMap(String mn){\r\n mapName = mn;\r\n currentMap = new ImageIcon(mapName);\r\n }", "public void setTeam(String team) {\n\t\tthis.teamOfPlayer = team;\n\t}", "@Override\n\t\t\t\t\tpublic void setChat(Vector<Message> chatMessages) {\n\t\t\t\t\t\tchat.setChatHistory(chatMessages);\n\t\t\t\t\t}", "@Override\n\tpublic void setVisitTeam() {\n\t\t\n\t}", "public void SetupMap()\n {\n mMap.setMyLocationEnabled(true);\n\n // GAME LatLng\n LatLng latLng = new LatLng(53.227668, -0.540038);\n\n // Create instantiate Marker\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.draggable(false);\n markerOptions.title(\"GAME\");\n\n MapsInitializer.initialize(getActivity());\n // Create Marker at pos\n mMap.addMarker(markerOptions);\n // Position Map Camera to pos\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(latLng, 100, 0, 0)));\n }", "public void setMapPosition() {\n\t\txmap = levelState.getx();\n\t\tymap = levelState.gety();\n\t}", "private void setUpMap() {\n\t\t \n\t\tmMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\t\t//mMap.setMyLocationEnabled(true);\n\t\t\t \n\t\tmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(\n\t\t\t\tlatitude, longitude), 12.0f));\n\n\t}", "private void setUpMap() {\n mMap.getUiSettings().setZoomControlsEnabled(false);\n \n // Setting an info window adapter allows us to change the both the\n // contents and look of the\n // info window.\n mMap.setInfoWindowAdapter(new CustomInfoWindowAdapter(getLayoutInflater()));\n \n // Add lots of markers to the map.\n addMarkersToMap();\n \n }", "public MapPanel(String map, Object[] toLoad) {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setPreferredSize(new Dimension(WIDTH, HEIGHT));\n\t\tthis.setSize(this.getPreferredSize());\n\t\tthis.setVisible(true);\n\t\tthis.setFocusable(true);\n\t\tthis.requestFocus();\n\t\ttheMap = new Map(map, 50);\n\t\ttheTrainer = new Trainer(theMap, toLoad);\n\n\t\tinBattle = false;\n\t}", "public void setMap(int idRoom, int x, int y, Stack<AuxiliarElement> cjtElem, String nameRoom, int[][] doors, int[][] windows){ \r\n int key = sequence.getValue();\r\n sequence.increase();\r\n Map map = new Map(x, y, idRoom, nameRoom, doors, windows);\r\n map.setCjtElement(cjtElem);\r\n cjtMap.put(key, map);\r\n }", "@Override\n protected void setUpMap() {\n super.setUpMap();\n // For showing a move to my location button and a blue\n // dot to show user's location\n MainActivity mainActivity = (MainActivity) getActivity();\n mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled());\n }", "@Override\n public void setGlobalCommunityColorMap(Map<String, String> mapGloablCommunityColor) {\n icommunityColors.setGlobalCommunityColorMap(mapGloablCommunityColor);\n }", "@Override\n\tpublic void setDevelopersMap(\n\t\tjava.util.Map<java.util.Locale, java.lang.String> developersMap,\n\t\tjava.util.Locale defaultLocale) {\n\t\t_scienceApp.setDevelopersMap(developersMap, defaultLocale);\n\t}", "public void setUp() throws IOException \n\t{\n\t\tMapSelectionView mapSelectionView = new MapSelectionView();\n\t\tplayerNumber = mapSelectionView.print(4);\t//4 max players\n\t\tmap.setPlayers(playerNumber);\n\t\tHashMap<Integer, String> possibleStrategies = new HashMap<Integer, String>();\n\t\tpossibleStrategies.put(1, \"Aggressive\");\n\t\tpossibleStrategies.put(2, \"Benevolent\");\n\t\tpossibleStrategies.put(3, \"Random\");\n\t\tpossibleStrategies.put(4, \"Cheater\");\n\t\t\n\t\tfor(Player p : map.players) {\n\t\t\tint strat = mapSelectionView.askTournamentStrategy(p.getNumber(), possibleStrategies);\n\t\t\t\n\t\t\tswitch(strat) {\n\t\t\t\tcase 1:\n\t\t\t\t\tp.setStrategy(new Aggressive());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tp.setStrategy(new Benevolent());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tp.setStrategy(new Random());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tp.setStrategy(new Cheater());\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpossibleStrategies.remove(strat);\n\t\t}\n\t\tplayers = map.players;\t//Memorizing players of the tournament\n\t\t\n\t\tint mapNumber = mapSelectionView.askMapNumber();\n\t\t\n\t\tfor(int i = 1; i <= mapNumber; i++) {\n\t\t\tString mapFilePath = mapSelectionView.selectMap();\n\t\t\tMap map = new Map();\n\t\t\tmap.setPlayers(playerNumber);\n\t\t\tmap.load(mapFilePath);\t//Check if map is correct\n\t\t\tmaps.add(mapFilePath);\n\t\t}\n\t\t\n\t\tgamesNumber = mapSelectionView.askGameNumber();\n\t\tmaximumTurns = mapSelectionView.askGameMaxTurns();\n\t}", "static public void set_team_data(String league){\n\n\t\tEdit_row_window.attrs = new String[]{\"team name:\", \"rating:\", \"release year:\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct p.id, p.name, p.links_to_player, p.birth_year \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_\"+league+\"_players p, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_\"+league+\"_player_team pt \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where pt.player_id=p.id and pt.team_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by links_to_player desc \";\n\t\t\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct p.id, p.name, p.links_to_player, p.birth_year \" +\n\t\t\t\t\" from curr_\"+league+\"_players p \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"player name\", \"rating\", \"birth year\"};\n\t\tEdit_row_window.label_min_parameter=\"min. birth year:\";\n\t\tEdit_row_window.linked_category_name = \"PLAYERS\";\n\t}", "private void setUpMap() {\n mMap.setMyLocationEnabled(true);\n }", "public void setUp()\n {\n map = new Map(5, 5, null);\n }", "public interface MapMatchHandler {\n void setMap(ProtoMatchDTO.MatchDTO matchDTO, ProtoWeekDTO.WeekDTO week);\n}", "@Override\n\tpublic void setSession(Map<String, Object> arg0) {\n\t\tmap=arg0;\n\t\t\n\t\t\n\t}", "public Team( TeamColor color,Map map)\n\t{\n\t\tthis.nbCharacter = DEFAULT_NB_CHARACTER;\n\t\tthis.listCharacter = new Character[this.nbCharacter];\n\t\tthis.colorTeam = color;\t\n\t\tfor(int nbCharacterCreated =0; nbCharacterCreated<this.nbCharacter;nbCharacterCreated++)\n\t\t{\n\t\t\tthis.listCharacter[nbCharacterCreated] = new Character(this,map,nbCharacterCreated+1);\n\t\t}\n\t\tthis.actionPointLeft = DEFAULT_ACTION_POINT;\n\t}", "@Override\n\tpublic void setSession(Map<String, Object> arg0) {\n\t\tmap=arg0;\n\t\t\n\t}", "public void onChangeMap(String arg0) {\n\t\t\r\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n SupportMapFragment mapFragment = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));\n mapFragment.getMapAsync(this);\n mMap = mapFragment.getMap();\n\n }\n }", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mapView2))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap( lat, longi, \"ISS/ NUS\");\n }\n }\n }", "public void setSession(Map map) {\n\t\tthis.sessionMap=map;\n\t}", "public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}", "public void setStats(Map aMap) {\n stats = aMap;\n }", "void setMapChanged();", "public GameServer(ConcurrentMap<String, GameObject> scene, ConcurrentMap<String, Player> playerMap) {\n\t\t// TODO Auto-generated constructor stub\n\t\tthis.scene = scene;\n\t\tthis.playerMap = playerMap;\n\t\t// Default tic is at 60 meaning 60 frames in a sec\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }\n }", "private void mapSetUp() {\n\t\tfor (int i = 0; i < allChar.length; i++) {\n\t\t\tmap.put(allChar[i], shuffledChar[i]);\n\t\t}\n\t}", "public void map(){\n this.isMap = true;\n System.out.println(\"Switch to map mode\");\n }", "public void setStartingPosition(GameTile [][] visibleMap) {\r\n\t\t//method to set the starting position of our player.\r\n\t\tfor(int i=0; i<visibleMap.length; i++) {\r\n\t\t\tfor(int j=0; j<visibleMap[i].length; j++) {\r\n\t\t\t\tif(visibleMap[i][j] != null && visibleMap[i][j].hasPlayer()) {\r\n\t\t\t\t\tplayerX = i;\r\n\t\t\t\t\tplayerY = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void initializeTeamPositions() {\n\t\tint x = 0;\n\t\tint y = 0;\n\t\tfor(Team team : this.schoolClass.getTeams()) {\n\t\t\tteam.setPosition(x, y);\n\t\t\tx++;\n\t\t\tif(x >= board.BOARD_WIDTH) {\n\t\t\t\tx = 0;\n\t\t\t\ty++;\n\t\t\t\tif(y >= board.BOARD_HEIGHT) {\n\t\t\t\t\ty = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setPlayerGrid(){\n\t\tplayerGrid = new Grid(true);\n\t\tsetShips(playerGrid,playerBattleShipsList,0);//2\n\t}", "public static void setTeam(UserTeam team) {\n\t\tgame.setTmpTeam(team);\n\t\tint i=0;\n\t\tfor (Iterator<FootballPlayer> iterator = team.getPlayers().values().iterator(); iterator\n\t\t\t\t.hasNext();) {\n\t\t\tFootballPlayer player = iterator.next();\n\t\t\tnamesLabels.get(i).setText(game.getLastName(player.getName()));\n\t\t\tshirtLabels.get(i).setIcon(MainGui.getShirt(player.getTeamName()));\n\t\t\tbuttonArray[i].setText(\"X\");\n\t\t\ti++;\n\t\t}\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n try {\n setUpMap();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private void setLobbyParameters(int sessionID, ILobbyInformation lobbyInformation){\n\n\t\tif(lobbyMap.get(sessionID) != null && lobbyInformation != null)\n\t\t\tlobbyMap.get(sessionID).updateInformation(lobbyInformation);\n\t}", "private void setSubTeam(HttpServletRequest request, String teamcode, TeamDAO teamdao) {\n\n\t\ttry {\n\t\t\tCollection teamrootlist = teamdao.getSubteamArr(teamcode);\n\t\t\tif (teamrootlist != null && teamrootlist.size() > 0) {\n\t\t\t\tif (\"-1\".equals(teamcode)) {\n\t\t\t\t\trequest.setAttribute(\"root\", teamrootlist);\n\t\t\t\t}\n\t\t\t\tIterator it = teamrootlist.iterator();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\twhile (it.hasNext()) {\n\t\t\t\t\tTeamVO vo = (TeamVO) it.next();\n\t\t\t\t\t\n\t\t\t\t\tif(treeNodes.indexOf(\",\"+vo.getTeamCode()+\",\")>-1)\n\t\t\t\t\t\treturn; //存在回路,结束递归\n\t\t\t\t\telse\n\t\t\t\t\t\ttreeNodes += vo.getTeamCode()+\",\";\n\t\t\t\t\t\t\n\t\t\t\t\tCollection subteamlist = teamdao.getSubteamArr(vo.getTeamCode());\n\t\t\t\t\tif (subteamlist != null && subteamlist.size() > 0) {\n\t\t\t\t\t\trequest.setAttribute(vo.getTeamName().trim() + vo.getTeamCode().toString(), subteamlist);\n\t\t\t\t\t\tsetSubTeam(request, vo.getTeamCode(), teamdao);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\trequest.setAttribute(\"error\", e.getMessage());\n\t\t}\n\t}", "public static void setUsernameEmailMappings(HashMap<String,String> usernameToEmailNew)\r\n\t{\r\n\t\tusernameToEmail = usernameToEmailNew;\r\n\t}", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "static public void set_player_data(String league){\n\t\t\n\t\tEdit_row_window.attrs = new String[]{\"player name:\", \"rating:\", \"birth year:\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct t.id, t.name, t.links_to_team, t.creation_year \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_\"+league+\"_teams t, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_\"+league+\"_player_team pt\" +\n\t\t\t\t\t\t\t\t\t\t\t\" where pt.team_id=t.id and pt.player_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by links_to_team desc \";\n\t\t\n\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct t.id, t.name, t.links_to_team, t.creation_year \" +\n\t\t\t\t\" from curr_\"+league+\"_teams t \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"team name\", \"rating\", \"creation year\"};\n\t\tEdit_row_window.label_min_parameter=\"min. creation year:\";\n\t\tEdit_row_window.linked_category_name = \"TEAMS\";\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n try {\n\t\t\t\t\tsetUpMap();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n }\n }", "public static void saveTeamNames() {\r\n\t\tMain.team1 = Main.teamOne.name;\r\n\t\tMain.team2 = Main.teamTwo.name;\r\n\t}", "public void setMap(Map map, int layer, int i, int j) {\n assert map != null;\n //remove from previous map\n this.map.ifPresent((value)->value.removeTile(this));\n this.map = Optional.of(map);\n setPosition(layer, i, j);\n }", "private void setUpMap() {\n //Starts map somewhat zoomed in over user location.\n float zoom = 12;\n LatLng target = new LatLng(lat, lng);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(target, zoom));\n\n // Adds the marker ( using coordinates from MainActivty).\n marker = mMap.addMarker(new MarkerOptions()\n .position(target)\n .title(\"Incident\"));\n marker.setDraggable(true);\n }", "public void setTeam(String team) {\r\n\t\tTeam = team;\r\n\t}", "private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager()\n\t\t\t\t\t.findFragmentById(R.id.map1)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\tsetUpMap();\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void setAuthInfoMap(Map<InetSocketAddress, AuthInfo> arg0) {\n\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\r\n // Try to obtain the map from the SupportMapFragment.\r\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\r\n .getMap();\r\n // Check if we were successful in obtaining the map.\r\n if (mMap != null) {\r\n setUpMap();\r\n }\r\n }\r\n }", "public void setMap(Map map) {\r\n\t\tthis.map = map;\r\n\t\tsmap.setMap(map);\r\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n \tmMap = ((com.google.android.gms.maps.MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\n \t// Check if we were successful in obtaining the map.\n \tif (mMap != null) {\n \t\tmakeMarkers();\n \t\tloadMarkersFromParse();\n \t}\n }\n \n }", "void setOrganizationsMap(Map<String, Result> organizationsMap);", "@Override\n\tpublic void setSession(Map<String, Object> map) {\n\t\tsessionMap=(SessionMap<String, Object>) map;\n\t}", "private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\tlogger.info(\"map is null\");\n\t\t\tlogger.debug(\"maps is null\");\n\t\t\tSystem.out.println(\"map is null\");\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\taddMarker(markerLatLng);\n\t\t\t\t \n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\t\n\t\t\t// Creating an instance of MarkerOptions\n addMarker(markerLatLng);\n \n\t\t\n\t\t}\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "public void setPlayers(Hashtable<Integer, Player> players) {\r\n\t\tthis.players = players;\r\n\t}", "@Override\n\tpublic void setTeam(int i) {\n\t\t\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Intent info = getIntent();\n setUpMap(new LatLng(info.getDoubleExtra(\"latitude\", 0), info.getDoubleExtra(\"longitude\", 0)), info.getStringExtra(\"name\"));\n }\n }\n }", "@Override\r\n public void mapshow() {\r\n showMap l_showmap = new showMap(d_playerList, d_country);\r\n l_showmap.check();\r\n }", "@ReactMethod\n public void peopleSet(ReadableMap properties) {\n mixpanel.getPeople().set(this.readableMapToJson(properties));\n }", "void setHashMap();", "public void set_map(int[][] map) \n\t{\n\t\tthis.map = map;\n\t}", "public static void setSafeLogoutPlayers(Map<UUID, Integer> players) {\n safeLogoutPlayers = players;\n }" ]
[ "0.6761248", "0.6123317", "0.5899629", "0.5851614", "0.5749282", "0.5658721", "0.56138456", "0.56075436", "0.55986583", "0.559494", "0.5577707", "0.5531445", "0.5525581", "0.55248535", "0.5516952", "0.5511133", "0.54165494", "0.54061854", "0.538067", "0.53584695", "0.53434515", "0.5329985", "0.5301519", "0.5299181", "0.5295478", "0.52934587", "0.52845204", "0.5282611", "0.5268446", "0.52675825", "0.52469015", "0.5239858", "0.52370983", "0.52304626", "0.5226731", "0.52255946", "0.5213071", "0.5207599", "0.52065974", "0.52038574", "0.5194606", "0.5188816", "0.5179489", "0.517698", "0.51691604", "0.51628274", "0.51618075", "0.5157926", "0.5141662", "0.5136172", "0.51324767", "0.513086", "0.5128767", "0.5126054", "0.5125023", "0.51179236", "0.51105726", "0.5098475", "0.50815237", "0.5079865", "0.5078251", "0.50707734", "0.506553", "0.5064214", "0.50632614", "0.5061509", "0.5058336", "0.50515574", "0.50503904", "0.50470895", "0.5045202", "0.50445336", "0.5036667", "0.5035025", "0.50335467", "0.5033052", "0.5031154", "0.50296396", "0.5027919", "0.5019942", "0.5016328", "0.50115997", "0.50073284", "0.50053185", "0.50045913", "0.5003302", "0.49952367", "0.4981526", "0.49775094", "0.49749538", "0.49749538", "0.49749538", "0.49711403", "0.49696732", "0.49680373", "0.49653587", "0.4962229", "0.49599835", "0.49591628", "0.49574447" ]
0.77649224
0
Disables a player from attacking for 10 seconds
public void disablePlayerAttacking(final Player p) { p.sendMessage(ChatColor.GRAY + "You cannot attack for 10 seconds."); final Listener l = new Listener() { @EventHandler public void onPlayerDamage(EntityDamageByEntityEvent e) { if (e.getDamager() instanceof Player && e.getEntity() instanceof Player) { if (((Player) e.getDamager()).getName().equals(p.getName())) { e.setCancelled(true); } } } }; Bukkit.getPluginManager().registerEvents(l, RavenPlugin.get()); Bukkit.getScheduler().runTaskLater(RavenPlugin.get(), new Runnable() { public void run() { HandlerList.unregisterAll(l); } }, 10 * 20); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public int actionDelayTime(Entity attacker) {\n return 4000;\r\n }", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "private void attackPlayer()\n\t{\n\t\tif(shootTimer.done())\n\t\t{\n\t\t\tProjectile spiderWeb = new SpiderWeb(x, y);\n\t\t\tGame.objectWaitingRoom.add(spiderWeb);\n\t\t\tspiderWeb.shoot();\n\t\t\tshootTimer.setTime(200);\n\t\t}\n\t}", "private void attack() {\n final Random rnd = new Random();\n // Создаем WorkerThread\n attackerExecutor = Executors.newScheduledThreadPool(1);\n mAttackExecuter = attackerExecutor.scheduleWithFixedDelay(new Runnable() {\n @Override\n public void run() {\n for (int i =0; i<enemyPerWave;i++){\n int x = (int) (rnd.nextInt((int) (rightBorder-leftBorder))+leftBorder);\n\n createBossBall(x,0);\n }\n attackRatee-=attackLiveRate;\n if (attackRatee < 100){\n mAttackExecuter.cancel(true);\n attackerExecutor.shutdownNow();\n\n }\n }\n }, 0,attackLiveRate , TimeUnit.MILLISECONDS);\n\n }", "public static void disable(Player p) {\n\t\tswitch (p.name) {\n\t\tcase \"Captain America\":\n\t\t\tca_attack.setEnabled(false);\n\t\t\tbreak;\n\t\tcase \"Hawkeye\":\n\t\t\the_attack.setEnabled(false);\n\t\t\tbreak;\n\t\tcase \"Black Widow\":\n\t\t\tbw_attack.setEnabled(false);\n\t\t\tbreak;\n\t\tcase \"Hulk\":\n\t\t\thulk_attack.setEnabled(false);\n\t\t\tbreak;\n\t\tcase \"Thor\":\n\t\t\tthor_attack.setEnabled(false);\n\t\t\tbreak;\n\t\tcase \"Loki\":\n\t\t\tloki_attack.setEnabled(false);\n\t\t\tbreak;\n\t\t}\n\t}", "public void unleash() {\n\t\tlocked = false;\n\t\tfloat percent = framesAccelerated/60.0f;\n\t\tif (percent > 1) percent = 2 - percent;\n\t\tif (percent < 0) percent = 0;\n\t\t\n\t\tif (player.aiControlled()) {\n\t\t\tpercent = AIcontroller.randomStartBoost();\n\t\t}\n\t\t\n\t\tspeed = MAX_SPEED * percent;\n\t}", "public void attack() {\n this.attacked = true;\n }", "public void acivatePlayer() {\n\t\tthis.setEnabled(true);\n\t}", "private void resetCooldown() {\n nextAttack = tower.getFireFrequency();\n }", "public void attemptAttack() {\r\n\t\tattackAttempts += 100;\r\n\t}", "protected void attack(){\n\t\tif(reloadTime-- <= 0){\n\t\t\treloadTime = 0;\n\t\t}\n\t\tif(!hostileInRange())\n\t\t\treturn;\n\t\tif(!rotate()){\n\t\t\tif(reloadTime <= 0){\n\t\t\t\tshotAt(this.target);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run() {\n secondsLeft--;\n Bukkit.getBanList(BanList.Type.NAME).addBan(player.getName(), bold(ChatColor.BOLD) + String.format(\"BANNED FOR %s SECONDS FOR JOHN LOGGING!\", secondsLeft), null, null);\n if (secondsLeft == 1) {\n Bukkit.getBanList(BanList.Type.NAME).pardon(player.getName());\n this.cancel();\n }\n }", "public void desactivatePlayer() {\n\t\tthis.setEnabled(false);\n\t}", "public static void attackHandler(Player player) {\n\t\tif (player.getAttackTimer() > 0) {\n\t\t\tplayer.setAttackTimer(player.getAttackTimer() - 1);\n\t\t}\n\t\tif (player.getNpcIdAttacking() > 0 && player.getAttackTimer() == 0) {\n\t\t\tNpc NPC = NpcHandler.npcs[player.getNpcIdAttacking()];\n\t\t\tCombatNpc.attackNpc(player, NPC);\n\t\t}\n\t\tif (player.getPlayerIdAttacking() > 0) {\n\t\t\tPlayer victim = PlayerHandler.players[player.getPlayerIdAttacking()];\n\t\t\tif (player.getAttackTimer() == 0) {\n\t\t\t\tAttackPlayer.handlePlayerAttack(player, victim, false);\n\t\t\t}\n\t\t\telse if (player.getAttackTimer() > 0 && player.graniteMaulSpecialAttackClicks > 0 && player.getSpecialAttackAmount() >= 5 && Combat.hasGraniteMaulEquipped(player)) {\n\t\t\t\tAttackPlayer.handlePlayerAttack(player, victim, true);\n\t\t\t}\n\t\t\telse if (player.getAttackTimer() > 0 && player.getWieldedWeapon() == 20849 && player.isUsingSpecial() && player.getSpecialAttackAmount() >= 2.5) {\n\t\t\t\tAttackPlayer.handlePlayerAttack(player, victim, true);\n\t\t\t}\n\t\t}\n\t}", "public void attack() {\n if (activeWeapon == null) {\n return;\n }\n attacking = true;\n }", "public LimitedPlayer() {\r\n\t\tsuper.setturnsLimit(10);\r\n\t}", "public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }", "public static void handleDisruptionShield(Player player) {\n\t\t\n\t}", "public void attack(Player p){\n p.takeDamage(damage);\n }", "void setMaxCooldown(int maxCooldown);", "public void disable() {\n // Iterate through all players\n for (Map.Entry<UUID, PlayerAFKModel> entry : players.entrySet())\n {\n Player player = Bukkit.getPlayer(entry.getValue().getPlayer().getUniqueId());\n\n // Check if player fetch was successful\n if (player != null) {\n // Check if player is AFK\n if( entry.getValue().isAFK() )\n {\n // Is AFK. Update AFK timer before removal\n entry.getValue().updateAFKTimer();\n entry.getValue().markAsNotAFK();\n }\n } else {\n ConsoleUtil.logError(SuitePluginManager.Statistics.Name.full,\n \"Failed to disable AFK Manager. Report to developer!\");\n }\n }\n players.clear();\n }", "int delay(Player player);", "public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }", "public void resetTimeLimitAction();", "public void countDown() {\n makeTimer();\n int delay = 100;\n int period = 30;\n timer.scheduleAtFixedRate(new TimerTask() {\n public void run() {\n tick();\n updatePlayerHealthUI();\n }\n }, delay, period);\n }", "public void dontDie()\n\t{\n\t\ttimerList.remove(deathTimer);\n\t}", "public void enableSurvivialMode()\n\t{\n\t\tthis.player.useFlyingMode = false;\n\t\tthis.player.setHealth(100f);\n\t}", "public void Hit()\n {\n this.numLives--;\n //Oscillate visible and not if the number of lives is greater than zero\n if(this.numLives > 0)\n {\n this.damaged = true;\n this.Blink(1);\n\n }\n }", "public void attack(Player p) {\n\t\tif (isVisible) {\n\t\t\tp.reduceHealthBy(1, x, y, width, height);\n\t\t}\n\t\tif (p.invincible) {\n\t\t\tp.receiveKnockback(x, y, width, height, 1.0);\n\t\t}\n\t}", "private void control() {\n try {\n gameThread.sleep(17);\n } catch (InterruptedException e) { }\n }", "public void suffer(int damage){\r\n\t\thp -= damage;\r\n\t\tinvulnerable = true;\r\n\t}", "public void strike(Player player) {\n Random random = new Random();\n takeDamage(random.nextInt(100));\n if(isAlive()){\n player.takeDamage(strength);\n\n }\n\n }", "protected void whileDisable()\n\t{\n\n\t}", "private void dance() {\n\t\t// if they are done dancing, start sleeping\n\t\tif(danceDuration <= 0){\n\t\t\thive.dancingBees.remove(this);\n\t\t\tstate = \"SLEEPING\";\n\t\t}\n\t\telse{ // otherwise keep dancing and decrease duration of dance\n\t\t\tdanceDuration--;\n\t\t}\n\t}", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "public abstract void attackPlayer(Player p);", "@Override\n\tpublic void startCooldown() {\n\t\tthis.setSpecialAttackCooldown(HunterKillerConstants.SOLDIER_COOLDOWN);\n\t}", "@Override\n\tpublic void attack() {\n\n\t}", "@Override\n\tpublic void attack() {\n\t\t\n\t}", "public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }", "@Override\n\tpublic void attack() {\n\t}", "public static void endAttack (boolean isStillAbleToAttack) {\r\n if (Game.ActiveAttackingMonster.isExisting) {\r\n SummonedMonster SumMonster = getNthSummonedMonster(Game.ActiveAttackingMonster.sumMonsterNumber, Game.ActiveAttackingMonster.isPlayersMonster);\r\n SumMonster.canStillAttackThisTurn=isStillAbleToAttack;\r\n if (!isStillAbleToAttack && SumMonster.Monster.equals(Mon.MonsterStealer)) {\r\n SumMonster.canStillUseOncePerTurnEffect=false; // if Monster Stealer attacked, it can not use its effect for the rest of the turn, due to its own effect\r\n }\r\n Game.ActiveAttackingMonster = new SummonedMonster(true, 0);\r\n Game.ActiveGuardingMonster = new SummonedMonster(false, 0);\r\n }\r\n if (!Game.isPlayersTurn) {\r\n AIdelegate.cpuContinuesPlayingTurn();\r\n }\r\n }", "void setRemainingCooldown(int remainingCooldown);", "@Override\n public void attack() {\n\n }", "void evadeAttack(IUnit attacker, int incomingDamage);", "private void avoidClickHack(Context context) {\n try {\n MediaPlayer mp = MediaPlayer.create(context, R.raw.silence);\n mp.start();\n Thread.sleep(10);\n mp.stop();\n mp.release();\n } catch (Exception e) {\n Log.e(TAG, e.toString());\n }\n }", "public void gameAttack(){\n int counter = 0;\n while (currentPlayer.wantToAttack(this)){\n counter++;\n if (counter > 100) break;\n /*In rare cases, AI players will repeatedly select the same attackers and defenders\n while also not wanting to dice fight. That will infinitely loop here and this counter will prevent it\n Under normal circumstances, no reasonable player will ever try to do more than 100 separate attacks in the same turn\n */\n\n String[] attackerDefender = {\"\",\"\"};\n //AttackStarterSelection\n attackerDefender[0] = currentPlayer.chooseAttackStarter(this);\n\n //AttackDefenderSelection\n attackerDefender[1] = currentPlayer.chooseAttackDefender(this, attackerDefender[0]);\n\n //DiceFightOrQuit\n int attackerDice, defenderDice;\n while (currentPlayer.wantToDiceFight(this, attackerDefender[0]+ \",\" + attackerDefender[1])){\n //DiceFightAttackerChoice\n attackerDice = currentPlayer.getAttackerDice(this, getTerritory(attackerDefender[0]));\n\n //DiceFightDefenderChoice\n Player defender = this.getPlayerFromList(this.getTerritory(attackerDefender[1]).getOwner());\n defenderDice = defender.getDefenderDice(this, this.getTerritory(attackerDefender[1]));\n\n\n //DiceFight results\n displayMessage(this.diceFight(attackerDefender, attackerDice,defenderDice));\n\n //Possible elimination and announcement of winner\n //Current diceFight ends if attacker has 1 troop left, or territory is conquered\n if (endDiceFight(attackerDefender, attackerDice)) break;\n\n }//End diceFightOrQuit\n\n\n }//End wantToAttack\n //Proceed to fortify stage of turn\n }", "public void attack();", "public void disable();", "@Override\r\n public void handleAttack(Player player) {\r\n player.decreaseHealth(3);\r\n player.setColor(true);\r\n }", "public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}", "public void sleep() {\n \t\thealth = maxHealthModifier;\n \t\ttoxicity = 0;\n \t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep((long) time);\r\n\t\t\t\t\tleftOff();\r\n\t\t\t\t\tif(unhook)\r\n\t\t\t\t\t\tunhookLEDs();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t}\r\n\t\t\t}", "void playerHit() {\n if (lives == 0) {//if no lives left\n isDead = true;\n } else {//remove a life and reset positions\n lives -=1;\n immortalityTimer = 100;\n resetPositions();\n }\n }", "private void subtractPlayerSheild(int damage) {\n this.playerShield -= damage;\n }", "void disable();", "void disable();", "public void moveEveryoneExcept(Player player) throws IOException, InterruptedException { }", "public void kill() {\n this.hp = 0;\n }", "public void brake(){\n if (speed <= 0){\n speed = 0;\n }\n else{\n speed -= 5;\n }\n }", "public void act() \r\n {\r\n Controller world = (Controller) getWorld();\r\n player = world.getPlayer();\r\n if (this.isTouching(Player.class))\r\n {\r\n player.minusHealth(5);\r\n world.removeObject(this);\r\n }\r\n }", "public boolean tryPerformAction(int playerObjId, int action)\n\t{\n\t\tEntry<Integer, Integer[]> entry = _floodClient.getEntry(playerObjId);\n\t\tInteger[] value = entry.getValue();\n\n\t\tif (value[action] < GameTimeController.getInstance().getGameTicks())\n\t\t{\n\t\t\tvalue[action] = GameTimeController.getInstance().getGameTicks() + REUSEDELAY[action];\n\t\t\tentry.setValue(value);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void eating(){\n int sleepTime = (int)(Math.random()*2000);\n try{\n Thread.sleep(sleepTime);\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep((long) time);\r\n\t\t\t\t\trightOff();\r\n\t\t\t\t\tif(unhook)\r\n\t\t\t\t\t\tunhookLEDs();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t}\r\n\t\t\t}", "public void attack() {\n\n }", "public void run() {\n isRunningTime = true;\n\n coolDownTime.put(target, coolDownTime.get(target) - 1);\n\n if(coolDownTime.get(target) <= 0) {\n coolDownTime.remove(target);\n\n target.sendMessage(DwD + ChatColor.GOLD + \"Your Dark Cloud cooldown has expired.\");\n\n isRunningTime = false;\n\n taskCoolDownToCancel.cancel();\n }\n }", "private void suspend()\n {\n Player target = p.getServer().getPlayer(targetID);\n if (target == null)\n {\n kill();\n return;\n }\n\n addAdditionalEffects();\n\n // suspend them in the air\n originalLocation = target.getLocation();\n Location newLoc = target.getEyeLocation();\n Location suspendLoc = new Location(newLoc.getWorld(), newLoc.getX(), newLoc.getY(), newLoc.getZ(), originalLocation.getYaw(), 45);\n target.teleport(suspendLoc);\n\n suspended = true;\n }", "private void killBullet() {\r\n this.dead = true;\r\n }", "public void setDelayedTimeout(int seconds);", "public void Attack()\n\t{\n\t\tif(action && waitingFrames == 0)\n\t\t{\n\t\t\tspriteImageView.setImage(new Image(\"image/main_attack.png\"));\n\t\t\tswitch(getDirection())\n\t\t\t{\n\t\t\t\tcase \"UP\": \tspriteImageView.setViewport(new Rectangle2D(300, 0, width, height)); action = false; break;\n\t\t\t\tcase \"DOWN\": spriteImageView.setViewport(new Rectangle2D(0, 0, width, height)); action = false; break;\n\t\t\t\tcase \"LEFT\": spriteImageView.setViewport(new Rectangle2D(100, 0, width, height)); action = false; break;\n\t\t\t\tcase \"RIGHT\": spriteImageView.setViewport(new Rectangle2D(200, 0, width, height)); action = false; break;\n\t\t\t\tdefault: break;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void autoStopForwardDelayTime(int delay) throws JposException;", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep((long) time);\r\n\t\t\t\t\tallOff();\r\n\t\t\t\t\tif(unhook)\r\n\t\t\t\t\t\tunhookLEDs();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t}\r\n\t\t\t}", "public void attackMonster(World world){\n\t\tif ((UnitManager.unitNearPlayer(world.getPlayer(),this,PLAYER_RANGE) == true \n\t\t\t\t\t&& RPG.isAttacking()) && world.getPlayer().isAttack()) {\n\t\t\tthis.getUnitStats().reduceHP(world.getPlayer().damageAmount());\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t}\n\t}", "public boolean delayer() {\n int secondsToDelay = rand.nextInt(3) + 1;\n if (timeCounter < secondsToDelay) {\n timeCounter += GameRound.elapsedTime;\n return true;\n }\n timeCounter = 0;\n movingLeft = false;\n movingRight = false;\n return false;\n }", "public void die(){\n \tif (resetdelay<=0){ //if he didn't just die\r\n \t\tresetdelay = 100; //gives the frog 100 frames of invincibility\r\n \t\tlives-=1;\r\n \t}\r\n }", "void playerTurn(Player actualPlayer) {\n aiPlayer.chooseAction(actualPlayer);\n actualPlayer.setTheirTurn(false);\n }", "public abstract void attack(Player p);", "public void attack(User p)\n\t{\n\t\tint damage = getAttack() - p.getDefense();\n\t\tint evade = 0;\n\t\tif(damage <= 0)\n\t\t{\n\t\t\tevade = p.getDefense() - getAttack();\n\t\t\tdamage = 1;\n\t\t}\n\t\t\n\t\tif(Math.random() * 100 < evade * 5)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"Miss\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tp.reduce(damage);\n JOptionPane.showMessageDialog(null,\"Enemy attacked you! User's health = \" + p.getHealth() + \"\\n\" + \"Damage dealt = \" + damage); \n\t}", "protected void kill() {\n\t\tsetDeathTime(0.6);\n\t}", "@Override\r\n\tpublic void Attack(Player arg0, Player arg1) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void Attack(Player arg0, Player arg1) {\n\t\t\r\n\t}", "private void attackPhase(Player p) \n\t{\n\t\tp.attack();\n\t}", "public void attack() { \n db.attack(creatures.get(creatureId), players.get(playerId));\n creatures.set(creatureId, db.getCreature(creatures.get(creatureId).getId()));\n players.set(playerId, db.getPlayer(players.get(playerId).getId()));\n setTextFields();\n }", "public static void cancelAttackAndEndBattlePhase (boolean isUsedByPlayer) {\r\n if (isUsedByPlayer) {\r\n playerEffectivelyEndsBattlePhase();\r\n }\r\n else {\r\n cpuEffectivelyEndsBattlePhase();\r\n }\r\n }", "void disableMod();", "void updateNextUnblockTime(int t);", "@Override\n protected void swimAction(long timer){}", "public void act() \n {\n if(timer > 0){\n timer--;\n }else{\n Greenfoot.playSound(\"explosionSound.wav\");\n getWorld().removeObject(this);\n }\n }", "public void takeAway20SZTFromPlayer(Player player) {\n\t\tplayer.lowerScore(20);\n\t\tcurrent.raiseScore(20);\n\t}", "private void shoot() {\n\t\tif (playerList.size() > 0) {\n\t\t\tif (!someoneLose) {\n\t\t\t\tPlayer target = null;\n\t\t\t\tint remainingShips = SHIP_COUNT + 1;\n\t\t\t\tfor (Player player : playerList) {\n\t\t\t\t\tif (player.getRemainingShips() < remainingShips) {\n\t\t\t\t\t\ttarget = player;\n\t\t\t\t\t\tremainingShips = player.getRemainingShips();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSector targetSector = target.findFreeSector();\n\t\t\t\tlastTarget = targetSector.getMiddle();\n\t\t\t\tShootingThread st = new ShootingThread(chordImpl, targetSector.getMiddle());\n\t\t\t\tst.start();\n\t\t\t}\n\t\t}\n\t}", "int getRemainingCooldown();", "public void muteTimer(){\n\t\t//TODO: impl.\n\t\t/*\n\t\tThread worker;\n\t\t//do it in its own thread\n\t\tworker = new Thread() {\n \tpublic void run() {\n \t\t//mute and wait a bit (2s)\n \t\tmute();\n \t\ttry { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); }\n \t\t//then start checking for ILA actions\n \t\tint counter=100;\t\t//max wait 20s\n \t\twhile( (ILA_interface.avatar.isILAspeaking() || ILA_interface.avatar.is_recording==1) & counter>1 ){\n \t\t\tcounter--;\n \t\t\tILA_debug.println(\"ADDON-KODI - mute timer is waiting...\",2);\t\t\t//debug\n \t\t\ttry { Thread.sleep(200); } catch (InterruptedException e) { e.printStackTrace(); }\n \t\t}\n \t\t//timers are over: unmute\n \t\tunmute();\n \t}\n };\n worker.start();\n */\n\t}", "public void takeAttack(int damage) {\r\n if(this.evasion > 0)\r\n this.evasion--;\r\n else\r\n this.takeDamage(damage);\r\n }", "@Override\n\tpublic int attack( ){\n\t\treturn enemy.attack();\n\t}", "public void attack() {\n\n for (int i = 0; i < Vampiro.getNumVamp(); i++) {\n\n lista[i].attack();\n }\n }", "private static void attack(RobotInfo target) throws GameActionException {\n if (SOLDIER_DEBUG) {\n System.out.println(\"attacking\");\n }\n BulletInfo[] bullets = rc.senseNearbyBullets(EvasiveSoldier.BULLET_DETECT_RADIUS);\n RobotInfo[] robots = rc.senseNearbyRobots(EvasiveSoldier.ENEMY_DETECT_RADIUS);\n MapLocation targetLocation = target.getLocation();\n move(bullets, robots, targetLocation);\n //RobotUtils.tryMoveDestination(targetLocation);\n if (TargetingUtils.clearShot(here, target) || (rc.getType() == RobotType.GARDENER && rc.getOpponentVictoryPoints() > 10)) {\n if (SOLDIER_DEBUG) {\n System.out.println(\"clearShot to target\");\n }\n Direction towardsEnemy = here.directionTo(targetLocation);\n float distanceEnemy = here.distanceTo(targetLocation);\n if (distanceEnemy <= 3.5 && rc.canFirePentadShot() && rc.getTeamBullets() > 200) {\n rc.firePentadShot(towardsEnemy);\n }\n else {\n if (rc.canFireTriadShot() && rc.getTeamBullets() > 50) {\n rc.fireTriadShot(towardsEnemy);\n }\n else if (rc.canFireSingleShot()) {\n rc.fireSingleShot(towardsEnemy);\n }\n }\n }\n }", "public void updateCooldown(User u) {\r\n\t\tfor (int i = 0; i < Main.Bot.cooldown.size(); i++) \r\n\t\t\tif (Main.Bot.cooldown.get(i).hasUser(u) && Main.Bot.cooldown.get(i).t - System.currentTimeMillis() <= 0) \r\n\t\t\t\tMain.Bot.cooldown.remove(i);\r\n\t\t\t\r\n\t\t\r\n\t}", "void onAttackDestroyed(AttackObject attack) {\n attacksToDelete.add(attack);\n if(attack.isPlayerAttack()){\n playerAttackCount--;\n }\n }", "public void tick() {\n if (ShulkerEntity.this.world.getDifficulty() != Difficulty.PEACEFUL) {\n --this.attackTime;\n LivingEntity livingentity = ShulkerEntity.this.getAttackTarget();\n ShulkerEntity.this.getLookController().setLookPositionWithEntity(livingentity, 180.0F, 180.0F);\n double d0 = ShulkerEntity.this.getDistanceSq(livingentity);\n if (d0 < 400.0D) {\n if (this.attackTime <= 0) {\n this.attackTime = 20 + ShulkerEntity.this.rand.nextInt(10) * 20 / 2;\n ShulkerEntity.this.world.addEntity(new ShulkerBulletEntity(ShulkerEntity.this.world, ShulkerEntity.this, livingentity, ShulkerEntity.this.getAttachmentFacing().getAxis()));\n ShulkerEntity.this.playSound(SoundEvents.ENTITY_SHULKER_SHOOT, 2.0F, (ShulkerEntity.this.rand.nextFloat() - ShulkerEntity.this.rand.nextFloat()) * 0.2F + 1.0F);\n }\n } else {\n ShulkerEntity.this.setAttackTarget((LivingEntity)null);\n }\n\n super.tick();\n }\n }", "private void enemyturn() {\n if (enemy.getHealth() == 0) { // check if the enemy is still alive\n enemy.setAlive(false);\n }\n\n if (enemy.getAlive()) { // if he is alive\n // time to fuck the players day up\n System.out.println(\"\");//formatting\n System.out.println(enemy.getName() + \" attacks you!\");\n\n // calculate the damage this enemy will do\n int differenceHit = enemy.getMaxHit() - enemy.getMinHit(); // difference will be 0-3. But plus 1 (as the result will ALWAYS be +1 in the randomizer so a \"0\" will not happen.\n int minimumDamage = randomize.getRandomDamage(differenceHit); // for example, will return 0-4 if the min and max hit was 4-7. Then do a -1. Making it a 0-3 chance.\n int damage = differenceHit + minimumDamage; // add the minimum damage, to random hit damage.\n\n // calculate the players armor\n damage = damage - player.getPlayerArmorRating();\n if (damage <= 0){\n System.out.println(\"... but you dont take any damage because of your armor!\");\n } else {\n\n System.out.println(\"You take \" + damage + \" damage!\");\n player.removeHealth(damage);\n }\n\n } else { // when ded\n System.out.println(\"The enemy has no chance to fight back. As your final blow killed the enemy.\");\n }\n }" ]
[ "0.66239154", "0.65669364", "0.6564921", "0.6430869", "0.63903785", "0.6326094", "0.63121384", "0.6291603", "0.6271139", "0.6265877", "0.6146839", "0.6140379", "0.61096215", "0.59720606", "0.5934687", "0.59135747", "0.59065", "0.5903845", "0.5901674", "0.58849835", "0.5881961", "0.58817786", "0.58713377", "0.5851542", "0.5837665", "0.5824449", "0.5808952", "0.58058256", "0.57776403", "0.5764541", "0.5758141", "0.5747465", "0.57419705", "0.57301414", "0.57214445", "0.5709014", "0.5704446", "0.5701988", "0.5692426", "0.56916004", "0.5679236", "0.5676644", "0.567659", "0.5667766", "0.5659677", "0.5657817", "0.5652318", "0.5650112", "0.563212", "0.56253713", "0.562167", "0.5618991", "0.56172144", "0.5616333", "0.56063557", "0.55977875", "0.55977875", "0.559501", "0.55852145", "0.55630976", "0.55611616", "0.5553845", "0.55504584", "0.5543364", "0.55382043", "0.5537604", "0.55316037", "0.5524291", "0.552338", "0.552217", "0.5522074", "0.5505934", "0.5505704", "0.55019695", "0.5500246", "0.5499558", "0.54954606", "0.54919475", "0.54879916", "0.5487795", "0.5487795", "0.5485181", "0.5480341", "0.5479746", "0.5479207", "0.5473378", "0.5472045", "0.5471399", "0.5468242", "0.54675543", "0.54648554", "0.54641557", "0.5463967", "0.5462048", "0.54527545", "0.5451174", "0.5450774", "0.54492813", "0.544679", "0.54462767" ]
0.7666191
0
TODO Autogenerated method stub
public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String input = br.readLine(); StringBuilder sb = new StringBuilder(); while (!input.equals("#")) { int[] arr = new int[2]; char[] inputs = input.toCharArray(); for (int i = 0; i < inputs.length - 1; i++) { arr[inputs[i] - '0']++; } sb.append(input.substring(0, input.length() - 1)); if (inputs[inputs.length - 1] == 'e') { if (arr[1] % 2 == 1) { sb.append(1); } else { sb.append(0); } } else { if (arr[1] % 2 == 1) { sb.append(0); } else { sb.append(1); } } sb.append(System.lineSeparator()); input = br.readLine(); } System.out.print(sb.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
/when a month pass is called on the animal, health is decreased, if there is available food, it eats an item of food and its age is incremented by a month
public boolean aMonthPasses() { decreaseHealth(); age++; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void haveFun() {\n\t\tint action = inputPrompt.funActivities(money);\r\n\t\tthis.money -= action;\r\n\t\t//has better effect depending on how much money you have spent\r\n\t\tthis.mentalHealth += FUNHEALTH + action;\r\n\t\tdailyTime--;\r\n\t\tinputPrompt.mainInfo(energy, physHealth, mentalHealth, money);\r\n\t\t\r\n\t}", "protected void incrementAge()\n {\n age++;\n if(age > max_age) {\n setDead();\n }\n }", "public void grow() {\n if (!getIsWilted()) {\n age++;\n }\n }", "public void takeDamage(int damage) {\n\t\tlife = (life-damage<0)?0:life-damage;\n\t}", "public void refillLife(){\r\n\t\tthis.life = totalLife;\r\n\t}", "public void meditate() {\n int currentSamuraiHealth = this.getHealth();\n this.setHealth(currentSamuraiHealth/2 + currentSamuraiHealth);\n System.out.println(\"Samurai's new health is : \" + this.getHealth());\n }", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "private void updateAgilisaurusState() {\n this.age++;\n\n if (this.age == 30 && this.hasCapability(LifeStage.BABY)) {\n // grow up\n this.removeCapability(LifeStage.BABY);\n this.addCapability(LifeStage.ADULT);\n this.displayChar = 'D';\n }\n\n if (this.foodLevel > 0) {\n this.foodLevel--;\n }\n\n if (this.waterLevel > 0) {\n this.waterLevel--;\n }\n\n if (this.foodLevel < 30) {\n this.behaviour = new HungryBehaviour();\n }\n\n if (this.foodLevel > 50) {\n this.behaviour = new BreedBehaviour();\n }\n\n if (this.foodLevel == 0) {\n this.Starving();\n } else {\n this.starvationLevel = 0;\n }\n\n if (this.waterLevel < 30) {\n this.behaviour = new ThirstBehaviour();\n }\n\n if (this.waterLevel == 0) {\n this.Thirsting();\n } else {\n this.thirstLevel = 0;\n }\n }", "private void takeDamage(int damage){ health -= damage;}", "public void recieveDamage(){\n this.health--;\n }", "public void decreaseLive(int dammage_)\n\t{\n\t int diff=(this.getLife())-dammage_;\n\t diff=diff*(getCoefficientDefense());\n\t this.life=diff;\n\t}", "public void takeDamage(int amount){\r\n\t\tthis.life = this.life - amount;\r\n\t}", "public void age() {\r\n hp--;\r\n darkerColor();\r\n }", "public void depleteFood(float dt){\n\t\tthis.foodLevel -= dt* this.starvationRate;\n\t\t\n\t}", "public void tick() {\n\t\tthis.hunger += 1;\n\t\tthis.thirst += 1;\n\t\tthis.tiredness += 1;\n\t\tthis.boredom += 1;\n\t\tthis.age += 1;\n\t\tif (this.getHunger() > 90 && this.getHunger() < 100) {\n\t\t\tSystem.out.println(this.getVirtualPetName() + \" may need to be fed!\");\n\t\t}\n\t\tif (this.getThirst() > 90 && this.getThirst() < 100) {\n\t\t\tSystem.out.println(this.getVirtualPetName() + \" seems to be thirsty!\");\n\t\t}\n\t\tif (this.getSleep() > 95 && this.getSleep() < 100) {\n\t\t\tSystem.out.println(this.getVirtualPetName() + \" may be tired!\");\n\t\t}\n\t\tif (this.getPlay() > 95 && this.getPlay() < 100) {\n\t\t\tSystem.out.println(this.getVirtualPetName() + \" seems to be bored. Please play with it!\");\n\t\t}\n\t}", "protected void incrementHunger()\n {\n food_level--;\n if(food_level <= 0) {\n setDead();\n }\n }", "public void reduceAnimalHealth() {\n\t\thealth -= 10;\n\t}", "public void checkGrowth() {\n if (age == 100) {\n double h = ((Growable)delegate).currentHealth;\n delegate = new Sprout(gc, x, y, h);\n }\n if (age == 200) {\n double h = ((Growable)delegate).currentHealth;\n delegate = new Bud(gc, x, y, h);\n }\n if (age == 300) {\n double h = ((Growable)delegate).currentHealth;\n delegate = new Blossom(gc, x, y, h);\n }\n if (age == 400) {\n double h = ((Growable)delegate).currentHealth;\n delegate = new Bloom(gc, x, y, h);\n }\n if (age == 500) {\n delegate = new Seed(gc, x, y);\n age = 0;\n GameManager.score += 100;\n }\n\n if (getCurrentHealth() <= 0) {\n delegate = new Seed(gc, x, y);\n GameManager.lives--;\n }\n delegate.wilt();\n delegate.update();\n }", "void dailyLife() {\n\t\tString action = inputPrompt.dailyOptions(dailyTime).toLowerCase();\r\n\t\tswitch(action) {\r\n\t\tcase \"exercise\":\tthis.exercise();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"study\":\t\tthis.study();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"rocket\":\t\tthis.buildRocket();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"eat\":\t\t\tthis.eat();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"meds\":\t\tthis.getEnergised();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"fun\":\t\t\tthis.haveFun();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tdefault:\t\t\tdailyLife();\r\n\t\t}\t\r\n\t}", "public void feed() {\n\t\tif (health + 20 > 100) {\n\t\t\thealth = 100;\n\t\t} else {\n\t\t\thealth += 20;\n\t\t}\n\t}", "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "public Meal(Date date, Dish dish, String category) {\n this.date = date;\n this.dish = dish;\n this.category = category;\n this.done = 0;\n }", "public void heal(ItemPotion itemPotion) {\n\t\tint old_life = life;\n\t\tlife += itemPotion.getValue(); //On récupère une valeur temporaire\n\t\tif(life<MIN_LIFE) life = MIN_LIFE;\n\t\tif(life>MAX_LIFE) life = MAX_LIFE;\n\t\t\n\t\tif(life<old_life) {\n\t\t\tDisplay.sendMessage(\"Vous avez perdu \" + (old_life-life) + \" point\"+(old_life-life>1?\"s\":\"\")+\" de vie\");\n\t\t}\n\t\telse {\n\t\t\tDisplay.sendMessage(\"Vous avez regagné \" + (life-old_life) + \" point\"+(life-old_life>1?\"s\":\"\")+\" de vie\");\n\t\t}\n\t}", "public void tick(){\n oilLevel --;\n maintenance --;\n happiness --;\n health --;\n boredom ++;\n }", "public void reduceHealth(int ammo_damage){\n this.health -= ammo_damage;\n }", "public void calculateMMage() {\n\t\t\n\t}", "public abstract void incrementHealth(int hp);", "public void setAverageLifeExp(int age) {\n averageLifeExp = age;\n }", "public void reduceAnimalHappiness() {\n\t\thappiness -= 10;\n\t}", "public void increaseLife() {\n setChanged();\n notifyObservers(new Pair<>(\"increaseLives\", 1));\n }", "@Override\n public void mature(Farm farm, Animal animal) {\n }", "public void takeDamage(int damage) {\n Random rand = new Random();\n int game = rand.nextInt(51) + 75;\n double game2 = (double) game;\n double percDamage = game2/100.0;\n double realSomething = (double) damage;\n double actualDamageNotReal = realSomething * percDamage;\n int actualDamage = (int) actualDamageNotReal;\n int actualDmg = actualDamage - this.armour;\n if (actualDmg <= 0){\n actualDmg = 0;\n }\n this.health -= actualDmg;\n slowDisplay(String.format(\"%s takes %s damage, now at %s\\n\",this.name,actualDmg,this.health));\n\n }", "public void healthDelta(int health_delta)\n {\n this.health += health_delta;\n this.health = Math.min(this.health, DataBase.getSettings().tanksHealth);\n }", "@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}", "public void addLife() {lives++;}", "public void setLife(int amount){\r\n\t\tthis.life = amount;\r\n\t}", "public void reduceHealth(int damage){\n health -= damage;\n }", "public void buyDecreaseDamage() {\n this.decreaseDamage++;\n }", "private void calcCalories()\n\t{\n\t\tif (getIntensity() == 1)\n\t\t{\n\t\t\tbikeCal = 10 * bikeTime; \n\t\t}\n\t\telse if (getIntensity() == 2)\n\t\t{\n\t\t\tbikeCal = 14.3 * bikeTime; \n\t\t}\n\t\telse {\n\t\t\tJOptionPane.showMessageDialog(null, \"error\");\n\t\t}\n\t}", "private void eatCookedMeal(double eatingTime) {\n\t\t// Obtain the dry mass of the dessert\n\t\tdouble dryMass = cookedMeal.getDryMass();\n\t\t// Proportion of meal being eaten over this time period.\n\t\tdouble proportion = person.getEatingSpeed() * eatingTime;\n\n\t\tif (cumulativeProportion > dryMass) {\n\t\t\tdouble excess = cumulativeProportion - dryMass;\n\t\t\tcumulativeProportion = cumulativeProportion - excess;\n\t\t\tproportion = proportion - excess;\n\t\t}\n\n\t\tif (proportion > MIN) {\n\t\t\t// Add to cumulativeProportion\n\t\t\tcumulativeProportion += proportion;\n\t\t\t// Food amount eaten over this period of time.\n\t\t\tdouble hungerRelieved = RATIO * proportion / dryMass;\n\t\t\t\t\t\n//\t\t\tlogger.info(person + \" ate '\" + cookedMeal.getName()\n//\t\t\t\t\t+ \" currentHunger \" + Math.round(currentHunger*100.0)/100.0\n//\t\t\t\t\t+ \" hungerRelieved \" + Math.round(hungerRelieved*100.0)/100.0\n//\t\t\t\t\t+ \" proportion \" + Math.round(proportion*1000.0)/1000.0\n//\t\t\t\t\t+ \" EatingSpeed \" + Math.round(person.getEatingSpeed()*1000.0)/1000.0\n//\t\t\t\t\t+ \" foodConsumptionRate \" + Math.round(foodConsumptionRate*1000.0)/1000.0);\n\t\t\t\n\t\t\t// Change the hunger level after eating\n\t\t\treduceHunger(hungerRelieved);\n\t\n\t\t\t// Reduce person's stress over time from eating a cooked meal.\n\t\t\t// This is in addition to normal stress reduction from eating task.\n\t\t\tdouble stressModifier = STRESS_MODIFIER * (cookedMeal.getQuality() + 1D);\n\t\t\tdouble newStress = condition.getStress() + (stressModifier * eatingTime);\n\t\t\tcondition.setStress(newStress);\n\t\n\t\t\t// Add caloric energy from meal.\n\t\t\tdouble caloricEnergyFoodAmount = proportion / dryMass * PhysicalCondition.FOOD_COMPOSITION_ENERGY_RATIO;\n\t\t\tcondition.addEnergy(caloricEnergyFoodAmount);\n\t\t}\n\t}", "public void incrementAge() {\n if (!this.isAlive) { return; }\n if (ageInWeeks + 1 > MAXIMUM_AGE_IN_WEEKS) {\n this.isAlive = false;\n } else {\n this.ageInWeeks++;\n }\n }", "public void receiveDamage(double damage) {\r\n health = health - damage;\r\n }", "public void takeDamage(int damage) {\r\n health -= damage;\r\n if(health<=0)setAlive(false);\r\n }", "@Override\n public int damage(){\n int damage = 0;\n Random rand = new Random();\n int x = rand.nextInt(20) + 1;\n if (x == 1)\n damage = 50;\n return damage; \n }", "public void calculateWageForMonth() {\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\temployeeAttendanceUsingCase();\n\t\t\ttotalSalary = totalSalary + salary;\n\t\t\t// return totalSalary;\n\t\t}\n\t}", "public static int calculatorAgeMonthFollowDayInjection(long dataOfBirth, long dayInjection) {\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(dataOfBirth);\n int dobYear = calendar.get(Calendar.YEAR);\n //the month between 0-11.\n int dobMonth = calendar.get(Calendar.MONTH) + 1;\n int dobDay = calendar.get(Calendar.DAY_OF_MONTH);\n\n calendar.setTimeInMillis(dayInjection);\n int djYear = calendar.get(Calendar.YEAR);\n //the month between 0-11.\n int djMonth = calendar.get(Calendar.MONTH) + 1;\n int djDay = calendar.get(Calendar.DAY_OF_MONTH);\n\n int offSetYear = djYear - dobYear;\n if (offSetYear < 0) {\n return -1;\n } else if (offSetYear == 0) {\n int offSetMonth = djMonth - dobMonth;\n if (offSetMonth < 0) {\n return -1;\n } else if (offSetMonth == 0) {\n return NOT_WEEK;\n } else {\n return offSetMonth;\n }\n } else {\n int offSetMonth = 12 * (offSetYear - 1);\n return (12 - dobMonth + offSetMonth + djMonth);\n }\n }", "public void beAttacked(int damage) {\r\n\t\tif (health > damage) {\r\n\t\t\thealth -= damage;\r\n\t\t}else {\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t}", "public boolean checkAge(Dating t);", "public void takeDamage(int damage) {\n this.damageTaken += damage;\n }", "public void feedCat(){\n this.isHungry = false;\n this.isHappy = false;\n }", "private void subtractEnemyHealth(int damage) {\n this.enemyShipHealth -= damage;\n }", "protected void dropFood() {\r\n\t\tthis.food++;\r\n\t}", "public void applyDamage(int damage)\r\n\t{\r\n\r\n\t}", "public void takeDamage(int damage) {\r\n this.health -= damage;\r\n if(this.health < 0)\r\n this.health = 0;\r\n }", "public void growLiving(){\n living += Math.round(Math.random());\n living -= Math.round(Math.random());\n \n if(living > 100){\n living = 100;\n }\n \n if(living < 0){\n living = 0;\n }\n }", "public int getLife(){\n return lifeTime;\n }", "public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }", "public void calculateEmpWage(int empHrs){\n \tint totalWorkingDays = 1;\n\tint totalWorkingHours = 0;\n\t/*\n\t*varable empAttendance tells if emp is present '0' or absent '1' on that day of the month\n\t*/\n\tint empAttendance;\n\t/*\n\t*variable monthlyWage stores the monthly wage of the employee\n\t*/\n int monthlyWage = 0;\n\t/*\n\t*variable daysPresent keeps count of the no of days present for a month\n\t*/\n\t int daysPresent = 0;\n\t /*\n\t *variable hoursWorked keeps count of the no of hours worked in a month\n\t */\n\t int hoursWorked = 0;\n\n\t while(true){\n\t Random rand = new Random();\n empAttendance = rand.nextInt(2);\n if(empAttendance == 0){\n daysPresent += 1;\n System.out.println(\"Day \"+totalWorkingDays+\": Present\");\n monthlyWage += CompanyEmpWage.getempRate() * empHrs;\n hoursWorked += empHrs;\n }\n else{\n System.out.println(\"Day \"+totalWorkingDays+\": Absent\");\n monthlyWage += 0;\n hoursWorked += 0;\n }\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays() || !(totalWorkingHours < CompanyEmpWage.getmaxHrs())){\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays()){\n System.out.println(CompanyEmpWage.getnumOfDays()+\" days are over!\");\n break;\n }\n else{\n System.out.println(CompanyEmpWage.getmaxHrs()+\" hours reached!\");\n break;\n }\n }\n\ttotalWorkingDays++;\n \ttotalWorkingHours += empHrs;\n }\n System.out.println(\"Company: \"+CompanyEmpWage.getcompName()+\"\\nNo of days worked out of \"+CompanyEmpWage.getnumOfDays()+\" days: \"+daysPresent+\"\\nNo of hours worked out of \"+CompanyEmpWage.getmaxHrs()+\" hours: \"+hoursWorked+\"\\nSalary for the month: \"+monthlyWage);\n }", "public void breath() {\n\t\tif (alive) {\n\t\t\t_age++;\n\t\t\t// Respiration process\n\t\t\tboolean canBreath = useEnergy(Math.min((_mass - _lowmaintenance) / Utils.SEGMENT_COST_DIVISOR, _energy));\n\t\t\tif ((_age >> 8) > _geneticCode.getMaxAge() || !canBreath) {\n\t\t\t\t// It's dead, but still may have energy\n\t\t\t\tdie(null);\n\t\t\t} else {\n\t\t\t\tif (_energy <= Utils.tol) {\n\t\t\t\t\talive = false;\n\t\t\t\t\t_world.decreasePopulation();\n\t\t\t\t\t_world.organismHasDied(this, null);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// The corpse slowly decays\n\t\t\tuseEnergy(Math.min(_energy, Utils.DECAY_ENERGY));\n\t\t}\n\t}", "public void dealDamage(int damage) {\r\n\t\thealth -= damage;\r\n\t\tif (health <= 0)\r\n\t\t\tdeath = true;\r\n\t\t_checkInvariant();\r\n\t}", "public void takeDamage(int damage){\n\t\thealth -= damage;\n\t\tif(health<= 0) {\n\t\t\tspawnNew();\n\t\t}\n\t}", "@Override\n\tpublic void decide() {\n\t\tif (this.isDead) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(this.age >= this.lifeSpan) {\n\t\t\t// DIE\n\t\t\tthis.environment.removeAgent(this.getPosX(), this.getPosY());\n\t\t\tthis.isDead = true;\n\n\t\t\t// Print if required\n\t\t\tif (this.appConfig.hasTrace()) {\n\t\t\t\tSystem.out.println(\"Agent;Death;Fish;\" + this.getPosX() + \";\" + this.getPosY());\n\t\t\t}\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\tthis.age++;\n\t\tthis.color = Color.GREEN;\n\t\tboolean canFuck = this.breedTime == 0;\n\n\t\tint[] coordinates = this.chooseCoordinates();\n\n\t\t// fish cannot move or fuck because there is no place to do so\n\t\tif (coordinates == null) {\n\t\t\tthis.breedTime = this.breedTime > 0 ? this.breedTime - 1 : this.breedTime;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.environment.moveAgent(this, coordinates[0], coordinates[1]);\n\n\t\t// Time to fuck-zer\n\t\tif (canFuck) {\n\t\t\tthis.fuck(this.getPosX(), this.getPosY());\n\t\t}\n\t\t// Update breedtime in order to wait the holy fuck time\n\t\telse {\n\t\t\tthis.breedTime = this.breedTime > 0 ? this.breedTime - 1 : this.breedTime;\n\t\t}\n\t\tthis.posX = coordinates[0];\n\t\tthis.posY = coordinates[1];\n\t}", "@Override\n\tprotected void onDeathUpdate() {\n\t\thelpers.values().forEach(DragonHelper::onDeathUpdate);\n\n\t\t// unmount any riding entities\n\t\tremovePassengers();\n\n\t\t// freeze at place\n\t\tmotionX = motionY = motionZ = 0;\n\t\trotationYaw = prevRotationYaw;\n\t\trotationYawHead = prevRotationYawHead;\n\n\t\tif (isEgg()) {\n\t\t\tsetDead();\n\t\t} else {\n\t\t\t// actually delete entity after the time is up\n\t\t\tif (deathTime >= getMaxDeathTime()) {\n\t\t\t\tsetDead();\n\t\t\t}\n\t\t}\n\n\t\tdeathTime++;\n\t}", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "public void eatMealKit(MealKit mealkit) {\n raiseFoodLevel(100);\n }", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "@Override\n public void addDamage(Player shooter, int damage) {\n if(!this.equals(shooter) && damage > 0) {\n int num=0;\n boolean isRage = false;\n Kill lastKill = null;\n List<PlayerColor> marksToBeRemoved = marks.stream().filter(m -> m == shooter.getColor()).collect(Collectors.toList());\n damage += marksToBeRemoved.size();\n marks.removeAll(marksToBeRemoved);\n\n if (this.damage.size() < 11) { //11\n for (int i = 0; i < damage; i++)\n this.damage.add(shooter.getColor());\n num = this.damage.size();\n if (num > 10) { //10\n this.deaths++;\n this.isDead = true;\n if (num > 11) {\n isRage = true;\n shooter.addThisTurnMarks(this, 1); //the shooter receive a mark in case of rage\n }\n if (game != null)\n game.addThisTurnKill(shooter, this, isRage);\n\n } else if (num > 5)\n this.adrenaline = AdrenalineLevel.SHOOTLEVEL;\n else if (num > 2)\n this.adrenaline = AdrenalineLevel.GRABLEVEL;\n } else if (this.damage.size() == 11 && damage > 0) { //11\n lastKill = game.getLastKill(this);\n lastKill.setRage(true);\n shooter.addThisTurnMarks(this, 1); //the shooter receive a mark in case of rage\n if(game != null)\n game.notifyRage(lastKill);\n }\n if (game != null)\n game.notifyDamage(this, shooter, damage, marksToBeRemoved.size());\n }\n }", "public void updateLife(){\n lifeTime--;\n if(lifeTime <= 0){\n destroyed = true;\n }\n }", "@Override\n public void lifeTime() {\n System.out.println(\"Lifetime is around 5 years.\");\n }", "public void damage(float dhealth) {\n\t\tif (_isDamagable) _health -= dhealth;\n\t\telse System.err.println(\"Entity not damagable! (MovingEntity.damage)\");\n\t}", "public void changeHealth(int i) {\n \t\tif (health + i < getMaxHealth()) {\n \t\t\thealth += i;\n \t\t} else if (health + i > getMaxHealth()) {\n \t\t\thealth = getMaxHealth();\n \t\t} else if (health + i < 1) {\n \t\t\thealth = 0;\n \t\t\talive = false;\n \t\t}\n \t}", "public void decreaseHealth(int hp) {\n this.decreaseLife();\n }", "public void subLife() {lives--;}", "public void buyLife() {\n this.lives++;\n livesWereBought++;\n\n }", "public int getLife(){\r\n\t\treturn this.life;\r\n\t}", "@Override\n\tpublic void setGrowingAge(int age) {\n\t\t// managed by DragonLifeStageHelper, so this is a no-op\n\t}", "@Override\n public void feedingMeat() {\n\n }", "public int takeDamage(int damage) \r\n\t{\r\n\t\t//Pre: an int damage\r\n\t\t//Post: reduces health variable by damage\r\n\t\tif(health - damage > 0) \r\n\t\t{\r\n\t\t\thealth -= damage;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t\treturn health;\r\n\t}", "private static int experienceTally(int playerExperience, int monsterExperience){\r\n int totalExperience;\r\n totalExperience = playerExperience + monsterExperience;\r\n return totalExperience;\r\n }", "public void update() {\n setAge(getAge() - 1);\n }", "public void punch (int health)\n {\n\thealth -= 8;\n\thealth2 = health;\n }", "public void incrementDeaths() {\n stats.put(deathsKey, (Integer)stats.get(deathsKey)+1);\n }", "public int addDeath() {\n\t\treturn ++this.numDeaths;\n\t}", "public void takedmg(int dmg){\n curHp -= dmg;\n }", "static boolean getMauled(){\n\t\t\tif (Person.player.inventory.contains(Item.repellent)) //if you have the goose repellent...\n\t\t\t\treturn (MainFile.getRandomNumber(240) == 12); //drastically lowers your chance of being mauled.\n\t\t\treturn (MainFile.getRandomNumber(20) == 12);//generates a random number for if you don't have it, and if it's 12 you get mauled\n\t\t}", "public void addHealth(int amt) {\n currentHealth = currentHealth + amt;\n }", "public void feed(int foodAmount) {\n energyLevel += foodAmount;\n \n // cap energy level when reaches max\n if(energyLevel > MAX_ENERGY) {\n energyLevel = MAX_ENERGY;\n }\n }", "public static void empWageForMonth()\n {\n int WagePerHrs = 20;\n double totalSalary = 0;\n int IsFullTime = 1;\n int IsPartTime = 2;\n int empHr = 0;\n int numWorkingDays = 20;\n double salary = 0;\n for (int day=1; day<=numWorkingDays; day++)\n { \n final int ranValue = new Random().nextInt(1000)%2;\n switch (ranValue){\n case 1:\n empHr = 8;\n //System.out.println(\"Full Time hrs:\" +empHrs);\n break;\n\n case 2:\n empHr = 4;\n //System.out.println(\"Part Time hrs:\" +empHrs);\n break;\n default:\n empHr = 0;\n\n }\t\t \n salary = (empHr * WagePerHrs);\n System.out.println(\"Daily Emp Wages is :\" +salary);\n totalSalary = (totalSalary + salary);\n System.out.println(\"Monthly emp salary:\" +totalSalary);\n\t\t}\n}", "private static void wageComputation() {\n Random random = new Random();\n while ( totalEmpHrs < MAX_HRS_IN_MONTHS && totalWorkingDays < numOfWorkingDays ) {\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_FULL_TIME:\n empHrs = 8;\n break;\n case IS_PART_TIME:\n empHrs = 4;\n break;\n default:\n }\n totalEmpHrs = totalEmpHrs + empHrs;\n }\n\n int empWage = totalEmpHrs * EMP_RATE_PER_HOUR;\n System.out.println(\"Employee Wage is : \" + empWage);\n }", "public void lifeLost() {\n\n\t\tif (invincipleTimer <= currentTickCount) {\n\t\t\tSystem.out.println(\"Life Lost!\");\n\n\t\t\thealth--;\n\t\t\tinvincipleTimer = currentTickCount + invicibleLength;\n\t\t}\n\t}", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "private static int playerDamageDealt(int playerAttack, int monsterDefense){\r\n int playerDamageDealt;\r\n playerDamageDealt = (playerAttack - monsterDefense);\r\n return playerDamageDealt;\r\n }", "public static void updateAge() {\n\t\tfor (int i =0; i < data.size(); i++){\n\t\t\tdata.get(i).setAge(data.get(i).getAge()+1);\n\t\t}\n\t}", "public void eat(int newEnergy)\n {\n if(energy+newEnergy > maxEnergy)\n {\n newEnergy = maxEnergy - energy;\n }\n\n energy += newEnergy;\n animalHungry = false;\n //no bo zwierzaczek juz nie jest glodny\n }", "private static int maxHealth(int health){\r\n int mHealth = 0;\r\n mHealth = health + 5;\r\n return mHealth; \r\n }", "public void computer()\n\t{\n\t\tif( this.days <= 5 )\n\t\t\tthis.charge = 500 * this.days ; \n\t\telse if( this.days <= 10)\n\t\t\tthis.charge = 400 * (this.days-5) + 2500 ; \n\t\telse\n\t\t\tthis.charge = 200 * (this.days-10) + 2500 + 2000 ;\n\t}", "public void getDamage(int damagePoint){\n hp-=damagePoint;\n if(hp==0){\n alive=false;\n }\n }", "public void takeDamage(int damage);", "private double eatingMealPhase(double time) {\n\t\tdouble remainingTime = 0D;\n\t\tdouble eatingTime = time;\n\t\t\n\t\tif ((totalEatingTime + eatingTime) >= eatingDuration) {\n\t\t\teatingTime = eatingDuration - totalEatingTime;\n\t\t}\n\n\t\tif (!person.isInVehicle()) {\n\t\n\t\t\tif (eatingTime > 0D) {\n\t\n\t\t\t\tif (cookedMeal != null) {\n\t\t\t\t\t// Set descriptoin for eating cooked meal.\n\t\t\t\t\tsetDescription(Msg.getString(\"Task.description.eatDrink.cooked.eating.detail\", cookedMeal.getName())); //$NON-NLS-1$\n\t\t\t\t\t// Eat cooked meal.\n\t\t\t\t\teatCookedMeal(eatingTime);\n\t\t\t\t\t\n\t\t\t\t\tif (cumulativeProportion > cookedMeal.getDryMass()) {\n\t\t\t\t\t\tendTask();\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// If finished eating, change to dessert phase.\n\t\t\t\t\tif (eatingTime < time) {\n//\t\t\t\t\t\tsetPhase(PICK_UP_DESSERT);// EATING_DESSERT);\n\t\t\t\t\t\tremainingTime = time - eatingTime;\n\t\t\t\t\t}\n\n\t\t\t\t\ttotalEatingTime += eatingTime;\n\n\t\t\t\t\tif (totalEatingTime > getDuration())\n\t\t\t\t\t\tendTask();\n\t\t\t\t\t\n\t\t\t\t\tconsumeWater(false);\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t// Eat preserved food if available\n\t\t\t\t\tboolean enoughFood = eatPreservedFood(eatingTime);\n\t\n\t\t\t\t\t// If not enough preserved food available, change to dessert phase.\n\t\t\t\t\tif (!enoughFood) {\n\t\t\t\t\t\tsetPhase(PICK_UP_DESSERT);\n\t\t\t\t\t\tremainingTime = time * .75;\n\t\t\t\t\t\treturn remainingTime;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Report eating preserved food.\n\t\t\t\t\t\tsetDescription(Msg.getString(\"Task.description.eatDrink.preserved\")); //$NON-NLS-1$\n\n\t\t\t\t\t\tremainingTime = time * .75;\n\t\t\t\t\t\treturn remainingTime;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn remainingTime;\n\t}", "private static void caloriesBurned(int weight)\n {\n System.out.println(\"No more losers\");\n }" ]
[ "0.59914714", "0.5934932", "0.5904686", "0.58772063", "0.5833293", "0.58005667", "0.5773157", "0.5767158", "0.5730343", "0.5721659", "0.57152885", "0.570809", "0.567844", "0.56701404", "0.5660904", "0.564447", "0.5639773", "0.56237894", "0.5614611", "0.56125426", "0.56104165", "0.55745715", "0.55547696", "0.55481094", "0.5537399", "0.55297196", "0.5515425", "0.55063826", "0.55033296", "0.5499453", "0.54979765", "0.5493368", "0.54914546", "0.5469955", "0.54634756", "0.546305", "0.54593825", "0.54390234", "0.54213", "0.5418079", "0.5404894", "0.5393515", "0.5383454", "0.5370038", "0.53551203", "0.53471804", "0.53384215", "0.5315838", "0.5308917", "0.53059864", "0.5299487", "0.52930665", "0.52867186", "0.5282529", "0.52787346", "0.52750427", "0.5252322", "0.5249217", "0.5246592", "0.5244094", "0.5239496", "0.5238419", "0.5235859", "0.5230867", "0.52154577", "0.52116805", "0.5208207", "0.5204998", "0.5199186", "0.519453", "0.5192018", "0.5173916", "0.51735675", "0.5173012", "0.5171516", "0.51709634", "0.5168751", "0.51665705", "0.51535016", "0.5150191", "0.51472205", "0.51261455", "0.51221377", "0.5121964", "0.51216084", "0.51160026", "0.5115203", "0.5114957", "0.51091975", "0.5107707", "0.5107619", "0.50940025", "0.5093526", "0.5092012", "0.50914013", "0.5086439", "0.5084882", "0.5081832", "0.5079925", "0.50773984" ]
0.6019022
0
The stroked() method is called to treat the lion
public void treat() { stroked(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onRed() {\n\t\taddSequential(new DriveStraightByDistance(PEG_STRAIGHT - ROBOT_LENGTH / 2), 3.5);\n\t\t//TODO: might need to change to a little less\n\t\taddSequential(new TurnDegrees(90), 2.5);\n\t\taddSequential(new DriveStraightByDistance(EXTRA_DIS), 4);\n\t\taddSequential(new OpenPlacer2());\n\t\taddSequential(new ArcadeDriveByValues(-0.5, -0.5), 1);// TODO change commad\n\t\taddSequential(new ClosePlacer());\n\t}", "public void printStars()\n\t{\n\t\tfor( int i = 0; i < mysteryWord.length() ; i++)\n\t\t{\n\t\t\tif (mysteryWord.charAt(i) == ' ')\n\t\t\t{\n\t\t\t\t\n\t\t\t\twordState+=' ';\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twordState+=\"*\"; \n\t\t\t}\n\t\t}\n\t\twordDashes.setText(wordState);\n\t}", "protected void drawWithLaser() {\n stroke(SnakeRun.LASER_COLOR);\n beginRaw(laserRenderer);\n if (leftSkier.finished() && rightSkier.finished()) {\n /*\n * Display winner.\n * Using high scan speed in hopes to provide non-flickering text.\n */\n laser.output().setScanSpeed(SnakeRun.TEXT_SCANSPEED);\n laserRenderer.noSmooth();\n String finishNote = SkierContestant.winner(leftSkier, rightSkier);\n pushMatrix();\n translate(width / 2, height / 2);\n font.setAlign(RFont.CENTER);\n int fontSize = font.size;\n font.setSize(40);\n font.draw(finishNote);\n font.setSize(fontSize);\n popMatrix();\n } else {\n /*\n * Display game.\n * Use slower scan speed since shapes are quite easy to draw.\n */\n laser.output().setScanSpeed(SnakeRun.GAME_SCANSPEED);\n this.drawGame();\n }\n endRaw();\n stroke(SnakeRun.SCREEN_COLOR);\n }", "public void stg() {\n\n\t}", "public void Lose() {\n\t\tfor (int i=0; i<x; i++) {\n\t\t\tfor (int j=0; j<y; j++) {\n\t\t\t\tif (this.c[i][j].valeur==-1) {\n\t\t\t\t\tif (!this.c[i][j].uncovered) {\n\t\t\t\t\t\t//Aggrandir la taille de police des cases minées\n\t\t\t\t\t\tthis.c[i][j].setFont(\n\t\t\t\t\t\t\tthis.c[i][j].getFont().deriveFont(\n\t\t\t\t\t\t\t\tthis.c[i][j].getFont().getStyle(), 40\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tthis.c[i][j].removeMouseListener(this.c[i][j].a);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.c[i][j].getText()!=null) {\n\t\t\t\t\t\t\tif (this.c[i][j].getText().equals(\"\\u2605\")) {\n\t\t\t\t\t\t\t\tthis.c[i][j].setText(\"\\u2620\");\n\t\t\t\t\t\t\t\tthis.c[i][j].setBackground(Color.GREEN);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (this.c[i][j].getText().equals(\"?\")) {\n\t\t\t\t\t\t\t\tthis.c[i][j].setText(\"\\u2620\");\n\t\t\t\t\t\t\t\tthis.c[i][j].setBackground(Color.ORANGE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.c[i][j].setText(\"\\u2620\");\n\t\t\t\t\t\t\tthis.c[i][j].setBackground(Color.RED);\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\tthis.a.setText(\"X\");\n\t}", "@Override\n\tpublic void smile() {\n\t\tSystem.out.println(\"黄种人-笑\");\n\t}", "public void roam()\n {\n super.roam();\n System.out.println(\", and now that it is a wolf it is very dangerous for its prey\");\n }", "public void draw(Graphics graphics) {\n\n for (int i = 0; i < numWeed; i++) {\n if (i % 2 == 0) {\n if (leanRight) {\n // Draw a \"/\" seaweed segment for even number\n drawString(graphics, \"/\", xcoord, (-i + ycoord));\n } else {\n // Draw a \"\\\" seaweed segment for even number\n drawString(graphics, \"\\\\\", xcoord, (-i + ycoord));\n }\n } else if (leanRight) {\n // Draw a \"\\\" seaweed segment for odd number\n drawString(graphics, \"\\\\\", xcoord, (-i + ycoord));\n }\n }\n }", "public void look() {\n\t\tthis.print((this.observe().get(0)).toString());\n\t\t\n\t}", "public void skystonePos1() {\n // This method will drive the robot to Skystone Position 1 (Closest to the bridge)\n // Blinked in: Change color SOLID BLUE to indicate we successfully Drove to the stone\n }", "public void shape() {\n\t\tSystem.out.println(\"super robot입니다. 팔, 다리, 몸통, 머리가 있습니다.\");\r\n\t}", "public void snare();", "@Override\r\n\tvoid poop() {\n\t\tSystem.out.println(\"stinky\");\r\n\t}", "public abstract void onLineMode ();", "@Override\n\tpublic void onBlue() {\n\t\taddSequential(new DriveStraightByDistance(PEG_STRAIGHT - ROBOT_LENGTH / 2), 3.5);\n\t\t//TODO: might need to change to a little less\n\t\taddSequential(new TurnDegrees(90), 2.5);\n\t\taddSequential(new DriveStraightByDistance(EXTRA_DIS), 4);\n\t\taddSequential(new OpenPlacer2());\n\t\taddSequential(new ArcadeDriveByValues(-0.5, -0.5), 1);// TODO change commad\n\t\taddSequential(new ClosePlacer());\n\t\t\n\t}", "protected void createDebugSnake() {\n int freespaces = 5;\n snakeSize = maxX - freespaces;\n int segmentnum = 0;\n\n int cur_x_square = freespaces;\n int cur_y_square = 0;\n snakeHeadX = cur_x_square;\n snakeHeadY = cur_y_square;\n\n\n // build first row:\n for (cur_x_square = freespaces; cur_x_square < snakeSize + freespaces; cur_x_square++) {\n //System.out.println(segmentnum + \": \" + cur_x_square + \",\" + cur_y_square);\n snakeSquares[cur_x_square][cur_y_square] = ++segmentnum;\n }\n //fill in body of snake\n while (cur_y_square < maxY - 1) {\n cur_y_square++;\n if (cur_y_square % 2 == 0) {\n for (cur_x_square = maxX - 1; cur_x_square > 0; cur_x_square--) {\n //System.out.println(segmentnum + \": \" + cur_x_square + \",\" + cur_y_square);\n snakeSquares[cur_x_square][cur_y_square] = ++segmentnum;\n }\n } else {\n for (cur_x_square = 1; cur_x_square < maxX; cur_x_square++) {\n //System.out.println(segmentnum + \": \" + cur_x_square + \",\" + cur_y_square);\n snakeSquares[cur_x_square][cur_y_square] = ++segmentnum;\n }\n }\n }\n\n //fill in tail so it can be chased by the player as they eat the last few\n // kibbles that appear\n for (cur_y_square = maxY - 1; cur_y_square > 0; cur_y_square--) {\n //System.out.println(segmentnum + \": \" + cur_x_square + \",\" + cur_y_square);\n snakeSquares[0][cur_y_square] = ++segmentnum;\n }\n\n snakeSize = segmentnum;\n\n currentHeading = DIRECTION_LEFT;\n lastHeading = DIRECTION_LEFT;\n\n justAteMustGrowThisMuch = 0;\n }", "@Override\n\tpublic void spark() {\n\t\tSystem.out.println(\"Triangle is Sparkling in \"+ Sparkable.DIRECTION + \"Direction\");\n\t}", "@Override\n\tpublic void goToStings() {\n\t\t\n\t}", "public void change_sword_pos() {\n\t\tif (!heroi.isArmado())\n\t\t\tlabirinto.setLabCell(espada.getX_coord(), espada.getY_coord(), 'E');\n\t}", "@Override\n public void eatLeaves()\n {\n setEatText(\"munch munch oink\");\n System.out.println(getEatText());\n }", "@Override\r\n\tpublic void dive() {\n\t\tSystem.out.println(\"潜水艇\"+name+\"-正在深潜\");\r\n\t}", "private void lineColor() {\n\n\t}", "@Override\n public void toogleFold() {\n }", "public static String getSleepingSnake(int size)\r\n\t{\r\n if (size == 0) {\r\n\t\t return \"Size needs to be a positive integer\\n\";\r\n }\r\n if (size == 4) {\r\n return \">____ \\n ___ |\\n| > ||\\n||__||\\n|____|\\n\";\r\n }\r\n if (size == 7) {\r\n return \">_______\\n ______ |\\n| ____ ||\\n|| __ |||\\n||| < |||\\n|||___|||\\n||_____||\\n|_______|\\n\";\r\n }\r\n /*\r\n else if (size % 2 != 0) {\r\n StringBuffer sb = new StringBuffer(); \r\n\r\n // first line\r\n sb.append(\">\");\r\n for (int j = 0; j < size; j++) {\r\n sb.append(\"_\");\r\n }\r\n //sb.append(\" \\n\");\r\n sb.append(\"\\n\");\r\n \r\n // second through half\r\n for (int i = 1; i < size / 2 + 1; i++) {\r\n for (int j = 0; j < i - 1; j++) {\r\n sb.append(\"|\");\r\n }\r\n sb.append(\" \");\r\n for (int j = 0; j < size - 2 * i + 1; j++) {\r\n sb.append(\"_\");\r\n }\r\n\r\n sb.append(\" \");\r\n for (int j = 0; j < i; j++) {\r\n sb.append(\"|\");\r\n }\r\n sb.append(\"\\n\");\r\n }\r\n\r\n // middle\r\n for (int j = 0; j < size - 4; j++) {\r\n sb.append(\"|\");\r\n }\r\n sb.append(\" < \");\r\n for (int j = 0; j < size - 4; j++) {\r\n sb.append(\"|\");\r\n }\r\n sb.append(\"\\n\");\r\n\r\n \r\n int k = 0;\r\n // half through end\r\n for (int i = size / 2 + 1; i < size; i++, k++) {\r\n for (int j = i; j < size; j++) {\r\n sb.append(\"|\");\r\n }\r\n for (int j = 0; j < i - 1 + k; j++) {\r\n sb.append(\"_\");\r\n\r\n }\r\n\r\n for (int j = i; j < size; j++) {\r\n sb.append(\"|\");\r\n }\r\n sb.append(\"\\n\");\r\n }\r\n //sb.setLength(sb.length() - 1);\r\n return sb.toString();\r\n }\r\n */\r\n else {\r\n StringBuffer sb = new StringBuffer(); \r\n return sb.toString();\r\n }\r\n \r\n\t}", "public boolean isStrike(){\r\n\t\tif( this.firstThrow == 10 )\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "protected void lightsOut(int line) {\r\n for (int i = 0; i < 16; i++) {\r\n code.unhighlight(i);\r\n }\r\n code.highlight(line);\r\n }", "STRIKE createSTRIKE();", "@Override\r\n\tpublic void fly() {\n\t\tSystem.out.println(\"오리날다\");\r\n\t}", "public void displayseat() {\n\t\tString occ;\n\t\tif (this.isOccupied()) {\n\t\t\tocc = ANSI_RED+\"XX\"+ANSI_RESET+\"..\"+ANSI_RED+\"XX\"+ANSI_RESET;\n\t\t}\n\t\telse if (this.isReserved()){\n\t\t\tocc = ANSI_GREEN+\"ME\"+ANSI_RESET+\"..\"+ANSI_GREEN+\"ME\"+ANSI_RESET;\n\t\t}\n\t\telse {\n\t\t\tocc = ANSI_BLUE+\"__\"+ANSI_RESET+\"..\"+ANSI_BLUE+\"__\"+ANSI_RESET;\n\t\t}\n\t\tSystem.out.print(\"[\" + occ + \"]\");\n\t}", "@Override\n public void brew() {\n System.out.println(\"用沸水浸泡茶叶\");\n }", "public void grabStone() {\n }", "public ComponentPyramidStairs() {\n\t\tsuper();\n\t}", "private static void craftStair(ItemStack input, ItemStack output)\r\n\t{\r\n\t\tGameRegistry.addRecipe(output, new Object[] { \"# \", \"## \", \"###\", '#', input });\r\n\t}", "public void onTextCut()\n\t{\n\t}", "public void print() {\n\t\t\tfor (int i = 0; i < nowLength; i++) {\n\t\t\t\tSystem.out.print(ray[i] + \" \");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}", "@Override\n\tpublic void Red() {\n\t\tSystem.out.println(\"Red Light\");\n\t\t\n\t}", "@Override\r\n \tpublic void paintComponent(Graphics g) {\r\n \t\tsuper.paintComponent(g);\r\n \t\tdrawSnake(g);\r\n \t}", "private void renderLights() {\n\t\t\n\t}", "public Shape createStrokedShape(Shape shape) {\n/* 140 */ GeneralPath result = new GeneralPath();\n/* 141 */ PathIterator it = new FlatteningPathIterator(shape.getPathIterator(null), 1.0D);\n/* 142 */ float[] points = new float[6];\n/* 143 */ float moveX = 0.0F, moveY = 0.0F;\n/* 144 */ float lastX = 0.0F, lastY = 0.0F;\n/* 145 */ float thisX = 0.0F, thisY = 0.0F;\n/* 146 */ int type = 0;\n/* 147 */ float next = 0.0F;\n/* 148 */ int phase = 0;\n/* 149 */ while (!it.isDone()) {\n/* 150 */ float dx, dy, distance; type = it.currentSegment(points);\n/* 151 */ switch (type) {\n/* */ case 0:\n/* 153 */ moveX = lastX = points[0];\n/* 154 */ moveY = lastY = points[1];\n/* 155 */ result.moveTo(moveX, moveY);\n/* 156 */ next = OutlineZigzagEffect.this.wavelength / 2.0F;\n/* */ break;\n/* */ \n/* */ case 4:\n/* 160 */ points[0] = moveX;\n/* 161 */ points[1] = moveY;\n/* */ \n/* */ \n/* */ case 1:\n/* 165 */ thisX = points[0];\n/* 166 */ thisY = points[1];\n/* 167 */ dx = thisX - lastX;\n/* 168 */ dy = thisY - lastY;\n/* 169 */ distance = (float)Math.sqrt((dx * dx + dy * dy));\n/* 170 */ if (distance >= next) {\n/* 171 */ float r = 1.0F / distance;\n/* 172 */ while (distance >= next) {\n/* 173 */ float x = lastX + next * dx * r;\n/* 174 */ float y = lastY + next * dy * r;\n/* 175 */ if ((phase & 0x1) == 0) {\n/* 176 */ result.lineTo(x + OutlineZigzagEffect.this.amplitude * dy * r, y - OutlineZigzagEffect.this.amplitude * dx * r);\n/* */ } else {\n/* 178 */ result.lineTo(x - OutlineZigzagEffect.this.amplitude * dy * r, y + OutlineZigzagEffect.this.amplitude * dx * r);\n/* 179 */ } next += OutlineZigzagEffect.this.wavelength;\n/* 180 */ phase++;\n/* */ } \n/* */ } \n/* 183 */ next -= distance;\n/* 184 */ lastX = thisX;\n/* 185 */ lastY = thisY;\n/* 186 */ if (type == 4) result.closePath(); \n/* */ break;\n/* */ } \n/* 189 */ it.next();\n/* */ } \n/* 191 */ return (new BasicStroke(OutlineZigzagEffect.this.getWidth(), 2, OutlineZigzagEffect.this.getJoin())).createStrokedShape(result);\n/* */ }", "@Override\n\tpublic void eggHatches() {\n\t\t\n\t}", "@Override\n\tpublic void makeEyesWithMan() {\n\t\tSystem.out.println(\"Å×ÃÄÑÛÄØ¡£¡£¡£\");\n\t}", "@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}", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "public void printCorlor() {\n\t\tSystem.out.println(\"I'm yellow\");\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tvoid drowing() {\n\t\tSystem.out.println(\"test--drawing\");\n\t}", "private void smell() {\n try {\n this.console.println(MapControl.checkSmell(FireSwamp.getPlayer().getPlayerPosition(),\n FireSwamp.getCurrentGame().getGameMap()));\n } catch (MapControlException ex) {\n Logger.getLogger(GameMenuView.class.getName()).log(Level.SEVERE, null, ex);\n }\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 }", "@Override\r\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\r\n\t Graphics2D graphics = (Graphics2D)g;\r\n\t \r\n\t for (int i = 0; i < tom.snake.size() -1; i++) {\r\n\t \tDimension xy = new Dimension(tom.snake.get(i));\r\n\t \tgraphics.setColor(BLACK);\r\n\t \tgraphics.fillRect(xy.width*SNAKE_SIZE, xy.height*SNAKE_SIZE, SNAKE_SIZE, SNAKE_SIZE);\r\n\t \t\r\n\t }\r\n\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE, SNAKE_SIZE, SNAKE_SIZE);\r\n\t \r\n\t switch (tom.getDir()){\r\n\t\tcase 0: //up\r\n\t\t graphics.fillRect(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/2, SNAKE_SIZE, SNAKE_SIZE/2+2);\r\n\t\t graphics.setColor(WHITE);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/2, SNAKE_SIZE/3, SNAKE_SIZE/3);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3*2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/2, SNAKE_SIZE/3, SNAKE_SIZE/3);break;\r\n\t\tcase 1: //down\r\n\t\t graphics.fillRect(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE, SNAKE_SIZE, SNAKE_SIZE/2);\r\n\t\t graphics.setColor(WHITE);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3*2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);break;\r\n\t\tcase 2: //left\r\n\t\t graphics.fillRect(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE, SNAKE_SIZE/2, SNAKE_SIZE);\r\n\t\t graphics.setColor(WHITE);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3*2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);break;\r\n\t\tcase 3: //right\r\n\t\t graphics.fillRect(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE, SNAKE_SIZE/2, SNAKE_SIZE);\r\n\t\t graphics.setColor(WHITE);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3*2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);break;\r\n\t\t } \r\n\t \r\n\t graphics.setColor(RED);\r\n\t graphics.fillOval(apple.x*SNAKE_SIZE-1, apple.y*SNAKE_SIZE-1, SNAKE_SIZE+2, SNAKE_SIZE+2);\r\n\t graphics.setColor(BLACK);\r\n\t graphics.setStroke(new BasicStroke(2));\r\n\t graphics.drawLine(apple.x*SNAKE_SIZE+SNAKE_SIZE/2, apple.y*SNAKE_SIZE+SNAKE_SIZE/4, apple.x*SNAKE_SIZE+SNAKE_SIZE/3, apple.y*SNAKE_SIZE-3);\r\n\t \r\n\t if (!game) {\r\n\t \tgraphics.setColor(DIMSCREEN);\r\n\t \tgraphics.fillRect(0, 0, 607, 607);\r\n\t \tgraphics.setColor(RED);\r\n\t \tgraphics.setFont(new Font(\"TimesRoman\", Font.BOLD, 50));\r\n\t \tif(Game.status()) { //Igra je bila zakljucena\r\n\t \t\tgraphics.drawString(\"GAME OVER\", 150, 260);\r\n\t \t\tgraphics.drawString(\"CTRL-P to restart\", 110, 320);\r\n\t \t}\r\n\t \telse if(Game.firstTime) { //Zacetni prikaz drugacen kot za navadno pavzo\r\n\t\t\t\tgraphics.drawString(\"Arrow keys to move\", 80, 260);\r\n\t\t \tgraphics.drawString(\"CTRL-P to start/pause\", 55, 320);\r\n\t \t}\r\n\t \telse \r\n\t \t\tgraphics.drawString(\"PAUSED\", 200, 300);\r\n\t }\t \r\n\t}", "public void getSword(Position swordPosition) {\n\n\t\tonWay = true;\n\t\tsetActive();\n\t\tsymbol = \" a\";\n\n\t\tint x0 = this.getPosition().getCol();\n\t\tint y0 = this.getPosition().getLine();\n\t\tint x1 = swordPosition.getCol();\n\t\tint y1 = swordPosition.getLine();\n\n\t\t/* 1st Octant */\n\t\tif (x1>x0 && y1>=y0 && (y1-y0)<=(x1-x0)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = x1 - x0;\n\t\t\tb = y1 - y0;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++){\n\t\t\t\ttemp = new Position(temp.rightPosition().getLine(), temp.rightPosition().getCol());\n\t\t\t\tif (d >= 0)\t{ \n\t\t\t\t\ttemp = new Position(temp.bottomPosition().getLine(), temp.bottomPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 2nd Octant */\n\t\telse if (x1>x0 && y1>y0 && (y1-y0)>(x1-x0)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = y1 - y0;\n\t\t\tb = x1 - x0;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++)\n\t\t\t{ \n\t\t\t\ttemp = new Position(temp.bottomPosition().getLine(), temp.bottomPosition().getCol());\n\t\t\t\tif (d >= 0)\t{\n\t\t\t\t\ttemp = new Position(temp.rightPosition().getLine(), temp.rightPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 3rd Octant */\n\t\telse if (x1<=x0 && y1>y0 && (y1-y0)>=(x0-x1)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = y1 - y0;\n\t\t\tb = x0 - x1;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++){\n\t\t\t\ttemp = new Position(temp.bottomPosition().getLine(), temp.bottomPosition().getCol());\n\t\t\t\tif (d >= 0)\t{\n\t\t\t\t\ttemp = new Position(temp.leftPosition().getLine(), temp.leftPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 4th Octant */\n\t\telse if (x1<x0 && y1>y0 && (y1-y0)<(x0-x1)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = x0 - x1;\n\t\t\tb = y1 - y0;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++)\n\t\t\t{ \n\t\t\t\ttemp = new Position(temp.leftPosition().getLine(), temp.leftPosition().getCol());\n\t\t\t\tif (d >= 0)\t{\n\t\t\t\t\ttemp = new Position(temp.bottomPosition().getLine(), temp.bottomPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 5th Octant */\n\t\telse if (x1<=x0 && y1<=y0 && (y0-y1)<=(x0-x1)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = x0 - x1;\n\t\t\tb = y0 - y1;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++){\n\t\t\t\ttemp = new Position(temp.leftPosition().getLine(), temp.leftPosition().getCol());\n\t\t\t\tif (d >= 0)\t{ \n\t\t\t\t\ttemp = new Position(temp.upperPosition().getLine(), temp.upperPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 6th Octant */\n\t\telse if (x1<x0 && y1<y0 && (y0-y1)>(x0-x1)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = y0 - y1;\n\t\t\tb = x0 - x1;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++)\n\t\t\t{ \n\t\t\t\ttemp = new Position(temp.upperPosition().getLine(), temp.upperPosition().getCol());\n\t\t\t\tif (d >= 0)\t{\n\t\t\t\t\ttemp = new Position(temp.leftPosition().getLine(), temp.leftPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 7th Octant */\n\t\telse if (x1>=x0 && y1<y0 && (y0-y1)>=(x1-x0)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = y0 - y1;\n\t\t\tb = x1 - x0;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++){\n\t\t\t\ttemp = new Position(temp.upperPosition().getLine(), temp.upperPosition().getCol());\n\t\t\t\tif (d >= 0)\t{\n\t\t\t\t\ttemp = new Position(temp.rightPosition().getLine(), temp.rightPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 8th Octant */\n\t\telse if (x1>x0 && y1<y0 && (y0-y1)<(x1-x0)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = x1 - x0;\n\t\t\tb = y0 - y1;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++)\n\t\t\t{ \n\t\t\t\ttemp = new Position(temp.rightPosition().getLine(), temp.rightPosition().getCol());\n\t\t\t\tif (d >= 0)\t{\n\t\t\t\t\ttemp = new Position(temp.upperPosition().getLine(), temp.upperPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\n\t}", "public void stroke() throws IOException\n {\n\tif (_closedPath == true) {\n\t Paint strokingPaint = getGraphicsState().getStrokingColor().getJavaColor();\n\t if ( strokingPaint == null ) {\n\t\tstrokingPaint = getGraphicsState().getStrokingColor().getPaint(pageSize.height);\n\t }\n\t if ( strokingPaint == null ) {\n\t\tLOG.info(\"ColorSpace \"+getGraphicsState().getStrokingColor().getColorSpace().getName() +\" doesn't provide a stroking color, using white instead!\");\n\t\tstrokingPaint = Color.WHITE;\n\t }\n\t if (strokingPaint != Color.WHITE) {\n\t\tfor(Line line : _currentPath) {\n\t\t if(line.isVertical() || line.isHorizontal()) {\n\t\t\t_path.add(line);\n\t\t }\n\t\t}\n\t }\n\t}\n\t_currentPath.clear();\n }", "private void brewCoffeeGrinds() {\r\n LOG.debug( \"Brewing coffee grinds\" );\r\n }", "public void drawSnake(Graphics g)\n {\n for(int i=0 ; i<list.size()-1 ; i++)\n {\n drawSegment(g,list.get(i).getA(),list.get(i).getB()); \n }\n drawHead(g,head.getA(),head.getB());\n }", "@Override\n \tprotected java.awt.Stroke getLineStroke(InstanceWaypoint context) {\n \t\tinitStyle(context);\n \t\t\n \t\tif (styleStroke != null && !context.isSelected()) {\n \t\t\treturn styleStroke;\n \t\t}\n \t\telse {\n \t\t\treturn super.getLineStroke(context);\n \t\t}\n \t}", "public void sing() {\n\t\t System.out.println(lyric);\n\t}", "public void mousePressed() {\n sharkSwarm.addShark(new Shark(mouseX, mouseY, 1));\n}", "public void drawOn(Graphics g){\r\n\t\tif (ignoreStrokes > 0){\r\n\t\t\tg.setColor(Color.cyan); \t//to show the player that they are frozen\r\n\t\t} else {\r\n\t\t\tg.setColor(Color.white);\r\n\t\t}\r\n\t\tmySnake.drawOn(g);\r\n\t\tfor (Mushroom m : shrooms){\r\n\t\t\tm.drawOn(g);\r\n\t\t}\r\n\t}", "public void drawSegment(Graphics g, int a, int b)\n { \n //Draws the outline of the snake based on the selected color\n \n if(lastpowerUp.equals(\"BLACK\") && powerupTimer > 0)\n {\n Color transGray = new Color(55,55,55);\n g.setColor(transGray);\n //g.setColor(Color.BLACK);\n }\n else if(!lastpowerUp.equals(\"RAINBOW\"))\n {\n if(difficult.equals(\"GHOST\"))\n g.setColor(new Color(55,55,55));\n else if(color.equals(\"WHITE\"))\n g.setColor(Color.WHITE); \n else if(color.equals(\"GREEN\"))\n g.setColor(Color.GREEN); //Green outline\n else if(color.equals(\"BLUE\"))\n g.setColor(Color.BLUE); \n else if(color.equals(\"CYAN\"))\n g.setColor(Color.CYAN); \n else if(color.equals(\"GRAY\"))\n g.setColor(Color.GRAY);\n else if(color.equals(\"YELLOW\"))\n g.setColor(Color.YELLOW); \n else if(color.equals(\"MAGENTA\"))\n g.setColor(Color.MAGENTA); \n else if(color.equals(\"ORANGE\"))\n g.setColor(Color.ORANGE); \n else if(color.equals(\"PINK\"))\n g.setColor(Color.PINK); \n else if(color.equals(\"RED\"))\n g.setColor(Color.RED); \n }\n else if(lastpowerUp.equals(\"RAINBOW\") && powerupTimer > 0)\n {\n int x = (int)(Math.random()*250);\n int y = (int)(Math.random()*250);\n int z = (int)(Math.random()*250);\n \n Color randomColor = new Color(x,y,z);\n g.setColor(randomColor);\n }\n \n g.drawLine(a,b,a,b+15);\n g.drawLine(a,b,a+15,b);\n g.drawLine(a+15,b,a+15,b+15);\n g.drawLine(a,b+15,a+15,b+15); \n }", "@Override\n\tpublic void draw(Graphics g) {\n\t\tsuper.draw(g);\n\t\tif(!satillite){\n\t\t\tdrawTrace(g);\n\t\t}\n\t\t\n \t\tmove();\n\t}", "@Override\n\tvoid ligar() {\n\t\tsuper.ligar();\n\t\tSystem.out.println(\"Automovel ligando\");\n\t}", "@Override\n\tpublic void yellow() {\n\t\tSystem.out.println(\"Yellow Light\");\n\t\t\n\t}", "@Override\r\n\tpublic void carSideLight() {\n\t\t\r\n\t}", "public void eat(){\n if (threshold<=0 && !lapar) revLapar();\n if (lapar && Common.gamemap.get(getX()).get(getY()).showSymbol()=='@'){\n Common.gamemap.get(getX()).get(getY()).ungrowGrass();\n revLapar();\n threshold = 12;\n }\n }", "@Override\n\tpublic void laugh() {\n\t\tSystem.out.println(\"Can laugh\");\n\t}", "void ringBell() {\n\n }", "@Override\n\tpublic void bark() {\n\t\tSystem.out.println(\"The doberman barks\");\n\t}", "public void random_sword() {\n\t\tint randomX = 1;\n\t\tint randomY = 1;\n\t\twhile (true) {\n\t\t\trandomX = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomY = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomX--;\n\t\t\trandomY--;\n\t\t\tif (labirinto.getLab()[randomX][randomY] == ' ')\n\t\t\t\tbreak;\n\t\t}\n\t\tespada.setX_coord(randomX);\n\t\tespada.setY_coord(randomY);\n\t\tchange_sword_pos();\n\t}", "void unsetStraight();", "static void afficherLigneSep(int taille) {\n System.out.print(\" \");\n for (int i = 0; i < taille - 1; i++) {\n System.out.print(\"---+\");\n }\n System.out.println(\"---\");\n }", "public void showFarewell() {\n showLine();\n System.out.println(\"Bye. Hope to see you again soon!\");\n showLine();\n }", "@Override\r\n\tvoid walk() {\n\t\tSystem.out.println(\"5 ft\");\r\n\t}", "@Override\n\tpublic void laysEgg() {\n\t\t\n\t}", "private boolean isAllStrike() {\n\t\treturn false;\r\n\t}", "public boolean getStrikeout()\n {\n return font.isStruckout();\n }", "@Override\n\tpublic String fly() {\n\t\treturn \" Can t flying\";\n\t}", "@Override\r\n\tpublic String hatches() {\n\t\treturn \"Hatches eggs\";\r\n\t}", "@Override\r\n\tpublic String fly() {\n\t\tString volar = \"Puede volar\";\r\n\t\treturn volar;\r\n\t}", "private void displayLine()\n {\n System.out.println(\"#################################################\");\n }", "@Override\n\tprotected void 关上冰箱门() {\n\t\tSystem.out.println(\"我是张飞,我叫喊着粗鲁的把冰箱门关上\");\n\t}", "@SubscribeEvent\n\tpublic void onLightningStrike(EntityStruckByLightningEvent event){\n\t\tif(event.getEntity() instanceof EntityGuardian && SSBConfig.enableGuardianLightning){\n\t\t\tEntityGuardian guardian = ((EntityGuardian)event.getEntity());\n\t\t\tguardian.setElder(true);\n\t\t\t/** Doesnt work, persistence gets set again while reading nbt\n\t\t\tNBTTagCompound nbt = guardian.getEntityData();\n\t\t\tnbt.setBoolean(\"PersistenceRequired\", false);\n\t\t\tnbt.setBoolean(\"Elder\", true);\n\t\t\tguardian.readEntityFromNBT(nbt);\n\t\t\t**/\t\t\t\n\t\t}\n\t}", "public void onderbreek(){\n \n }", "private void raceFormat()\n {\n topLine();\n secondLine();\n thirdLine();\n fourthLine();\n }", "private void run() {\n List<Point> points = Arrays.asList(this.points);\n Collections.sort(points);\n for (int i=0; i < points.size(); i++) {\n Point p0 = points.get(i);\n List<Point> cp = new ArrayList<>(points); // clone\n Collections.sort(cp, p0.SLOPE_ORDER);\n for (int s=0, e; s < cp.size(); s=e) {\n for (e=s; e < cp.size() && p0.SLOPE_ORDER.compare(cp.get(s) , cp.get(e)) == 0; e++);\n if (e-s+1>= 4) {\n List<Point> r = new ArrayList<>(cp.subList(s, e));\n r.add(p0);\n Collections.sort(r);\n if (r.get(0).equals(p0)) {\n Point[] ret = r.toArray(new Point[e-s+1]);\n StdOut.println(this.toString(ret));\n this.drawLine(ret);\n }\n }\n }\n }\n }", "public void endYellow() {\n if (System.currentTimeMillis() - lastAttack > 200) {\n isYellow = false;\n ((Geometry)model.getChild(\"Sphere\")).getMaterial().setColor(\"Color\", ColorRGBA.Red);\n }\n }", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public void fly() \r\n\t{\r\n\t\tSystem.out.println(\"Sparrow flying high...\"); \r\n\t}", "@Override\r\n\tvoid eat() {\n\t\tSystem.out.println(\"grass\");\r\n\t}", "@Override\n public void chew() {\n MessageUtility.logSound(name,\"Bleats and Stomps its legs, then chews\");\n }", "@Override\n public void process() {\n getTelemetry().addData(\" start move\", \"BaseColor %s relic side %s\", baseColor.name(), (relicSide)?\"true\" :\"false\" );\n getTelemetry().update();\n if (JewelSensorAutoArmProcessor.JewelColor.RED.equals(baseColor)){\n if (relicSide) {\n RedRelicCorner();\n } else{\n RedNonRelicCorner();\n }\n }else{\n if (relicSide) {\n BlueRelicCorner();\n } else{\n BlueNonRelicCorner();\n }\n }\n releaseGlyph();\n }", "public void fly() {\r\n\t\tSystem.out.print(\"This Goose flies\");\r\n\t}", "@Override\r\n\tpublic void spotEntered(Spot spot) {\n\t\tspot.highlightSpot();\r\n\t}", "public void enterHatchingState() {\n\n\t}", "@Override\r\n\tpublic String Fly() {\n\t\treturn \"EL Helicoptero esta volando\";\r\n\t}", "void Dogs() {\n \n }", "private void sout() {\n\t\t\n\t}", "abstract void consoleCustom(boolean time, String tag, String message, Paint color);", "public void display_round_start_text() {\n }", "@Override\r\n\tpublic void onRight() {\n\t\tif (snakeView.smer != snakeView.ZAHOD) {\r\n\t\t\tsnakeView.naslednjaSmer = snakeView.VZHOD;\r\n\t\t}\r\n\t}", "public void schnattern() {\n\t\tSystem.out.println(\"Schnatter\");\n\t}", "@Override\n\tpublic void juxing() {\n\t\tSystem.out.println(\"***************\");\n\t\tSystem.out.println(\"***************\");\n\t\tSystem.out.println(\"***************\");\n\t\tSystem.out.println(\"***************\");\n\t\tSystem.out.println(\"***************\");\n\t}" ]
[ "0.5700307", "0.558016", "0.53025013", "0.5286173", "0.5258117", "0.52326226", "0.51827806", "0.5180721", "0.5176557", "0.51668113", "0.5156271", "0.5115152", "0.5109373", "0.509929", "0.5098784", "0.5093665", "0.50764126", "0.5057045", "0.5056743", "0.5050921", "0.5045536", "0.50183165", "0.50144976", "0.4999723", "0.49901697", "0.49893892", "0.4986975", "0.498555", "0.49805024", "0.4963694", "0.49482253", "0.4946035", "0.49284187", "0.49210784", "0.49098685", "0.49094546", "0.49082172", "0.49041384", "0.48850918", "0.48743153", "0.48720142", "0.48676622", "0.48627046", "0.48587793", "0.4858622", "0.48479983", "0.48430756", "0.48366675", "0.48346522", "0.48325285", "0.48312965", "0.48284027", "0.48278284", "0.4822105", "0.4822049", "0.48218206", "0.48192126", "0.48189119", "0.48152888", "0.48137864", "0.48103756", "0.4809407", "0.4803803", "0.48027694", "0.47991484", "0.47989678", "0.47988635", "0.47978884", "0.4796897", "0.47956118", "0.47921395", "0.47843218", "0.4783884", "0.4782261", "0.47800636", "0.47796518", "0.47768342", "0.47729254", "0.47719717", "0.47652507", "0.4764855", "0.47562534", "0.47538215", "0.475378", "0.4753312", "0.47504035", "0.47493458", "0.4748912", "0.4747142", "0.47470006", "0.47433656", "0.47396222", "0.47383472", "0.47381836", "0.47369453", "0.47304967", "0.47288343", "0.47258195", "0.47252452", "0.4724349" ]
0.7346657
0
TODO: inflate a fragment view
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = super.onCreateView(inflater, container, savedInstanceState); unbinder = ButterKnife.bind(this, rootView); return rootView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@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, @Nullable Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.call_fragment, container, false);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bookmark, container, false);\n context = getActivity();\n init(view);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_buy, container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_upload_new, container, false);\n findViewByIds(view);\n return view;\n }", "@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 container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_playlist, container, false);\n\n instView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view= inflater.inflate(R.layout.customer_book_fragment, container, false);\n inti(view);\n //clicks\n clicks();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_find, container, false);\n initView(view);\n initSend();\n getXgimi();\n return view;\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 }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_wo_de, container, false);\n initView(view);\n return view;\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 view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my, container, false);\n initView(view);\n return view;\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 View inflate = inflater.inflate(R.layout.fragment_me, container, false);\n activity = getActivity();\n initView(inflate);\n return inflate;\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 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 view = inflater.inflate(R.layout.fragment_fan, container, false);\n initilizeViews();\n setListeners();\n\n return view;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_opening, 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 View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\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\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 public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_random_hf, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n\n return inflater.inflate(R.layout.fragment_blank, container, false);\n\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\r\n\t\tView view = inflater.inflate(R.layout.frag_main_pak, container, false);\r\n\r\n\t\tinit(view);\r\n\t\t\r\n\t\t\r\n\t\treturn view;\r\n\r\n\t}", "@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 return inflater.inflate(R.layout.fragment_my, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_my, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_mainfragment, container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n myFragment = inflater.inflate(R.layout.fragment_favourite, container, false);\n\n initComponent();\n\n return myFragment;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my, container, false);\n return view;\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_offer, container, false);\n context = getActivity();\n initView(view);\n return view;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_vicky, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_main4, container, false);\n return view;\n }", "@Override\n //This will handle how the fragment will display content\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle saveInstanceState) {\n View layout = inflater.inflate(R.layout.fragment_main, container, false);\n\n FeedListView mFeedListView = new FeedListView(getActivity());\n Log.d(TAG, \"MyFragment::onCreate\");\n mFeedListView.inflate(layout);\n\n //Getting a reference to the TextView (as defined in fragment_main) and set it to a value\n Bundle bundle = getArguments();\n\n switch (bundle.getInt(\"point\")){\n case 0:\n //TODO : add tag query\n break;\n case 1:\n //TODO : add tag query\n break;\n case 2:\n //TODO : add tag query\n break;\n case 3:\n //TODO : add tag query\n break;\n default:\n }\n\n return layout;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_near_peoples, container, false);\n getActivity().setTitle(\"Share Card\");\n initUI();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_blank, container, false);\n initView(view);\n return view;\n }", "@Override\n\tprotected View initView(LayoutInflater arg0, ViewGroup arg1, Bundle arg2) {\n\t\treturn arg0.inflate(R.layout.fragment_find, arg1, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater\n .inflate(R.layout.static_fragment, container, false);\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 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\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_reception_home, container, false);\r\n\r\n Hello(view);\r\n return view;\r\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 }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_start, container, false);\n\n mLvAps = (ListView) view.findViewById(R.id.lvAps);\n mScanResults = new ArrayList<ScanResult>();\n mApAdapter = new ApAdapter(mActivity, mScanResults);\n mLvAps.setAdapter(mApAdapter);\n\n mBtnSend = (Button) view.findViewById(R.id.btnSend);\n mBtnSend.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ((MyActivity) mActivity).getSupportFragmentManager().beginTransaction().replace(R\n .id.container, FileFragment.newInstance(\"arg\",\n \"arg\")).addToBackStack(\"FileFragment\").commit();\n }\n });\n mBtnReceive = (Button) view.findViewById(R.id.btnReceive);\n mBtnReceive.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n }\n });\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_today, container, false);\n initComponent(view);\n return view;\n\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 parent = inflater.inflate(R.layout.frag_file, container, false);\n initViews();\n setListeners();\n return parent;\n }", "@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,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_list, container, false);\n initiate(view);\n return view;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n mView = inflater.inflate(R.layout.fragment_tab_tracking_sovilocation, container, false);\r\n\r\n setup(mView);\r\n GetData(true,\"\");\r\n\r\n return mView;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_display, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_who_working, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n View view = inflater.inflate(R.layout.fragment_guan_lxswei_shen, container, false);\n ButterKnife.bind(this, view);\n init();\n return view;\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 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,\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_porishongkhan, container, false);\n\n\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_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_viewer, container, false);\n initComponents(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_elearning, container, false);\n initView(view);\n return view;\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_blank, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_gank_fuli, 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(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_selection, container, false);\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_stockout, container, false);\n\n initView();\n initListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jogar, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_find, container, false);\n initView(view);\n getData(page,userId,token);\n setLister();\n return view;\n }", "@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n return inflater.inflate(R.layout.fragment_firmy, container, false);\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 View view = inflater.inflate(R.layout.fragment_student_profile, container, false);\n\n findView(view);\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_mine, container, false);\n\n mTextView = view.findViewById(R.id.minefragment_textView);\n mTextView.setText(mParam1 + \"_fragment\");\n\n return view;\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 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 View view = inflater.inflate(R.layout.fragment_favorites, null);\n initUi(view);\n setListener();\n callingServiceFavorites();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_maps, parent, false);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_overview, container, false);\n \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\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\treturn inflater.inflate(R.layout.fragment3, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return super.onCreateView(inflater, (ViewGroup) inflater.inflate(R.layout.fragment_display_good_detial, container, false), savedInstanceState);\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 view = inflater.inflate(R.layout.pickupboy_booking_fragment, container, false);\n mActivity = getActivity();\n userBookingFragment = this;\n initViews();\n getBundle();\n // manageHeaderView();\n setupTabIcons();\n setListener();\n setFragment(new FragementPickUpNewBooking());\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_explore, container, false);\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 view = inflater.inflate(R.layout.fragment_main, container, false);\n initUI(view);\n initData();\n setEventBus(this, true);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_downloaded, container, false);\n\n ButterKnife.bind(this, view);\n\n new LoadLocalFiles().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_start, container, false);\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 View view = inflater.inflate(R.layout.fragment_submit_problem, container, false);\n ButterKnife.bind(this, view);\n this.context = getActivity();\n init();\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle state) {\n view = inflater.inflate(R.layout.fragment_scan, null);\n\n view.findViewById(R.id.txtTest)\n .setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getActivity(), \"Contents = \", Toast.LENGTH_SHORT).show();\n loadFragment(new PoleIdFragment());\n }\n }\n );\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_register, container, false);\n initiate(view);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_show, container, false);\n findViews(view);\n initView();\n\n setListener();\n return view;\n }", "@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 view= inflater.inflate(R.layout.fragment_votevents, container, false);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_explore, container, false);\n return view;\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 }" ]
[ "0.75212604", "0.7492544", "0.7487358", "0.7479385", "0.74779814", "0.7466526", "0.7466328", "0.74526715", "0.7452614", "0.7443973", "0.7438898", "0.7434542", "0.74284536", "0.741808", "0.74093133", "0.7400632", "0.7394933", "0.73865515", "0.7384236", "0.73830897", "0.738306", "0.73790896", "0.7376214", "0.7368732", "0.7355631", "0.73524994", "0.73504025", "0.73492855", "0.73465264", "0.73365307", "0.73365307", "0.7333518", "0.7332665", "0.7332195", "0.73261386", "0.7325365", "0.730718", "0.73064125", "0.73052424", "0.7302883", "0.7301856", "0.72940433", "0.7293959", "0.72904444", "0.72823644", "0.7282231", "0.72814536", "0.72807276", "0.72771204", "0.72769976", "0.7274142", "0.7271609", "0.7270257", "0.72701734", "0.7268865", "0.7263961", "0.72638416", "0.7262945", "0.7262369", "0.72619116", "0.7256618", "0.7253801", "0.72531146", "0.72529304", "0.7252637", "0.7251403", "0.7251064", "0.72480464", "0.72461134", "0.7245994", "0.7241745", "0.7240629", "0.72383314", "0.7237215", "0.723477", "0.7233001", "0.7231835", "0.7231199", "0.72307116", "0.7230708", "0.7228163", "0.7226466", "0.72250473", "0.72232515", "0.7219264", "0.7217333", "0.72153974", "0.7212634", "0.72124654", "0.72117454", "0.72107077", "0.7210319", "0.72097075", "0.7209449", "0.7208563", "0.72080183", "0.7207446", "0.72056204", "0.72054327", "0.72046393", "0.7202772" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { int[] candidates = { 2, 3, 6, 7 }; int target = 7; List<List<Integer>> h = combinationSum(candidates, target); Iterator<List<Integer>> it = h.iterator(); while (it.hasNext()) { System.out.println(it.next()); } }
{ "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
how we can store a list of integers or related items a set of uniform data elements that can accessed via index
public static void main(String[] args) { int[] numbers = new int[5];// must tell Java how many elements it has-- it cannot shrink or grow numbers[2]= 5; //number 5 is stores in array System.out.println(numbers [2]);// print out stored array // numbers is the entirre array-- to work with data in the array you must use the index }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<Integer> createData() {\r\n\t\tList<Integer> data = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tdata.add(i);\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "int getRequestedValues(int index);", "E getData(int index);", "default V item( int i ) { return getDataAt( indexOfIndex( i ) ); }", "java.util.List<java.lang.Integer> getItemList();", "private int[] assign(List<T> medoids, List<T> data) {\n\t\tint[] out = new int[data.size()];\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tdouble bestDistance = dm.measure(data.get(i), medoids.get(0));\n\t\t\tint bestIndex = 0;\n\t\t\tfor (int j = 1; j < medoids.size(); j++) {\n\t\t\t\tdouble tmpDistance = dm.measure(data.get(i), medoids.get(j));\n\t\t\t\tif (tmpDistance < bestDistance) {\n\t\t\t\t\tbestDistance = tmpDistance;\n\t\t\t\t\tbestIndex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tout[i] = bestIndex;\n\n\t\t}\n\t\treturn out;\n\n\t}", "long getIds(int index);", "HCollection values();", "int getItems(int index);", "void addAll(intList list, int index) throws IllegalAccessException;", "private <TKey extends Comparable<TKey>, TValue> List<TValue> createValues(List<IKeyValueNode<TKey, TValue>> data) {\n List<TValue> values = new ArrayList<>();\n\n for (IKeyValueNode<TKey, TValue> node : data) {\n values.add(node.getValue());\n }\n\n return values;\n }", "void set(int index, T data);", "@Test\r\n\tpublic void testAddAllInt() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 4, \"ferrum\"));\r\n\t\tsample.add(new Munitions(10, 5, \"ferrum\"));\r\n\t\tsample.addAll(1, list);\r\n\t\tAssert.assertEquals(17, sample.size());\r\n\t\tAssert.assertTrue(sample.get(0).equals(new Munitions(2, 4, \"ferrum\")));\r\n\t\tAssert.assertTrue(sample.get(1).equals(list.get(0)));\r\n\t\tAssert.assertTrue(sample.get(16).equals(new Munitions(10, 5, \"ferrum\")));\r\n\t}", "public long [] getData(Long index);", "java.util.List<java.lang.Integer> getItemsList();", "int getOtherIds(int index);", "private MyIntegerList generatedPopulatedList() {\n final MyIntegerList mil = new MyIntegerList();\n\n mil.push(1);\n mil.push(2);\n mil.push(1);\n mil.push(6);\n mil.push(6);\n mil.push(7);\n mil.push(2);\n mil.push(2);\n mil.push(0);\n mil.push(5);\n\n return mil;\n }", "Index getIndices(int index);", "com.rpg.framework.database.Protocol.Item getItems(int index);", "@Override\n\tCollection<T> internalElements() {\n\t\tCollection<T> values = new LinkedList<T>();\n\t\t\n\t\tfor(LinkedList<T> list : internalStorage.get(0).values()) {\n\t\t values.addAll(list);\t\n\t\t}\n\t\treturn values;\n\t}", "Set getIndexedValues(int localIndex) {\r\n if (!needIndexing) return null;\r\n if (indexedValues == null) {\r\n for (int i = 0; i < attrs.length; i++) {\r\n indexedValues[i] = new HashSet();\r\n }\r\n for (int i = 0; i < tupleCount; i++) {\r\n Tuple t = tuple[i];\r\n for (Iterator j = indexableAttr.iterator(); j.hasNext(); ) {\r\n int attr = ((Integer) j.next()).intValue();\r\n int value = (int) t.getValue(attr);\r\n indexedValues[attr].add(new Integer(value));\r\n }\r\n }\r\n }\r\n return indexedValues[localIndex];\r\n }", "ElementVariable(IntVar index, ArrayList<? extends IntVar> list, IntVar value) {\n\n\t\tthis(index, list.toArray(new IntVar[list.size()]), value, 0);\n\n\t}", "public E decode(ArrayList<Integer> individual);", "public List_inArraySlots() {\n intElements = new int[INITIAL_CAPACITY];\n doubleElements = new double[INITIAL_CAPACITY];\n stringElements = new String[INITIAL_CAPACITY];\n\n typeOfElements = new int[INITIAL_CAPACITY];\n }", "public abstract ArrayList<Integer> getIdList();", "abstract public Object getValue(int index);", "public interface NumberDataElement {\r\n \r\n public int getValueI();\r\n public void setValueI(int value);\r\n\r\n public void setValue(int l);\r\n \r\n}", "public DatasetIndex(Dataset data){\n\t\tthis();\n\t\tfor(Iterator<Example> i=data.iterator();i.hasNext();){\n\t\t\taddExample(i.next());\n\t\t}\n\t}", "int getListData(int list) {\n\t\treturn m_lists.getField(list, 5);\n\t}", "public void setData(List<Number> data) {\n this.data = data;\n }", "void mo9148a(int i, ArrayList<C0889x> arrayList);", "public java.util.List<java.lang.Integer>\n getDataList() {\n return java.util.Collections.unmodifiableList(data_);\n }", "java.util.List<java.lang.Integer> getRequestedValuesList();", "public static void buildElements(Object p,Object v,List<DataElement> dataVect) {\n if(!(p instanceof Iterable<?>)) p=null;\r\n if(!(v instanceof Iterable<?>)) v=null;\r\n if(p==null && v==null) return;\r\n Iterator<?> pi=(p==null)?null:((Iterable<?>)p).iterator();\r\n Iterator<?> vi=(v==null)?null:((Iterable<?>)v).iterator();\r\n while((pi!=null && pi.hasNext()) || (vi!=null && vi.hasNext())) {\r\n Object po=(pi==null)?null:pi.next();\r\n Object vo=(vi==null)?null:vi.next();\r\n int[] params=null;\r\n float[] vals=null;\r\n // if(po instanceof NativeArray) po=new IterableNativeArray((NativeArray)po);\r\n if(po instanceof int[]) params=(int[])po;\r\n else if(po instanceof Iterable<?>) {\r\n Iterable<?> i=(Iterable<?>)po;\r\n int cnt=0;\r\n for(Iterator<?> iter=i.iterator(); iter.hasNext(); iter.next()) {\r\n cnt++;\r\n }\r\n params=new int[cnt];\r\n cnt=0;\r\n for(Object o:i) {\r\n params[cnt]=ScriptUtil.objectToInt(o);\r\n cnt++;\r\n }\r\n } else if(po!=null) {\r\n params=new int[1];\r\n params[0]=ScriptUtil.objectToInt(po);\r\n }\r\n // if(vo instanceof NativeArray) vo=new IterableNativeArray((NativeArray)vo);\r\n if(vo instanceof float[]) vals=(float[])vo;\r\n else if(vo instanceof Iterable<?>) {\r\n Iterable<?> i=(Iterable<?>)vo;\r\n int cnt=0;\r\n for(Iterator<?> iter=i.iterator(); iter.hasNext(); iter.next()) {\r\n cnt++;\r\n }\r\n vals=new float[cnt];\r\n cnt=0;\r\n for(Object o:i) {\r\n vals[cnt]=ScriptUtil.objectToFloat(o);\r\n cnt++;\r\n }\r\n } else if(vo!=null) {\r\n vals=new float[1];\r\n vals[0]=ScriptUtil.objectToFloat(vo);\r\n }\r\n if(params==null) params=new int[0];\r\n if(vals==null) vals=new float[0];\r\n dataVect.add(new DataElement(params,vals));\r\n }\r\n }", "public Object getValue(int index);", "@Parameters\n public static Iterable<Object[]> getData() {\n List<Object[]> obj = new ArrayList<>();\n obj.add(new Object[] {3, 12});\n obj.add(new Object[] {2, 8});\n obj.add(new Object[] {1, 4});\n \n return obj;\n }", "public java.util.List<java.lang.Integer>\n getDataList() {\n return data_;\n }", "private void setData(T data, int size, List<? extends T> memory, T type) { }", "public void set(int[] ai);", "int givePropNum(List<List<Integer[]>> allPropCoords) throws Exception;", "Nda<V> get( int... indices );", "private Data[] getInts(double value, int npoints, int nattributes)\n\t{\n\t\tData[] data = new Data[npoints];\n\t\tint val = (int) (value * Integer.MAX_VALUE);\n\t\tfor (int i = 0; i < npoints; i++)\n\t\t\tdata[i] = nattributes == 1 ? new DataInt(val)\n\t\t: new DataArrayOfInts(new int[] { val, val });\n\t\t\treturn data;\n\t}", "void set(int index, Object element);", "private void collectValues\n (int[] i, int i0, int i1, long[] V) {\n for (int o=i0; o<i1; o++) // 1\n V[o] = read(i[o]); // 1\n }", "@ZenCodeType.Method\n static IData listOf(IData... members) {\n \n if(members == null) {\n return new ListData();\n }\n \n int type = 0;\n final int byteIndex = 1;\n final int intIndex = 2;\n final int longIndex = 4;\n final int otherIndex = 8;\n \n for(IData member : members) {\n if(member instanceof ByteData) {\n type |= byteIndex;\n } else if(member instanceof IntData || member instanceof ShortData) {\n type |= intIndex;\n } else if(member instanceof LongData) {\n type |= longIndex;\n } else {\n type |= otherIndex;\n }\n }\n \n if((type & otherIndex) != 0) {\n return new ListData(members);\n } else if((type & longIndex) != 0) {\n long[] result = new long[members.length];\n for(int i = 0; i < members.length; i++) {\n result[i] = members[i].asLong();\n }\n return new LongArrayData(result);\n } else if((type & intIndex) != 0) {\n int[] result = new int[members.length];\n for(int i = 0; i < members.length; i++) {\n result[i] = members[i].asInt();\n }\n return new IntArrayData(result);\n } else if((type & byteIndex) != 0) {\n byte[] result = new byte[members.length];\n for(int i = 0; i < members.length; i++) {\n result[i] = members[i].asByte();\n }\n return new ByteArrayData(result);\n }\n \n return new ListData();\n }", "public Item get(int i);", "private void collectTags\n (int[] i, int i0, int i1, long[] T) {\n for (int o=i0; o<i1; o++) // 1\n T[o] = data[i[o]]; // 1\n }", "public void processLargeInList(Set values);", "Map<Double, Element> getElements();", "Collection getData();", "void setListData(int list, int data) {\n\t\tm_lists.setField(list, 5, data);\n\t}", "public interface WordVector {\n\n void setFrom(Text...texts);\n void setWordsFrom(Text...texts);\n void setValuesFrom(Text...texts);\n\n\n List<String> getWords();\n void setWords(List<String> words);\n List<Double> getValues();\n void setValues(List<Double> values);\n\n double[] toArray();\n\n int size();\n\n}", "public int set(int index, int element);", "Object visitArrayOfValues(ArrayOfValuesNode node, Object state);", "@Parameters\r\n public static Collection<Object[]> data() {\r\n Object[][] data = new Object[][] { { -1 }, { 0 }, { 1 } };\r\n return Arrays.asList(data);\r\n }", "protected HashMap<String, BPTree<Double, FoodItem>> getIndexes(){\n \treturn this.indexes;\n }", "public interface PermutableElements extends SortableElements {\n\t/**\n\t * Initializes an Elements instance by creating n elements with ascending keys from 0 to n-1.\n\t * @param n the number of elements.\n\t */\n\tvoid init(int n);\n\t\n\t/**\n\t * Returns the key of the i-th element.\n\t */\n\tint getKey(int i);\n\t\n\t/**\n\t * Sets a new key for the i-th element.\n\t */\n\tvoid setKey(int i, int key);\n\t\n\t/**\n\t * Returns true iff the elements are sorted (in ascending order).\n\t */\n\tboolean areSorted();\n\t\n\t/**\n\t * Returns the number of comparisons, i.e., the number of invocations of the compare methods,\n\t * since the last call of init.\n\t */\n\tlong getNumberOfComparisons();\n}", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "@Override\n\tpublic Integer[] getData() {\n\t\treturn data;\n\t}", "public void setListProperty(List<Integer> t) {\n\n\t\t}", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic Tuple getItemSet(int Index) {\r\n\t\tTuple tuple=new Tuple(explanatorySet.size());\r\n\t\tfor(int i=0;i<explanatorySet.size();i++) {\r\n\t\t\tif(explanatorySet.get(i) instanceof DiscreteAttribute) {\r\n\t\t\t\ttuple.add(new DiscreteItem((DiscreteAttribute)explanatorySet.get(i),(String)getValue(Index,i)),i);\r\n\t\t\t}else if(explanatorySet.get(i) instanceof ContinuousAttribute)\r\n\t\t\t\ttuple.add(new ContinuousItem((ContinuousAttribute)explanatorySet.get(i),(Double)getValue(Index,i)),i);\r\n\t\t}\r\n\t\t\t\r\n\t\treturn tuple;\r\n\t}", "Nda<V> getAt( int... indices );", "void add(int index, Object element);", "public RandomizedSet() {\n data = new ArrayList<>();\n val2Index = new HashMap<>();\n }", "ElementVariable(IntVar index, IntVar[] list, IntVar value) {\n\n\t\tthis(index, list, value, 0);\n\n\t}", "public ElementVariable(IntVar index, ArrayList<? extends IntVar> list, IntVar value, int indexOffset) {\n\n\t\tthis(index, list.toArray(new IntVar[list.size()]), value, indexOffset);\n\n\t}", "List getValues();", "public interface MutableIVData extends DataManipulator<MutableIVData, ImmutableIVData> {\n\n Value<Integer> hpIVS();\n Value<Integer> attackIVS();\n Value<Integer> defenseIVS();\n Value<Integer> spAttackIVS();\n Value<Integer> spDefenseIVS();\n Value<Integer> speedIVS();\n\n}", "public Object get(int index);", "public Object get(int index);", "protected abstract Object[] getData();", "Nda<V> get( int i );", "public int[] getData(int index) {\n // retrieve the length \n int l = theList.get(index);\n // now retrieve the characters for this data block\n int data[] = new int[l];\n for(int i=0; i<l; i++) {\n data[i] = theList.get(index+1+i);\n }\n return data;\n }", "public interface MultiItemInterface {\n int getItemType();\n int getSpanSize();\n}", "public interface ListSettable<T> {\n\n void setData(List<T> data);\n}", "public int[] getIntList();", "@VTID(11)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 4}, optParamIndex = {3}, javaType = {int.class}, nativeType = {NativeType.Int32}, variantType = {Variant.Type.VT_I4}, literal = {\"1033\"})\n @ReturnValue(index=4)\n com.exceljava.com4j.excel.Name item(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object index,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object indexLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo);", "void setData(List<Person> data);", "public interface ExternalArrayData{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "int[] getGivenByOrder();", "@Parameters\n public static Collection<Object[]> data() {\n return Arrays.asList(new Object[][]{\n {4, 5, \"-\", \"-1\"},\n {6, 7, \"*\", \"42\"},\n {8, 4, \"/\", \"2\"},\n {2, 3, \"+\", \"5\"}\n });\n }", "public int getData(int index) {\n return data_.get(index);\n }", "private ArrayList<Integer> storeTreeElements(Tree tree) {\r\n\t\tArrayList<Integer> list1 = new ArrayList<>();\r\n\t\tstoreElements(tree, list1);\r\n\t\treturn list1;\r\n\t}", "@Parameters\n public static Iterable<Object[]> data() {\n return Arrays.asList(new Object[][] {\n // MAX_VALUE / 2 is important because the signs are generally the same for past and future\n // deadlines.\n {Long.MAX_VALUE / 2}, {0}, {Long.MAX_VALUE}, {Long.MIN_VALUE}\n });\n }", "private ItemSet generateItemSet(List<Item> items, int[] indexes) {\n\t\tItemSet result = new ItemSet();\n\n\t\tfor (int i = 0; i < indexes.length; i++) {\n\t\t\tresult.add(items.get(indexes[i]));\n\t\t}\n\n\t\treturn result;\n\t}", "public interface DataLocator<E> {\n\n E getData(int readLocation);\n\n void setData(int writeLocation1, E value);\n\n void writeAll(E[] newData, int length);\n\n int getCapacity();\n}", "T set(int index, T element);", "public List<Index> getIndexes();", "java.util.List<java.lang.Integer> getOtherIdsList();", "public interface ExternalArrayData\n{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "public synchronized void addUniqueMultiple(List<kelondroRow.Entry> rows) throws IOException {\n TreeMap<Integer, byte[]> indexed_result = super.addMultiple(rows);\r\n // indexed_result is a Integer/byte[] relation\r\n // that is used here to store the index\r\n Iterator<Map.Entry<Integer, byte[]>> i = indexed_result.entrySet().iterator();\r\n Map.Entry<Integer, byte[]> entry;\r\n while (i.hasNext()) {\r\n entry = i.next();\r\n index.puti(entry.getValue(), entry.getKey().intValue());\r\n }\r\n assert this.size() == index.size() : \"content.size() = \" + this.size() + \", index.size() = \" + index.size();\r\n \t\t\r\n }", "int getStateValues(int index);", "void example13() {\n\t\t\n\t\t// create a list of zeroes\n\t\t\n\t\tIndexedDataSource<Float64Member> list =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.DBL.construct(), 1000);\n\n\t\t// now setup a view that will increment by 3 starting at the list[4] and steps\n\t\t// up to 100 times.\n\t\t\n\t\tIndexedDataSource<Float64Member> seqData =\n\t\t\t\tnew SequencedDataSource<Float64Member>(list, 4, 3, 100);\n\n\t\tseqData.size(); // size == 100\n\t\t\n\t\t// now set a bunch of values\n\t\t\n\t\tFloat64Member value = G.DBL.construct();\n\t\t\n\t\tfor (long i = 0; i < seqData.size(); i++) {\n\t\t\tvalue.setV(i);\n\t\t\tseqData.set(i, value);\n\t\t}\n\t\t\n\t\t// data = [0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, ...]\n\t}", "Vector<Vector<Object>> getDataVector();", "public int addItem(Itemset i);", "Nda<V> getAt( List<?> key );", "public TypeHere get(int i) {\n return items[i];\n }", "public Object get(ListField list, int index) {\nif ( list == _lfBoys ) {\nreturn _listBoys.elementAt(index);\n} else {\nreturn _listGirls.elementAt(index);\n}\n}", "@Override\n public E set(int i, E e) throws IndexOutOfBoundsException {\n checkRange(i);\n E previousValue = get(i);\n\n if (size == 1) {\n storage = e;\n } else if (size <= 5) {\n ((E[]) storage)[i] = e;\n } else {\n ((ArrayList<E>) storage).set(i, e);\n }\n\n return previousValue;\n }", "public int[] getFixedLengthData(int index, int length) {\n int data[] = new int[length];\n for(int i=0; i<length; i++) {\n data[i] = theList.get(index+i);\n }\n return data;\n }", "public interface SpLocalFeatureList <T extends SpLocalFeature<?, ?>> extends SpRandomisableList<T>, Writeable {\n\n /** The header used when writing LocalFeatureLists to streams and files */\n public static final byte[] BINARY_HEADER = \"KPT\".getBytes();\n\n /**\n * Get the feature-vector data of the list as a two-dimensional array of\n * data. The number of rows will equal the number of features in the list,\n * and the type &lt;Q&gt;must be compatible with the data type of the features\n * themselves.\n *\n * @param <Q>\n * the data type\n * @param a\n * the array to fill\n * @return the array, filled with the feature-vector data.\n */\n public <Q> Q[] asDataArray(Q[] a);\n\n /**\n * Get the length of the feature-vectors of each local feature if they are\n * constant.\n *\n * This value is used as instantiate new local features in the case that the\n * local feature has a constructor that takes a single integer.\n *\n * @return the feature-vector length\n */\n public int vecLength();\n\n @Override\n public SpLocalFeatureList<T> subList(int fromIndex, int toIndex);\n\n}" ]
[ "0.60392976", "0.5871173", "0.58443063", "0.5793808", "0.56843793", "0.564175", "0.5610325", "0.55253357", "0.5494183", "0.54906744", "0.54745233", "0.54675156", "0.5448907", "0.5436183", "0.5411003", "0.54027855", "0.53703034", "0.5367264", "0.5349488", "0.532604", "0.5323814", "0.5316455", "0.53112006", "0.5307088", "0.5301529", "0.52791995", "0.5278884", "0.5267083", "0.526668", "0.5265264", "0.5247872", "0.5237379", "0.52324337", "0.5227405", "0.5223603", "0.52224255", "0.52155554", "0.5212313", "0.5209091", "0.5207772", "0.52012295", "0.51993775", "0.51937324", "0.5189801", "0.5189269", "0.5188642", "0.5181369", "0.518046", "0.5161816", "0.51591617", "0.5148047", "0.5143855", "0.5142159", "0.51420933", "0.5136539", "0.513078", "0.51158166", "0.5113088", "0.5102459", "0.51015997", "0.50999886", "0.5097272", "0.5081922", "0.50788033", "0.5069148", "0.50667095", "0.5066054", "0.5063954", "0.5059056", "0.5059056", "0.505464", "0.5048779", "0.5043569", "0.5041538", "0.50395775", "0.5038039", "0.5034808", "0.50341773", "0.50300664", "0.5029557", "0.5028356", "0.50222266", "0.50202894", "0.50158525", "0.5013262", "0.5009782", "0.4995206", "0.49932083", "0.49818105", "0.4981158", "0.49799782", "0.49740222", "0.4969899", "0.4964689", "0.4958922", "0.4953728", "0.4952074", "0.4950563", "0.49472046", "0.4946884", "0.49422625" ]
0.0
-1
Created by Ao on 20171015.
public interface User { public enum UserType{ STUDENT, TA, PROFESSOR } UserType getUserType(); String getToken(); String getName(); String getUsername(); String getEmail(); //int getNumberOfGroups(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void mo38117a() {\n }", "private void poetries() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "@Override\n\tpublic void nadar() {\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}", "public void gored() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public void mo6081a() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "private void init() {\n\n\t}", "public void method_4270() {}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo21877s() {\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void mo55254a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "public void mo12930a() {\n }", "public abstract void mo70713b();", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void m23075a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "public void skystonePos4() {\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public void mo21779D() {\n }", "public void mo12628c() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void getExras() {\n }", "public void mo21825b() {\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}", "public void mo21878t() {\n }", "@Override\n protected void initialize() {\n\n \n }", "public void mo115190b() {\n }", "public void baocun() {\n\t\t\n\t}", "private void init() {\n\n\n\n }", "@Override\r\n\tpublic void init() {}", "public void mo9848a() {\n }", "public void Tyre() {\n\t\t\r\n\t}", "@Override\n void init() {\n }", "public void skystonePos6() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "private void m50367F() {\n }", "@Override\n public void init() {}", "public void mo21791P() {\n }", "public void mo21793R() {\n }", "public void mo3376r() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}" ]
[ "0.5866869", "0.5778552", "0.57777137", "0.57569593", "0.570931", "0.5706855", "0.57066363", "0.5689637", "0.5687756", "0.5665537", "0.5617138", "0.56082386", "0.56040895", "0.56040895", "0.55950606", "0.55847734", "0.55804896", "0.5568785", "0.55575037", "0.5534293", "0.5512879", "0.5504488", "0.5504488", "0.5504488", "0.5504488", "0.5504488", "0.5504488", "0.5504488", "0.5494352", "0.5493245", "0.54913527", "0.5477912", "0.54686606", "0.5449858", "0.5447382", "0.54458565", "0.54373896", "0.54373896", "0.54373896", "0.54373896", "0.54373896", "0.5431559", "0.5424897", "0.54197764", "0.5412334", "0.54119587", "0.54060906", "0.5397754", "0.5395369", "0.5371741", "0.5365447", "0.53578335", "0.53559834", "0.535141", "0.5348501", "0.53474784", "0.534122", "0.53247327", "0.53189963", "0.5317078", "0.5315329", "0.530258", "0.530258", "0.52975845", "0.5289193", "0.52873003", "0.5282062", "0.52817726", "0.52817726", "0.52817726", "0.5279223", "0.5274604", "0.52736753", "0.52736753", "0.52736753", "0.5270287", "0.52592283", "0.52567047", "0.52567047", "0.52567047", "0.5256223", "0.52556175", "0.5240774", "0.52402985", "0.52373606", "0.52357477", "0.5234773", "0.5232141", "0.52312076", "0.5216694", "0.5215972", "0.5215972", "0.5215949", "0.5213673", "0.5213191", "0.5212875", "0.52115995", "0.5211283", "0.52111864", "0.5208295", "0.51995224" ]
0.0
-1
A view model that handles the interaction between the agenda view (fragment) and the model.
public interface AgendaViewModel { /** * Factory for creating an agenda view model. */ interface Factory { /** * Create an instance of an agenda view model with the given saved * instance state. * * @param savedInstanceState previously saved state of the view model * @return the created agenda view model */ AgendaViewModel create(Bundle savedInstanceState); } /** * Retrieve tasks for the user within a date range in ascending order by * date. * * @param startDate starting date of the agenda (inclusive) * @param endDate ending date of the agenda (exclusive) * @return observable list of tasks for the user sorted by date */ LiveData<List<Task>> getSortedTasks(LocalDate startDate, LocalDate endDate); /** * Add a task for the user. * * @param newTask the task to add * @return true if the operation was successful; false otherwise */ boolean addTask(Task newTask); /** * Update a task for the user. * * @param updatedTask the modified task to save * @return true if the operation was successful; false otherwise */ boolean updateTask(Task updatedTask); /** * Delete a task for the user. * * @param task the task to delete * @return true if the operation was successful; false otherwise */ boolean deleteTask(Task task); /** * Retrieve the active task for the user. * * @return current active task for the user */ @VisibleForTesting(otherwise = VisibleForTesting.NONE) LiveData<Task> getActiveTask(); /** * Update the active task for the user. * * @param task the task to be active * @return true if the operation was successful; false otherwise */ boolean updateActiveTask(Task task); /** * Perform clean-up for this instance. */ void onDestroy(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OwnEventsView extends BaseView {\n\n void adaptEventsList(List<EventModel> eventModelsList);\n\n void viewEvent(EventModel eventModel);\n\n void showViewRefreshing();\n\n void hideViewRefreshing();\n\n void hideViewEmpty();\n\n void showViewEmpty();\n\n}", "public interface ModelToViewModel {\n public void formWasCreated(DailySchedule dailySchedule);\n public void eventWasCreated(Event event);\n}", "AgendaViewModel create(Bundle savedInstanceState);", "public interface ZkToDoModel {\r\n\r\n\tpublic abstract void deleteEvent(Reminder reminder)\r\n\t\t\tthrows EntityNotFoundException;\r\n\r\n\tpublic abstract List<Reminder> findAll();\r\n\r\n\tpublic abstract void mergeEvent(Reminder reminder)\r\n\t\t\tthrows EntityNotFoundException;\r\n\r\n\tpublic abstract void persistEvent(Reminder reminder);\r\n\r\n\t//used by selectedItem=\"@{controller.selectedReminder}\" and others\r\n\tpublic abstract Reminder getSelectedReminder();\r\n\r\n\t//used by selectedItem=\"@{controller.selectedReminder}\" and others\r\n\tpublic abstract void setSelectedReminder(Reminder reminder);\r\n\r\n\t//used by model=\"@{controller.reminders}\"\r\n\tpublic abstract List<Reminder> getReminders();\r\n\r\n}", "public interface EventView {\n void Arrived(List<EventModel> list);\n void NoEvents(String error);\n //void ArrivedAllEvents(List<EventModel> list);\n //void NoAllEvents(String error);\n\n}", "public interface View {\n void setupViews();\n void onClickMonth();\n void onClickYear();\n void onSuccess(RevenueModel body);\n void onSuccessWithdrawl(BaseResponse body);\n void onFailure();\n void onFailureWithdrawl();\n }", "public abstract V getViewModel();", "public abstract V getViewModel();", "public abstract V getViewModel();", "public interface AppointmentView {\n void loadAppointmentInformation(MeetingTime appointment);\n void showConfirmationMessage(String message);\n void hideLoading();\n void updateMeetingStatus(String stateMessage);\n}", "interface Factory {\r\n /**\r\n * Create an instance of an agenda view model with the given saved\r\n * instance state.\r\n *\r\n * @param savedInstanceState previously saved state of the view model\r\n * @return the created agenda view model\r\n */\r\n AgendaViewModel create(Bundle savedInstanceState);\r\n }", "public interface View\n{\n void refresh(ModelData modelData);\n\n void setController(Controller controller);\n}", "public interface DailyView {\n void onLoadDaily(List<DailyModel> daily);\n}", "public interface MainMvpView extends MvpView {\n\n void showSchoolModel(SchoolModel schoolModel);\n void showInfo(BabyModel babyModel, TCUserModel userModel,String babyId,String userId);\n void uploadHeadImgResult(boolean isSuccess,String name);\n void showTeacherInfo(AttendenceTeacherModel teacherModel,String qrCode,String teacherId, String schoolId);\n void onError(String msg);\n void toUpdate(AppVersionModel model);\n void inputUUIDClick(String uuid);\n void updateStateSuccess();\n void updateError();\n}", "void updateViewFromModel();", "EventChannelInner innerModel();", "protected Activity getActivity() {\n\t\treturn (Activity) getHost().getModel();\n\t}", "protected abstract void populateView(View v, T model);", "public interface MainModel {\n\n List<Fragment> initViewPagerData();\n\n int getEggData();\n\n}", "public interface Model {\n\tObservable<SignUpResponse> userLogin(String userEmail, String userPassword);\n\n\tObservable<ConferenceFeedResponse> getConferenceFeed(int offset);\n\n\tObservable<ConferenceDataResponse> getConferenceData(int id);\n\n\tObservable<ProfileDataResponse> getProfileData(int id);\n}", "public interface SongMenuView<E> extends BaseView<E>{\n void refreshData(List<SongMenu> songMenu);\n void loadMoreData(List<SongMenu> songMenu);\n}", "abstract public void handleModelEvent(ModelEvent modelEvent);", "public interface CreateProgramView extends MvpView\n{\n\tvoid initViewPager(Boolean needPublicInfo, Boolean needDeposit, CreateProgramModel model);\n\n\tvoid showSettings();\n\n\tvoid showDeposit();\n\n\tvoid showProgress(boolean show);\n\n\tvoid showSnackbarMessage(String message);\n\n\tvoid finishActivity();\n}", "public interface IOrderView extends MvpView {\n void showView(List<Order> orders);\n void addOrder();\n}", "void updateModelFromView();", "public AgendaController(){\n setService(new JavaServiceFacade());\n setActividadRegistrar(new CalendarActivityClinica());\n setModel(new CalendarModelClinica());\n if(this.isPermisoAgendaPersonal()){\n setUsuarioAgenda(LoginController.getUsuarioLogged());\n }\n generarActividades();\n setListaPacientes(service.getPacienteFindAll());\n setListaUsuarios(service.getUsuarioFindAll());\n setMensajeRegistrar(\"\");\n setMensajeEditar(\"\");\n }", "public interface FragmentHomeContract {\n interface Model {\n Observable<BaseGson<List<BannerGson>>> getBannerList();\n\n Observable<BaseGson<IcoGson>> setMainPageIco();\n }\n\n interface View {\n void showMessage(String message);\n\n void showLoading();\n\n void setBannerURL(List<BannerGson> bannerURL);\n void setMainIco(IcoGson ico);\n\n void hideLoading();\n }\n\n interface Presenter {\n void getData();\n }\n}", "public interface OrderFragmentView {\n void addControls(View view);\n void addToolBar(View view);\n void showMessage(String message);\n void showRecyclerViewOrder(ArrayList<Order> orders);\n void setupOrderInDay(int allOrderAmount, int newOrderAmount,\n int cancelOrderAmount, int completedOrderAmount);\n\n void addEvents();\n void updateListView(ArrayList<Order> orders);\n}", "public interface EditMovementView extends View {\n\n void cancel();\n\n void save();\n\n void setTitle(String title);\n\n void finish(Movement movement, String action);\n\n void setDate(String date);\n\n void showDialog();\n\n void hideDialog();\n\n void showError (String error);\n\n void fillForm(Movement movement);\n\n void setCategoryies(ArrayAdapter<String> adapter);\n\n void setNames(ArrayAdapter<String> adapter);\n\n}", "public interface VenueView extends View {\n void showVenue(Venue venue);\n}", "private CalendarModel() {\n events = new ArrayList<>();\n }", "public interface MainView extends BaseView{\n\n void addMoreMoviesToTheList(List<MovieInfoModel> movieInfoModelList);\n void showMovieList(List<MovieInfoModel> movieInfoModelList);\n void resetPageNumberToDefault();\n void showNoMovieInfo();\n\n}", "public Model getModel () { return _model; }", "public Appointment()\r\n {\r\n // cView = new CalendarEventView(\"appointmentView\");\r\n }", "@Override\n protected void initViewModel() {\n }", "public RunMVC() {\n\n\t\t//cria o Modelo e a Visao\n\t\tModel myModel \t= new Model();\n\t\tView myView \t= new View();\n\t\t//View outraView \t= new View();\n\t\tOutraView outraView \t= new OutraView();\n\n\t\t//avisa o modelo que a visao existe \n\t\tmyModel.addPropertyChangeListener(myView);\n\t\tmyModel.addPropertyChangeListener(outraView);\n\n\t\tController myController = new Controller();\n\t\tmyController.addModel(myModel);\n\t\t//myController.addView(myView);\n\t\t//myController.addView(outraView);\n\t\tmyController.initModel(start_value);\n\n\t\t//tell View about Controller \n\t\tmyView.addController(myController);\n\t\toutraView.addController(myController);\n\t\t\n\n\t}", "public MCalendarEventView()\r\n {\r\n }", "public interface Model {\n /** Clears existing backing model and replaces with the provided new data. */\n void resetData(ReadOnlyTaskManager newData);\n\n /** Returns the TaskManager */\n ReadOnlyTaskManager getTaskManager();\n\n /** Adds the given floating task */\n void addTask(Task task);\n \n /** Deletes the given floating task. */\n void deleteUndoneTask(ReadOnlyTask target) throws UniqueTaskList.TaskNotFoundException;\n\n /** Add the given floating tasks */\n void addTasks(List<Task> tasks);\n \n /** Archives the task by adding it into DoneTaskList */\n void addDoneTask(Task task);\n\n /** Removes the task permanently from the archive DoneTaskList **/\n void deleteDoneTask(ReadOnlyTask floatingTask) throws TaskNotFoundException;\n \n /** Archives the tasks by adding them into DoneTaskList */\n void addDoneTasks(List<Task> task);\n \n /** Returns the filtered undone task list as an {@code UnmodifiableObservableList<ReadOnlyPerson>} */\n UnmodifiableObservableList<ReadOnlyTask> getFilteredUndoneTaskList();\n \n /** Returns the filtered done task list as an {@code UnmodifiableObservableList<ReadOnlyPerson>} */\n UnmodifiableObservableList<ReadOnlyTask> getFilteredDoneTaskList();\n\n /** Updates the filter of the filtered task lists to show all tasks */\n void updateFilteredListsToShowAll();\n\n /** Updates the filter of the filtered task list to filter by the given keywords*/\n void updateFilteredUndoneTaskListNamePred(Set<String> keywords);\n\n /** Updates the filter of the filtered done task list to filter by the given keywords*/\n void updateFilteredDoneTaskListNamePred(Set<String> keywords);\n \n /** Returns true is current list is done task list, false if current list is undone task list*/\n Boolean isCurrentListDoneList();\n \n /** Sets current list to be done list*/\n public void setCurrentListToBeDoneList();\n \n /** Sets current list to be undone list*/\n public void setCurrentListToBeUndoneList();\n \n /** Edits the parameters of the given floating task*/\n\tvoid editTask(ReadOnlyTask taskToEdit, Name taskName, Date startDate, Date endDate, Priority priority,\n\t\t\tRecurrenceRate recurrenceRate);\n\t\n /** Clears existing backing model of the done task data and replaces with the provided new data. */\n void resetDoneData(ReadOnlyTaskManager newData);\n \n /** Clears existing backing model if the undone task data and replaces with the provided new data. */\n void resetUndoneData(ReadOnlyTaskManager newData);\n \n void setTaskManagerUndoneList(ObservableList<Task> list);\n\n void setTaskManagerDoneList(ObservableList<Task> list);\n \n void clearTaskManagerUndoneList();\n \n void clearTaskManagerDoneList();\n \n ObservableList<Task> getTaskManagerUndoneList();\n \n ObservableList<Task> getTaskManagerDoneList();\n\n void updateFilteredUndoneTaskListDatePred(String keyword) throws IllegalValueException;\n\n void updateFilteredDoneTaskListDatePred(String keyword) throws IllegalValueException;\n\n\n\n\n\n}", "public interface DealFragmentView {\n void displayDealData(List<MusicModel> dealList);\n}", "public EAEditorView(ReadOnlyEAOperations model) {\n\n super();\n setTitle(\"The Easy Animator\");\n\n // check for null\n if (model == null) {\n throw new IllegalArgumentException(\"Model can't be null\");\n }\n this.model = model;\n\n // initialize the main panel\n constructMainPanel();\n constructAnimationPanel();\n generateLabelPanel();\n generateButtonPanel();\n constructPopup();\n createOKButtons();\n\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.pack();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_edit_day, container, false);\n ButterKnife.bind(this, view);\n\n if (mBinding == null) {\n mBinding = FragmentEditDayBinding.bind(view);\n }\n\n mViewModel = EditActivity.obtainViewModel(getActivity());\n mBinding.setViewmodel(mViewModel);\n\n setRetainInstance(false);\n\n return mBinding.getRoot();\n }", "public interface InvalidatedModelListener {\n\n /**\n * When the data model for a view is invalidated, this should be triggered.\n */\n void onInvalidatedModel();\n\n}", "private void configureEstateCreateViewModel(){\n ViewModelFactory modelFactory = Injection.provideViewModelFactory(this);\n mSearchEstateViewModel = ViewModelProviders.of(this, modelFactory).get(SearchEstateViewModel.class);\n\n mSearchEstateViewModel.getViewActionLiveData().observe(this, new Observer<SearchEstateViewModel.ViewAction>() {\n @Override\n public void onChanged(SearchEstateViewModel.ViewAction viewAction) {\n if (viewAction == null) {\n return;\n }\n\n switch (viewAction) {\n case INVALID_INPUT:\n showSnackBar(\"Invalid data search\");\n break;\n\n case FINISH_ACTIVITY:\n Intent intent = new Intent();\n intent.putExtra(BUNDLE_SEARCH_OK,true);\n intent.putExtra(BUNDLE_SEARCH_DATA, mSearchEstateViewModel.getSearchData());\n setResult(RESULT_OK,intent);\n // Close Activity and go back to previous activity with a SearchData Object\n finish();\n break;\n }\n }\n });\n\n // Observe a change of Date of Entry1 on the Market\n mSearchEstateViewModel.getDateEntryOfTheMarket1().observe(this,this::refreshDateEntryOfTheMarket1);\n // Observe a change of Date of Entry2 on the Market\n mSearchEstateViewModel.getDateEntryOfTheMarket2().observe(this,this::refreshDateEntryOfTheMarket2);\n // Observe a change of Date of Sale1 on the Market\n mSearchEstateViewModel.getDateSale1().observe(this,this::refreshDateSale1);\n // Observe a change of Date of Sale2 on the Market\n mSearchEstateViewModel.getDateSale2().observe(this,this::refreshDateSale2);\n }", "@Override\n public DashboardViewModel getViewModel() {\n return viewModel;\n }", "public ModelBean provideModel();", "MainPresenter(MainContract.View view) {\n this.view = view;\n model = new AmicableModel();\n }", "public interface MVP {\n interface ModelImpl{\n public void retrievePersonas();\n public void updateEsFavoritoPersona(Persona persona);\n }\n\n interface PresenterImpl{\n public void retrievePersona(Bundle savedInstanceState);\n public void updateEsFavoritoPersona(Persona persona);\n public void showToast(String mensaje);\n public void showProgressBar(boolean status);\n public void setView(MVP.ViewImpl view);\n public Context getContext();\n public void updateListaRecycler(ArrayList<Persona> personas);\n public void updateItemRecycler(Persona persona);\n public ArrayList<Persona> getPersonas();\n }\n\n interface ViewImpl{\n final String PERSONAS_KEY = \"personas\";\n\n public void showToast(String mensaje);\n public void showProgressBar(int visibilidad);\n public void updateListaRecycler();\n public void updateItemRecycler(int posicion);\n }\n}", "public interface BeerView\n{\n\n void setBeers(List<Beer> beers);\n\n void startDetails(Beer beer);\n\n void addBeers(List<Beer> beers);\n}", "public interface NewBookView extends BaseView{\n void initData(List<NewBookBean> data);\n void showLoading();\n void showLoaded();\n}", "@Override\r\n\tpublic Object getModel() {\n\t\treturn this.roomcalander;\r\n\t}", "public interface ExpensesRecordView extends BaseView {\n void showData(List entityList);\n}", "public interface listener_for_frag {\n public void set_movie_model(movie_model s);\n}", "protected void modelChanged() {\n // create a view hierarchy\n ViewFactory f = rootView.getViewFactory();\n Document doc = editor.getDocument();\n Element elem = doc.getDefaultRootElement();\n setView(f.create(elem));\n }", "public interface HomeView {\n void retrieveProjectListSuccess(ArrayList<Project> projects);\n void retrieveProjectListFailure(String failureMessage);\n\n void editProjectSuccess(Project project);\n void editProjectFailure(String response);\n\n void deleteSuccess();\n void deleteFailed();\n\n void addProjectSuccess();\n void addProjectFailure(String response);\n\n void deleteProjectInvoked(int pk, int position);\n void addProject(String title, String description, String start_date, String end_date, boolean isBillable, boolean isActive);\n void editProject(int pk, String title, String description, String start_date, String end_date, boolean isBillable, boolean isActive);\n void startAddFragment(FlowType type, Project project);\n void setToolbarTitle(String title);\n}", "A getModel();", "public View emitAsView() {\n return view;\n }", "public interface HomeView extends MvpView {\n\n void onBannerResult(List<String> list);\n\n void onMarqueesResult(List<String> list);\n\n void onNewItemResult(List<HomeFragment.NewItem> list);\n\n void onNewItemResults(List<NewEntity> list);\n\n void onCheckIsAttend(boolean isAttend);\n}", "public interface Model extends PhotoView.Model {\n void resume();\n\n void pause();\n\n boolean isEmpty();\n\n void setCurrentPhoto(Path path, int indexHint);\n }", "void onModelChange();", "public interface Model {\n /** Clears existing backing model and replaces with the provided new data. */\n void resetData(ReadOnlyTaskList newData);\n\n /** Returns the TaskList */\n ReadOnlyTaskList getTaskList();\n\n /** Deletes the given person. */\n void deleteTask(ReadOnlyTask target) throws UniqueTaskList.TaskNotFoundException;\n\n /** Adds the given person */\n void addTask(Task person) throws UniqueTaskList.DuplicateTaskException;\n\n /**\n * Updates the person located at {@code filteredTaskListIndex} with {@code editedTask}.\n *\n * @throws DuplicateTaskException if updating the person's details causes the person to be equivalent to\n * another existing person in the list.\n * @throws IndexOutOfBoundsException if {@code filteredTaskListIndex} < 0 or >= the size of the filtered list.\n */\n void updateTask(int filteredTaskListIndex, ReadOnlyTask editedTask)\n throws UniqueTaskList.DuplicateTaskException;\n\n /** Returns the filtered person list as an {@code UnmodifiableObservableList<ReadOnlyTask>} */\n UnmodifiableObservableList<ReadOnlyTask> getFilteredTaskList();\n\n /** Updates the filter of the filtered person list to show all persons */\n void updateFilteredListToShowAll();\n\n /** Updates the filter of the filtered person list to filter by the given keywords*/\n void updateFilteredTaskList(Set<String> keywords);\n\n}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_posts_details, container, false);\r\n\r\n vm = new ViewModelProvider(requireActivity()).get(MainActivityVM.class);\r\n\r\n title = view.findViewById(R.id.title);\r\n body = view.findViewById(R.id.body);\r\n\r\n Post post = vm.getPostDetails();\r\n\r\n title.setText(post.getTitle());\r\n body.setText(post.getBody());\r\n\r\n\r\n// vm.getPostDetails().observe(getActivity(), new Observer<Post>() {\r\n// @Override\r\n// public void onChanged(Post post) {\r\n// title.setText(post.getTitle());\r\n// body.setText(post.getBody());\r\n// }\r\n// });\r\n\r\n return view;\r\n }", "public interface DetailListMvpView extends MvpView {\n\n void loadDetailCoach(Coaches coaches);\n}", "public interface FragmentModel<T> extends Iterable<T> {\n\n\tvoid addFragment(T fragment, String title);\n\n\tvoid recreate();\n\n\tboolean isReferenceEqual(T currentFragment, MenuType typ);\n\n\tT get(MenuType typ);\n\n\tint count();\n\n\tint indexOf(Object object);\n\n\tT get(int position);\n\n\tList<MenuType> getTypes();\n}", "public abstract M getModel();", "public interface IMainView extends MvpView {\n\n void setRecordStatus();\n\n void releaseRecordStatus();\n\n void updateMsgList(MsgBean msgBean);\n\n void showMsg(String msg);\n\n\n}", "public interface ExplanationReadingView {\n void initView();\n\n void setItems(List<ExplanationOrReadingItem> items);\n\n void finishView(String id);\n\n\n}", "public interface MvpView extends LifecycleOwner {\n}", "public interface MeetingoneView {\n void showLoadingProgress();\n void dismissLoadingProgress();\n void update(List<MyConnectionList.ResultEntity> userMeeting);\n}", "public interface OrderHistoryView {\n\n void listHistoryOrder(List<OrderHistoryData> feedItemList);\n\n void errorLoading();\n}", "public CreateEventFragment() {\n // Required empty public constructor\n }", "public abstract VT getItemViewModel(ViewDataBinding viewDataBinding);", "public Agendas getAgenda() {\n return agenda;\n }", "@Override\r\n\tpublic Activity getActivity() {\n\t\treturn this;\r\n\t}", "@Override\r\n\tpublic void setModel() {\n\t}", "@Override\n public void modelView(Model m) {\n Aluno a = (Aluno) m;\n this.jCurso.setSelectedItem(a.getCurso());\n this.jAno.setSelectedItem(a.getAno());;\n this.jNome.setText(a.getNome());\n this.jIdade.setText(a.getIdade());\n }", "public interface ActivityCategoryView {\n void getCategory();\n void setCategory(List<Category> categories);\n void saveSuccess(Category category);\n void updateSuccess(Category category);\n void deleteSuccess(Category category);\n void error(String msg);\n}", "public interface NoteView extends BaseView {\n public void addNote();\n}", "public interface UserMVP {\n\n interface View extends IView{\n\n void onGetUserInfo(UserDetailInfo user);\n\n void onFollowUser();\n\n void onUnFollowUser();\n\n void onFreshUserTopic();\n }\n\n interface Presenter extends IPresenter<View> {\n\n void onStart();\n\n void onStop();\n }\n\n interface Model {\n\n Observable<UserDetailInfo> getUserInfo(String username);\n\n Observable<Ok> followUser(String username);\n\n Observable<Ok> unfollowUser(String username);\n }\n}", "interface PresenterToModel extends Model<ModelToPresenter> {\n\n\n\n\n String getNameLabel();\n\n\n String getPhotoLabel();\n\n\n String getLabelRadio0();\n\n\n String getLabelRadio1();\n\n\n String getLabelRadio2();\n\n\n String getLabelRadio3();\n\n\n String getButtonAddlabel();\n\n\n String getToastNotifyingAdded();\n\n\n void insertEvent(String Categoryname, String image);\n\n String getImageByIdSelected(int id);\n\n\n String getImage(int i);\n }", "ModelData getModel();", "private void setUpViewModels(){\n EventViewModelFactory factory = new EventViewModelFactory(mDatabase, mEventId);\n EventViewModel eventViewModel =\n ViewModelProviders.of(this, factory).get(EventViewModel.class);\n //Uses view model to get category list\n //listener is called any time the categories are changed or updated\n eventViewModel.getCategoryList().observe(this, new Observer<List<Category>>() {\n @Override\n public void onChanged(List<Category> categories) {\n mCategories = new ArrayList<>(categories);\n setUpSpinner(); //sets up spinner if categories change\n }\n });\n\n //creates a new Factory with database and current time\n AddScheduledEventViewModelFactory eventFactory =\n new AddScheduledEventViewModelFactory(mDatabase, Calendar.getInstance().getTimeInMillis());\n AddScheduledEventViewModel addScheduledEventViewModel =\n ViewModelProviders.of(this, eventFactory).get(AddScheduledEventViewModel.class);\n //attaches listener to events list\n addScheduledEventViewModel.getEvents().observe(this, new Observer<List<Event>>() {\n @Override\n public void onChanged(List<Event> events) {\n //updates the events that are given to mScheduler\n if(mScheduler == null){\n mScheduler = new Scheduler(events, Calendar.getInstance(), null);\n } else mScheduler.setEvents(events);\n }\n });\n }", "public CalendarEventView getCalendarEventView()\r\n {\n CalendarEventView cView = new CalendarEventView(\"appointmentView\");;\r\n\r\n cView.setEventId(getEventId());\r\n return cView;\r\n }", "public interface HistoryChartMvpView extends MvpView {\n\n void loadHistoryStats(List<History> productsHistory);\n\n}", "public interface ClothesDetailActivityView {\n void showProgress();\n void hideProgress();\n void showClothesDetail(ClothesViewModel clothesViewModel);\n void showErrorLoading(String message);\n\n}", "public interface MvpModel {\n}", "public interface Model {\n\n /**\n * Replaces user prefs data with the data in {@code userPrefs}.\n */\n void setUserPrefs(ReadOnlyUserPrefs userPrefs);\n\n /**\n * Returns the user prefs.\n */\n ReadOnlyUserPrefs getUserPrefs();\n\n /**\n * Returns the user prefs' GUI settings.\n */\n GuiSettings getGuiSettings();\n\n /**\n * Sets the user prefs' GUI settings.\n */\n void setGuiSettings(GuiSettings guiSettings);\n\n /**\n * Returns the user prefs' address book file path.\n */\n Path getVendorManagerFilePath();\n\n /**\n * Sets the user prefs' menu manager file path.\n */\n void setVendorManagerFilePath(Path vendorManagerFilePath);\n\n /**\n * Replaces menu manager data with the data in {@code menuManager}.\n */\n\n void setVendorManager(ReadOnlyVendorManager vendorManager);\n\n /**\n * Returns the VendorManager\n */\n ReadOnlyVendorManager getVendorManager();\n\n /**\n * Returns true if a vendor with the same identity as {@code vendor} exists in the address book.\n */\n boolean hasVendor(Vendor vendor);\n\n /**\n * Selects the vendor with index {@code vendorIndex} .\n * {@code vendorIndex} must be a valid index in the model.\n */\n void selectVendor(int vendorIndex);\n\n ObservableList<Vendor> getObservableVendorList();\n\n /**\n * Replaces address book data with the data in {@code menuManager}.\n */\n void setMenuManager(ReadOnlyMenuManager menuManager, int index);\n\n /**\n * Returns the MenuManager at the ith index\n */\n ReadOnlyMenuManager getMenuManager(int index);\n\n void sortMenuItemBy(String sortedBy, boolean ascending, boolean toggle);\n\n void showDefaultMenu();\n /**\n * Replaces OrderManager data with the data in {@code orderItems}.\n */\n void setOrder(List<OrderItem> orderItems);\n\n /**\n * Replaces OrderManager data with the data in {@code orderManager}.\n */\n void setOrderManager(ReadOnlyOrderManager orderManager);\n\n /**\n * Returns the MenuManager at the ith index\n */\n ReadOnlyOrderManager getOrderManager();\n\n /**\n * Returns true if an orderItem with the same identity as {@code orderItem} exists in the address book.\n */\n boolean hasOrderItem(OrderItem orderItem);\n\n /**\n * Deletes the given orderItem.\n * The orderItem must exist in the order manager.\n */\n void removeOrderItem(OrderItem target);\n\n /**\n * Adds the given orderItem.\n * {@code orderItem} if orderItem exists in order manageradd to the current quantity.\n * @throws CommandException if after adding, there is more than 100 of the same order item\n */\n void addOrderItem(OrderItem orderItem) throws CommandException;\n\n /**\n * Returns an unmodifiable view of the filtered menu item list at the corresponding index\n */\n ObservableList<MenuItem> getFilteredMenuItemList();\n\n int getFilteredMenuItemListSize();\n\n /**\n * Clears the order.\n */\n void clearOrder();\n\n /**\n * Clears the orderHistory.\n */\n void resetOrder();\n\n /**\n * Updates the filter of the filtered menu item list at the corresponding index to filter by the given\n * {@code predicate}.\n *\n * @throws NullPointerException if {@code predicate} is null.\n */\n void updateFilteredMenuItemList(Predicate<MenuItem> predicate);\n\n /**\n * Updates the filter of the filtered menu item list at the corresponding index to filter by the given\n * {@code comparator}.\n * Only used for test cases.\n * @throws NullPointerException if {@code comparator} is null.\n */\n void updateFilteredMenuItemList(Comparator<MenuItem> comparator, boolean isSortedAsc);\n\n\n /**\n * Returns an unmodifiable view of the filtered orderItem list at the corresponding index\n */\n ObservableList<OrderItem> getObservableOrderItemList();\n\n int getOrderSize();\n\n int getVendorIndex();\n\n int getOrderHistorySize();\n\n int getOrderItemQuantity(int index);\n\n void undoOrder();\n\n boolean isSelected();\n\n void tagOrderItem(OrderItem orderItem, Tag tag);\n\n void untagOrderItem(OrderItem orderItem);\n}", "public interface HomeFragmentView {\n void toActivity();\n\n void initRecyclerView(CurrentDayNews currentDayNews);\n\n void updateRecyclerView(HistoryNews historyNews);\n\n void toToast(String message);\n}", "@Override\n\tpublic CalEntity getModel() {\n\t\treturn model;\n\t}", "@Override\n\tpublic Activity getActivity() {\n\t\treturn this;\n\t}", "public interface HistoryModel {\n\n void getData(String date, LoadListener listener);\n\n}", "protected E getModel ()\n\t{\n\t\treturn model;\n\t}", "public interface TasksView {\n\n /**\n * Set To.Dos in the Adapter\n *\n * @param tasks\n */\n void setTodos(ArrayList<Task> tasks);\n\n /**\n * Notify To.Dos data set has changed\n */\n void notifyListDataSetChanged();\n\n /**\n * Notify item removed in Adapter\n *\n * @param position\n */\n void notifyListItemRemoved(int position);\n\n /**\n * Notify item inserted in Adapter\n *\n * @param position\n */\n void notifyListItemInserted(int position);\n\n /**\n * Show Dialog with To.Do actions\n *\n * @param task\n */\n void showItemDialog(Task task, CharSequence items[]);\n\n /**\n * Show TodoView to edit old To.Do\n *\n * @param task\n */\n void showTodoViewToEdit(Task task);\n\n /**\n * Show TodoView to create new To.Do\n */\n void showTodoView();\n\n}", "public interface OrdersMvpView extends MvpView {\n\n void showOrderEmptyView();\n\n void showOrderErrorView(String msg);\n\n void showNoMoreOrdersView();\n\n void onRefreshOrdersSuccess(List<Order> orders);\n\n void onLoadMoreOrdersSuccess(List<Order> orders);\n\n void onGetOrdersFailed(String msg);\n\n void hideLoading();\n\n}", "public VendaView() {\n initComponents();\n }", "public interface SubTagMvpView extends MvpView {\n void showData(List<Data> datas);\n}", "public interface ViewWithViewModel {\n public void setViewModel(Object viewModel);\n}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n View view = inflater.inflate(R.layout.fragment_detail, container, false);\n\n // Antes que nada veo que marca se clickeo!\n MessageEvent stickyEvent = EventBus.getDefault().getStickyEvent(MessageEvent.class);\n\n if(stickyEvent != null) {\n // \"Consume\" the sticky event\n EventBus.getDefault().removeStickyEvent(stickyEvent);\n this.brand = stickyEvent.firstMessage;\n this.model = stickyEvent.secondMessage;\n }\n\n viewPager = view.findViewById(R.id.viewpager);\n tabLayout = view.findViewById(R.id.appbartabs);\n\n // Set up the toolbar\n setUpToolbar(view);\n\n // Set up the viewpager\n setUpViewPager(viewPager, this.model);\n\n // Set up the tabs\n tabLayout = view.findViewById(R.id.appbartabs);\n tabLayout.setTabMode(TabLayout.MODE_FIXED);\n tabLayout.setupWithViewPager(viewPager);\n\n return view;\n }", "public interface PopularMovieView {\n\n void displayMovieList(List<PopularMovieVO> movieVOList);\n\n void navigateToMovieDetail(PopularMovieVO movie);\n\n void showLoading();\n\n Context getContext();\n}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_data_coa, container, false);\n\n ButterKnife.bind(this, root);\n\n setAppPreference(new PreferenceUtils(getActivity(), Constanta.APPLICATION_PREFERENCE));\n\n fabAddCoa.setOnClickListener(view -> {\n startActivity(new Intent(getActivity(), AddCoaActivity.class));\n });\n\n super.viewModel = new CoaModel();\n coaPresenter = new CoaPresenter();\n coaPresenter.init(super.viewModel, this, new ApiProvider());\n\n return root;\n }", "public interface IDailyView extends BaseView {\n\n //刷新数据\n void flushData(List<Gank> data);\n //显示发过干货日期的对话框\n void showDateListpopup();\n\n}" ]
[ "0.6494252", "0.6471826", "0.64518523", "0.60635465", "0.60401434", "0.59630835", "0.59250885", "0.59250885", "0.59250885", "0.5831209", "0.5804344", "0.5793159", "0.57288736", "0.56795675", "0.56453425", "0.5635985", "0.56144357", "0.5605472", "0.5602557", "0.5597779", "0.5578837", "0.5564659", "0.55567855", "0.5549593", "0.5542919", "0.55313164", "0.55138385", "0.55132186", "0.54831123", "0.5480392", "0.54755884", "0.5475269", "0.5472409", "0.54683", "0.5447083", "0.5433418", "0.541937", "0.54118985", "0.54047376", "0.54026645", "0.54024893", "0.54015434", "0.5398159", "0.5394235", "0.539226", "0.5387024", "0.53818554", "0.53796774", "0.5372557", "0.5367639", "0.53533", "0.5343782", "0.53416556", "0.5338239", "0.53327876", "0.53314793", "0.5331262", "0.5326281", "0.5326061", "0.53216094", "0.53206474", "0.5305235", "0.5300426", "0.52987975", "0.52960885", "0.52960086", "0.52872545", "0.52870613", "0.52859193", "0.5283245", "0.5281602", "0.5279786", "0.52784026", "0.5268253", "0.5268079", "0.52666783", "0.52660304", "0.52631056", "0.52593", "0.5257843", "0.5253986", "0.5252964", "0.5248704", "0.5247528", "0.52424526", "0.52256614", "0.522556", "0.52228194", "0.52218753", "0.5216647", "0.5215136", "0.52122384", "0.5206058", "0.5204239", "0.5200811", "0.51991916", "0.51823395", "0.51807374", "0.51784897", "0.5177589" ]
0.70069265
0
Factory for creating an agenda view model.
interface Factory { /** * Create an instance of an agenda view model with the given saved * instance state. * * @param savedInstanceState previously saved state of the view model * @return the created agenda view model */ AgendaViewModel create(Bundle savedInstanceState); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AgendaViewModel create(Bundle savedInstanceState);", "public interface AgendaViewModel {\r\n /**\r\n * Factory for creating an agenda view model.\r\n */\r\n interface Factory {\r\n /**\r\n * Create an instance of an agenda view model with the given saved\r\n * instance state.\r\n *\r\n * @param savedInstanceState previously saved state of the view model\r\n * @return the created agenda view model\r\n */\r\n AgendaViewModel create(Bundle savedInstanceState);\r\n }\r\n\r\n /**\r\n * Retrieve tasks for the user within a date range in ascending order by\r\n * date.\r\n *\r\n * @param startDate starting date of the agenda (inclusive)\r\n * @param endDate ending date of the agenda (exclusive)\r\n * @return observable list of tasks for the user sorted by date\r\n */\r\n LiveData<List<Task>> getSortedTasks(LocalDate startDate,\r\n LocalDate endDate);\r\n\r\n /**\r\n * Add a task for the user.\r\n *\r\n * @param newTask the task to add\r\n * @return true if the operation was successful; false otherwise\r\n */\r\n boolean addTask(Task newTask);\r\n\r\n /**\r\n * Update a task for the user.\r\n *\r\n * @param updatedTask the modified task to save\r\n * @return true if the operation was successful; false otherwise\r\n */\r\n boolean updateTask(Task updatedTask);\r\n\r\n /**\r\n * Delete a task for the user.\r\n *\r\n * @param task the task to delete\r\n * @return true if the operation was successful; false otherwise\r\n */\r\n boolean deleteTask(Task task);\r\n\r\n /**\r\n * Retrieve the active task for the user.\r\n *\r\n * @return current active task for the user\r\n */\r\n @VisibleForTesting(otherwise = VisibleForTesting.NONE)\r\n LiveData<Task> getActiveTask();\r\n\r\n /**\r\n * Update the active task for the user.\r\n *\r\n * @param task the task to be active\r\n * @return true if the operation was successful; false otherwise\r\n */\r\n boolean updateActiveTask(Task task);\r\n\r\n /**\r\n * Perform clean-up for this instance.\r\n */\r\n void onDestroy();\r\n}", "View createView();", "public Appointment()\r\n {\r\n // cView = new CalendarEventView(\"appointmentView\");\r\n }", "public AgendaController(){\n setService(new JavaServiceFacade());\n setActividadRegistrar(new CalendarActivityClinica());\n setModel(new CalendarModelClinica());\n if(this.isPermisoAgendaPersonal()){\n setUsuarioAgenda(LoginController.getUsuarioLogged());\n }\n generarActividades();\n setListaPacientes(service.getPacienteFindAll());\n setListaUsuarios(service.getUsuarioFindAll());\n setMensajeRegistrar(\"\");\n setMensajeEditar(\"\");\n }", "public MCalendarEventView()\r\n {\r\n }", "public Venda() {\n }", "private ViewFactory() {}", "@Override\r\n public AgendaItemDefinition build() {\r\n return new AgendaItemDefinition(this);\r\n }", "CreateEventViewModelFactory() {\n super(Storage.class, Authenticator.class);\n }", "interface ViewCreator {\n /**\n * Creates a view\n * @param path\n * @param sql\n * @param sqlContext\n */\n void createView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Updates a view\n * @param path\n * @param sql\n * @param sqlContext\n * @param attributes\n */\n void updateView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Drops a view\n * @param path\n */\n void dropView(List<String> path);\n }", "DataModel createDataModel();", "public ViewFactory(DataManager dm) {\n this.dm = dm;\n }", "public View createView(ExaminationDataSet dataSet) {\n return new TableView(dataSet);\n }", "public interface ViewCreatorFactory extends Service {\n /**\n * Used to create Views in a space\n */\n interface ViewCreator {\n /**\n * Creates a view\n * @param path\n * @param sql\n * @param sqlContext\n */\n void createView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Updates a view\n * @param path\n * @param sql\n * @param sqlContext\n * @param attributes\n */\n void updateView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Drops a view\n * @param path\n */\n void dropView(List<String> path);\n }\n\n /**\n * get a ViewCreator for a particular user\n * @param userName\n * @return the ViewCreator\n */\n ViewCreator get(String userName);\n}", "public abstract ArchECoreView newView(ArchECoreArchitecture architecture) throws ArchEException;", "public VendaView() {\n initComponents();\n }", "protected abstract StartViewFactory getStartViewFactory();", "public EmployeesViewImpl() {\r\n }", "public static AppointmentFragment newInstance() {\n\t\tAppointmentFragment fragment = new AppointmentFragment();\n\n\t\treturn fragment;\n\t}", "public CalendarEventView getCalendarEventView()\r\n {\n CalendarEventView cView = new CalendarEventView(\"appointmentView\");;\r\n\r\n cView.setEventId(getEventId());\r\n return cView;\r\n }", "private View create(PersistedView pView) {\n DsmSorting sorting = nameToSorting.get(pView.dsmSortingName);\n if (null == sorting) {\n sorting = DsmSorting.values()[0];\n }\n\n View view = new View();\n view.setName(decodeString(pView.name));\n view.setSorting(sorting);\n\n return view;\n }", "public interface OwnEventsView extends BaseView {\n\n void adaptEventsList(List<EventModel> eventModelsList);\n\n void viewEvent(EventModel eventModel);\n\n void showViewRefreshing();\n\n void hideViewRefreshing();\n\n void hideViewEmpty();\n\n void showViewEmpty();\n\n}", "public interface ModelToViewModel {\n public void formWasCreated(DailySchedule dailySchedule);\n public void eventWasCreated(Event event);\n}", "public static TabletView createEntity(EntityManager em) {\n TabletView tabletView = new TabletView();\n return tabletView;\n }", "protected Scene createView() {\n\t\treturn null;\n\t}", "ViewElement createViewElement();", "GoalModel createGoalModel();", "public Agenda() {\n initComponents();\n \n Deshabilitar();\n LlenarTabla();\n \n }", "private View() {}", "public AssemblyViewPointAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = AssemblyViewPointPackage.eINSTANCE;\n\t\t}\n\t}", "public interface View {\n void setupViews();\n void onClickMonth();\n void onClickYear();\n void onSuccess(RevenueModel body);\n void onSuccessWithdrawl(BaseResponse body);\n void onFailure();\n void onFailureWithdrawl();\n }", "BehaviouralModelFactory getBehaviouralModelFactory();", "@SuppressWarnings (\"unchecked\")\r\n\t@Override\r\n\tpublic <T> T create ()\r\n\t{\r\n\t\tFxCharmView fxView = new FxCharmView ();\r\n\t\tfxView.registerSpecialType (IntValueView.class, new FxIntDisplayFactory ());\r\n\t\tfxView.registerSpecialType (BooleanView.class, new FxBooleanDisplayFactory ());\r\n\t\tnew Stylesheet (\"skin/platform/tooltip.css\").applyToParent (fxView.getNode ());\r\n\t\treturn (T) fxView;\r\n\t}", "ViewComponent createViewComponent();", "public View() {\n // (this constructor is here just for the javadoc tag)\n }", "public static IView makeView(String type, int tempo) throws IllegalArgumentException {\n switch (type) {\n case \"text\":\n return new TextView();\n case \"visual\":\n return new VisualView(tempo);\n case \"svg\":\n return new SVGView(tempo);\n case \"edit\":\n return new EditorView(new VisualView(tempo));\n default:\n throw new IllegalArgumentException(\"Not a valid view\");\n }\n }", "public interface DetailView {\n\n void setStartDate(String dateString, String yearString);\n\n void setEndDate(String dateString, String yearString);\n\n void setDescription(String description);\n\n void setProjectStatus(String status, int color);\n\n void setDetailViewTitle(String title);\n}", "EisModel createEisModel();", "@Override\n public void Create() {\n\n initView();\n }", "public interface ILetterViewFactory {\n\t\n\t/**\n\t * Gets the letter view.\n\t *\n\t * @param username the username\n\t * @param inLetterText the in letter text\n\t * @param dateText the date text\n\t * @param alignLeft the align left\n\t * @return the letter view\n\t */\n\tILetterView getLetterView(String username, String inLetterText, String dateText, boolean alignLeft);\n}", "public TableViewFactory() {\n }", "public VistaInicial crearventanaInicial(){\n if(vistaInicial==null){\n vistaInicial = new VistaInicial();\n }\n return vistaInicial;\n }", "Vaisseau createVaisseau();", "protected EdgeView createEdgeView(Object cell) {\r\n \r\n \t\t\t\tif (cell instanceof Edge || cell instanceof JmtEdge) {\r\n \t\t\t\t\t// System.out.println(\"Lato personalizzato\");\r\n \t\t\t\t\treturn new JmtEdgeView(cell, mediator);\r\n \t\t\t\t} else {\r\n \t\t\t\t\treturn new JmtEdgeView(cell, mediator);\r\n \t\t\t\t}\r\n \t\t\t}", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "public JsfVenda() {\r\n litem = new ArrayList();\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_edit_day, container, false);\n ButterKnife.bind(this, view);\n\n if (mBinding == null) {\n mBinding = FragmentEditDayBinding.bind(view);\n }\n\n mViewModel = EditActivity.obtainViewModel(getActivity());\n mBinding.setViewmodel(mViewModel);\n\n setRetainInstance(false);\n\n return mBinding.getRoot();\n }", "public Appointment() {\n this(DSL.name(\"appointment\"), null);\n }", "private void initAgenda() {\n agenda = new Agenda();\n appointmentGroup = new Agenda.AppointmentGroupImpl().withStyleClass(STYLE_CLASS);\n\n // this actionCallBack is called when the user double clicks on an appointment in the display\n // Opens a dialog containing the details of the clicked event\n agenda.actionCallbackProperty().set(param -> {\n logger.info(\"User double clicked on \" + param.toString());\n CalendarEventDialog dialog = new CalendarEventDialog((CalendarEvent) param);\n displayPopUp(dialog.getRoot());\n return null;\n });\n\n agenda.setAllowDragging(false);\n agenda.setAppointmentChangedCallback(param -> null);\n agenda.setEditAppointmentCallback(param -> null);\n agenda.setSkin(new AgendaWeekSkin(agenda));\n agenda.setId(\"agenda\");\n\n calendarDisplayBox.getChildren().add(agenda);\n }", "public View create(Element elem)\n {\n if(isTextEval) {\n return new bluej.debugmgr.texteval.TextEvalSyntaxView(elem);\n }\n else {\n return new MoeSyntaxView(elem, errorMgr);\n }\n }", "public ToDoPane(Agenda agenda){\n super();\n this.agenda = agenda;\n add = true;\n setup = new HashMap<>();\n comboBox = new JComboBox();\n this.numberOfLists = agenda.getConnector().getNumberOfItems(agenda.getUsername(),\"list\");\n this.loadLists();\n }", "public interface ZkToDoModel {\r\n\r\n\tpublic abstract void deleteEvent(Reminder reminder)\r\n\t\t\tthrows EntityNotFoundException;\r\n\r\n\tpublic abstract List<Reminder> findAll();\r\n\r\n\tpublic abstract void mergeEvent(Reminder reminder)\r\n\t\t\tthrows EntityNotFoundException;\r\n\r\n\tpublic abstract void persistEvent(Reminder reminder);\r\n\r\n\t//used by selectedItem=\"@{controller.selectedReminder}\" and others\r\n\tpublic abstract Reminder getSelectedReminder();\r\n\r\n\t//used by selectedItem=\"@{controller.selectedReminder}\" and others\r\n\tpublic abstract void setSelectedReminder(Reminder reminder);\r\n\r\n\t//used by model=\"@{controller.reminders}\"\r\n\tpublic abstract List<Reminder> getReminders();\r\n\r\n}", "public interface ModelViewFactory {\r\n\r\n /**\r\n * Get {@link ModelAndView} of given {@link ModelViewType}.\r\n * \r\n * @param type {@link ModelViewType} - type of the view\r\n * @param voucher {@link Voucher} - voucher is used before (submit form) and\r\n * after submit (status form).\r\n * @return {@link ModelAndView}\r\n */\r\n ModelAndView getModelView(ModelViewType type, Voucher voucher);\r\n}", "public interface AppointmentView {\n void loadAppointmentInformation(MeetingTime appointment);\n void showConfirmationMessage(String message);\n void hideLoading();\n void updateMeetingStatus(String stateMessage);\n}", "private CalendarModel() {\n events = new ArrayList<>();\n }", "public EditAppointment() {\r\n\t\tsuper();\r\n\t}", "public interface CreateProgramView extends MvpView\n{\n\tvoid initViewPager(Boolean needPublicInfo, Boolean needDeposit, CreateProgramModel model);\n\n\tvoid showSettings();\n\n\tvoid showDeposit();\n\n\tvoid showProgress(boolean show);\n\n\tvoid showSnackbarMessage(String message);\n\n\tvoid finishActivity();\n}", "public View create(Element elem) {\n return null;\n }", "MainPresenter(MainContract.View view) {\n this.view = view;\n model = new AmicableModel();\n }", "public Agendas getAgenda() {\n return agenda;\n }", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "public ViewFactory getViewFactory()\n {\n return this;\n }", "public interface IAgenda {\n /*\n Date date = new Date();\n String event = \"\";\n */\n\n abstract String getContent();\n\n }", "ViewCreator get(String userName);", "private Views() {\n }", "public EAEditorView(ReadOnlyEAOperations model) {\n\n super();\n setTitle(\"The Easy Animator\");\n\n // check for null\n if (model == null) {\n throw new IllegalArgumentException(\"Model can't be null\");\n }\n this.model = model;\n\n // initialize the main panel\n constructMainPanel();\n constructAnimationPanel();\n generateLabelPanel();\n generateButtonPanel();\n constructPopup();\n createOKButtons();\n\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.pack();\n }", "@Override\n\tpublic DAOPedido crearDAOPedidoAlmacen() {\n\t\treturn new DAOPedido();\n\t}", "public ParsedmodelFactoryImpl() {\n\t\tsuper();\n\t}", "public Appointment() {\r\n\t\t\t\r\n\t\t}", "protected Object createCraphicalViewInternal() {\n\t\tDesignViewDiagram aviewDiagram = null;\n\t\t\t\n\t\tif (selectedViewType.equalsIgnoreCase(ViewLayout.DECOMPOSITION_VIEW)){\n//\t\t\tSystem.out.println(System.currentTimeMillis());\n\t\t\t\n\t\t\tSparseTree archTree = null;\n//\t\t\tarchTree = ArcheModel.GetInstance().getFullDecompositionArcheModel(\"Architecture1\", rootFactId, bRootMarked); \t\t\t\n\t\t\tarchTree = ArcheModel.GetInstance().getFullDecompositionArcheModel(versionName, rootFactId, bRootMarked); \t\t\t\n\t\t\tif(archTree == null){\n//\t\t\t\tarchTree = ArcheModel.GetInstance().getFullDecompositionArcheModel(versionName, rootFactId, bRootMarked); \t\t\t\t\t\t\t\n//\t\t\t\tif(archTree == null){\n//\t\t\t\t\tSystem.out.println(\"Architecture might not exist in the ArchE database\");\n\t\t\t\t\treturn null;\n//\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\t\tSystem.out.println(System.currentTimeMillis());\n\t\n\t\t\tDecompositionViewLayout\tlayout = new DecompositionViewLayout();\n\t\t\taviewDiagram = layout.generateTreeLayout(archTree);\n\t\t}\n\t\telse if (selectedViewType.equalsIgnoreCase(ViewLayout.DEPENDENCY_VIEW)){\n//\t\t\tSystem.out.println(System.currentTimeMillis());\n\t\t\tSparseGraph archGraph = null;\n//\t\t\tarchGraph = model.getFullDependencyArcheModel(\"Architecture1\", rootFactId, bRootMarked, rootFactType); \t\n\t\t\tarchGraph = model.getFullDependencyArcheModel(versionName, rootFactId, bRootMarked, rootFactType); \t\n\t\t\tif(archGraph == null){\n//\t\t\t\tarchGraph = model.getFullDependencyArcheModel(versionName, rootFactId, bRootMarked, rootFactType); \t\n//\t\t\t\tif(archGraph == null){\n//\t\t\t\t\tSystem.out.println(\"Architecture might not exist in the ArchE database\");\n\t\t\t\t\treturn null;\n//\t\t\t\t}\n\t\t\t}\n//\t\t\tSystem.out.println(System.currentTimeMillis());\n\t\t\t\t\t\t\n\t\t\tDependencyViewLayout\tlayout = new DependencyViewLayout();\n\t\t\tif(selectedLayoutType.equals(DependencyViewLayout.FR_LAYOUT)) {\t\n\t\t\t\taviewDiagram = layout.generateFRLayout(archGraph);\n\t\t\t}\n\t\t\telse if (selectedLayoutType.equals(DependencyViewLayout.KK_LAYOUT)) {\n\t\t\t\taviewDiagram = layout.generateKKLayout(archGraph);\n\t\t\t}\n\t\t\telse if (selectedLayoutType.equals(DependencyViewLayout.CIRCLE_LAYOUT)) {\n\t\t\t\taviewDiagram = layout.generateCircleLayout(archGraph);\t\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t\telse if (selectedViewType.equalsIgnoreCase(ViewLayout.CONCURRENCY_VIEW)){\n\t\t\t// TODO: [Extension Point] for concurrency view \n\t\t}\n\t\t// TODO: [Extension Point] for additional views \n\t\t\n\t\tif(aviewDiagram != null){\n\t\t\taviewDiagram.setVersionName(versionName);\n\t\t\taviewDiagram.setVersionID(versionID);\n\t\t\taviewDiagram.setRootNodeFactId(rootFactId);\n\t\t\taviewDiagram.setRootNodeFactType(rootFactType);\n\t\t\taviewDiagram.setSelectedViewType(selectedViewType);\n\t\t\taviewDiagram.setSelectedLayoutType(selectedLayoutType);\t\t\t\n\t\t}\n\t\t\n\t\treturn aviewDiagram;\n\t}", "public BlogPostView() {\n this.blogPost = new BlogPost();\n }", "ArtefactModel getArtefactModel();", "public interface GamesCalendarPresenter {\n\n void setView(GamesCalendarView view);\n}", "ConfigModel createInstanceOfConfigModel();", "public ViewClass() {\n\t\tcreateGUI();\n\t\taddComponentsToFrame();\n\t\taddActionListeners();\n\t}", "InstanceModel createInstanceOfInstanceModel();", "public ProfitDistribTpViewImpl() {\n }", "public DayPlanFragment() {\n\t}", "TimelineEntity(){}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_data_coa, container, false);\n\n ButterKnife.bind(this, root);\n\n setAppPreference(new PreferenceUtils(getActivity(), Constanta.APPLICATION_PREFERENCE));\n\n fabAddCoa.setOnClickListener(view -> {\n startActivity(new Intent(getActivity(), AddCoaActivity.class));\n });\n\n super.viewModel = new CoaModel();\n coaPresenter = new CoaPresenter();\n coaPresenter.init(super.viewModel, this, new ApiProvider());\n\n return root;\n }", "ViewContainer createViewContainer();", "public void createEvent(View view){\n showDatePickerDialog();\n }", "public Model() {\n this(DSL.name(\"model\"), null);\n }", "public AcapeAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = AcapePackage.eINSTANCE;\n\t\t}\n\t}", "public AutomatizacionrevisionFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "ArchitecturalModelFactory getArchitecturalModelFactory();", "public ViewMetamodel getMetamodel();", "public CalendarFrame()\n\t{\n\t\tmodel = new Model();\n\t\tcontroller = new ControllerPanel(model);\n\t\tview = new MonthlyView(model);\n\t\tmodel.attach(view);\n\n\t\tthis.setSize(1500, 700);\n\t\tadd(controller, BorderLayout.NORTH);\n\t\tadd(view, BorderLayout.CENTER);\n\t\tsetBackground(Color.WHITE);\n\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t// pack();\n\t\tsetVisible(true);\n\t}", "public interface BaseNewView<T> {\n\n /**\n * 设置presenter对象\n *\n * @param presenter\n */\n void setPresenter(T presenter);\n\n /**\n * 初始化views\n *\n * @param view\n */\n void initViews(View view);\n}", "public AlunoView() {\n initComponents();\n bus = new AlunoBus();\n }" ]
[ "0.7486945", "0.6715961", "0.63583606", "0.6090953", "0.5984556", "0.58966297", "0.5869535", "0.586546", "0.5802957", "0.57335407", "0.57123524", "0.5673301", "0.5648365", "0.56136644", "0.56045437", "0.56008226", "0.5588065", "0.5577016", "0.5560976", "0.55480254", "0.54825634", "0.5474688", "0.5466094", "0.5463305", "0.5458533", "0.54505646", "0.54308975", "0.5415716", "0.5382519", "0.5378047", "0.53757054", "0.53426456", "0.5335317", "0.53209066", "0.5316538", "0.53072125", "0.5306253", "0.529446", "0.52944297", "0.52906966", "0.5290442", "0.52898973", "0.52882904", "0.52703613", "0.5260297", "0.52585644", "0.52585644", "0.52585644", "0.52585644", "0.52585644", "0.52585644", "0.52585644", "0.5256645", "0.5250892", "0.5245031", "0.5234564", "0.52170974", "0.5214125", "0.52130634", "0.5208101", "0.5205195", "0.5191673", "0.51860374", "0.5185995", "0.5177535", "0.51617754", "0.5158663", "0.5154674", "0.5154674", "0.5154674", "0.5154674", "0.5154009", "0.51439404", "0.5140657", "0.5131168", "0.51285267", "0.5118877", "0.511524", "0.51147366", "0.51144147", "0.5104047", "0.5098235", "0.508988", "0.5081609", "0.507303", "0.50628394", "0.5061319", "0.5051663", "0.50435895", "0.5039676", "0.5030323", "0.5029807", "0.5027949", "0.5023584", "0.50217724", "0.50213623", "0.50123906", "0.5011718", "0.50117177", "0.50038767" ]
0.754259
0
Create an instance of an agenda view model with the given saved instance state.
AgendaViewModel create(Bundle savedInstanceState);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface Factory {\r\n /**\r\n * Create an instance of an agenda view model with the given saved\r\n * instance state.\r\n *\r\n * @param savedInstanceState previously saved state of the view model\r\n * @return the created agenda view model\r\n */\r\n AgendaViewModel create(Bundle savedInstanceState);\r\n }", "InstanceModel createInstanceOfInstanceModel();", "public interface AgendaViewModel {\r\n /**\r\n * Factory for creating an agenda view model.\r\n */\r\n interface Factory {\r\n /**\r\n * Create an instance of an agenda view model with the given saved\r\n * instance state.\r\n *\r\n * @param savedInstanceState previously saved state of the view model\r\n * @return the created agenda view model\r\n */\r\n AgendaViewModel create(Bundle savedInstanceState);\r\n }\r\n\r\n /**\r\n * Retrieve tasks for the user within a date range in ascending order by\r\n * date.\r\n *\r\n * @param startDate starting date of the agenda (inclusive)\r\n * @param endDate ending date of the agenda (exclusive)\r\n * @return observable list of tasks for the user sorted by date\r\n */\r\n LiveData<List<Task>> getSortedTasks(LocalDate startDate,\r\n LocalDate endDate);\r\n\r\n /**\r\n * Add a task for the user.\r\n *\r\n * @param newTask the task to add\r\n * @return true if the operation was successful; false otherwise\r\n */\r\n boolean addTask(Task newTask);\r\n\r\n /**\r\n * Update a task for the user.\r\n *\r\n * @param updatedTask the modified task to save\r\n * @return true if the operation was successful; false otherwise\r\n */\r\n boolean updateTask(Task updatedTask);\r\n\r\n /**\r\n * Delete a task for the user.\r\n *\r\n * @param task the task to delete\r\n * @return true if the operation was successful; false otherwise\r\n */\r\n boolean deleteTask(Task task);\r\n\r\n /**\r\n * Retrieve the active task for the user.\r\n *\r\n * @return current active task for the user\r\n */\r\n @VisibleForTesting(otherwise = VisibleForTesting.NONE)\r\n LiveData<Task> getActiveTask();\r\n\r\n /**\r\n * Update the active task for the user.\r\n *\r\n * @param task the task to be active\r\n * @return true if the operation was successful; false otherwise\r\n */\r\n boolean updateActiveTask(Task task);\r\n\r\n /**\r\n * Perform clean-up for this instance.\r\n */\r\n void onDestroy();\r\n}", "public ViewObject(ActivityInstance instance)\n {\n // Populate fields\n this.templateId = instance.getTemplate().getId();\n this.name = instance.getName();\n this.description = instance.getDescription();\n this.paramValues = instance.getParameterValues();\n }", "public void createNoteEditModel() {\n \t\tif (this.mNoteItemModel == null)\n \t\t\tthis.mNoteItemModel = new NoteItemModel(this.getContext());\n \t\tthis.status = STATUS_CREATE;\n \t}", "GoalModel createGoalModel();", "public Appointment()\r\n {\r\n // cView = new CalendarEventView(\"appointmentView\");\r\n }", "protected SceneGraphObjectState createState( SceneGraphObject obj, Controller control ) {\n\n return control.createState( obj );\n }", "@Override\n public void onCreate(@Nullable Bundle theSavedInstanceState) {\n super.onCreate(theSavedInstanceState);\n mResetModel = new ViewModelProvider(getActivity())\n .get(ResetViewModel.class);\n }", "private View create(PersistedView pView) {\n DsmSorting sorting = nameToSorting.get(pView.dsmSortingName);\n if (null == sorting) {\n sorting = DsmSorting.values()[0];\n }\n\n View view = new View();\n view.setName(decodeString(pView.name));\n view.setSorting(sorting);\n\n return view;\n }", "SAProcessInstanceBuilder createNewInstance(SProcessInstance processInstance);", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "@Override\n public void Create() {\n initView();\n initData();\n }", "public TaskInstanceView(TaskInstanceView source) {\n if (source.TaskInstanceIndex != null) {\n this.TaskInstanceIndex = new Long(source.TaskInstanceIndex);\n }\n if (source.TaskInstanceState != null) {\n this.TaskInstanceState = new String(source.TaskInstanceState);\n }\n if (source.ExitCode != null) {\n this.ExitCode = new Long(source.ExitCode);\n }\n if (source.StateReason != null) {\n this.StateReason = new String(source.StateReason);\n }\n if (source.ComputeNodeInstanceId != null) {\n this.ComputeNodeInstanceId = new String(source.ComputeNodeInstanceId);\n }\n if (source.CreateTime != null) {\n this.CreateTime = new String(source.CreateTime);\n }\n if (source.LaunchTime != null) {\n this.LaunchTime = new String(source.LaunchTime);\n }\n if (source.RunningTime != null) {\n this.RunningTime = new String(source.RunningTime);\n }\n if (source.EndTime != null) {\n this.EndTime = new String(source.EndTime);\n }\n if (source.RedirectInfo != null) {\n this.RedirectInfo = new RedirectInfo(source.RedirectInfo);\n }\n if (source.StateDetailedReason != null) {\n this.StateDetailedReason = new String(source.StateDetailedReason);\n }\n }", "@Override\r\n public AgendaItemDefinition build() {\r\n return new AgendaItemDefinition(this);\r\n }", "@Override\n public void Create() {\n\n initView();\n }", "void create( State state );", "@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}", "private void configureEstateCreateViewModel(){\n ViewModelFactory modelFactory = Injection.provideViewModelFactory(this);\n mSearchEstateViewModel = ViewModelProviders.of(this, modelFactory).get(SearchEstateViewModel.class);\n\n mSearchEstateViewModel.getViewActionLiveData().observe(this, new Observer<SearchEstateViewModel.ViewAction>() {\n @Override\n public void onChanged(SearchEstateViewModel.ViewAction viewAction) {\n if (viewAction == null) {\n return;\n }\n\n switch (viewAction) {\n case INVALID_INPUT:\n showSnackBar(\"Invalid data search\");\n break;\n\n case FINISH_ACTIVITY:\n Intent intent = new Intent();\n intent.putExtra(BUNDLE_SEARCH_OK,true);\n intent.putExtra(BUNDLE_SEARCH_DATA, mSearchEstateViewModel.getSearchData());\n setResult(RESULT_OK,intent);\n // Close Activity and go back to previous activity with a SearchData Object\n finish();\n break;\n }\n }\n });\n\n // Observe a change of Date of Entry1 on the Market\n mSearchEstateViewModel.getDateEntryOfTheMarket1().observe(this,this::refreshDateEntryOfTheMarket1);\n // Observe a change of Date of Entry2 on the Market\n mSearchEstateViewModel.getDateEntryOfTheMarket2().observe(this,this::refreshDateEntryOfTheMarket2);\n // Observe a change of Date of Sale1 on the Market\n mSearchEstateViewModel.getDateSale1().observe(this,this::refreshDateSale1);\n // Observe a change of Date of Sale2 on the Market\n mSearchEstateViewModel.getDateSale2().observe(this,this::refreshDateSale2);\n }", "@NonNull\n @Override\n public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {\n RedditState initialState = RedditState.createInitialState();\n\n RedditSideEffectRunner runner =\n new RedditSideEffectRunner(fragment.getResources());\n\n // optionally, startup side effects could be run here\n\n Dispatcher<RedditState, RedditSideEffect> dispatcher =\n new Dispatcher<>(runner, initialState);\n\n return (T) new RedditViewModel(dispatcher);\n }", "public AbstractStateModel() {\n }", "@Override\n public EditHistory createFromParcel(Parcel in) {\n return new EditHistory(in);\n }", "public static AppointmentFragment newInstance() {\n\t\tAppointmentFragment fragment = new AppointmentFragment();\n\n\t\treturn fragment;\n\t}", "DataModel createDataModel();", "public GameState(State.StateView state) {\n }", "public abstract ArchECoreView newView(ArchECoreArchitecture architecture) throws ArchEException;", "ControllerState getNewObjectState();", "View createView();", "MainPresenter(MainContract.View view) {\n this.view = view;\n model = new AmicableModel();\n }", "EisModel createEisModel();", "public abstract IState createState(ISemanticObject<?> observable, IContext context) throws ThinklabException;", "public SavedState createFromParcel(Parcel parcel) {\r\n return new SavedState(parcel, null);\r\n }", "public interface ModelToViewModel {\n public void formWasCreated(DailySchedule dailySchedule);\n public void eventWasCreated(Event event);\n}", "public EditAppointment() {\r\n\t\tsuper();\r\n\t}", "void newGame() {\n\t\tstate = new model.State () ; \n\t\tif(host != null ) host.show(state) ; \n\t}", "private boolean createInstance( View view, final EntityInstanceImpl ei )\n {\n final EntityDef entityDef = ei.getEntityDef();\n\n // Try to set the FKs for this instance. It will fail (return false) if one the source EI\n // for one of the FKs hasn't been created yet. This means it doesn't have a key.\n if ( ! setForeignKeys( ei ) )\n return false;\n\n // If we get here than all the FK's were copied successfully and we can create this instance.\n // We'll retrieve the generated key from the DB after the row has been inserted.\n try\n {\n if ( entityDef.getDbCreatedTimestamp() != null )\n {\n AttributeInstanceImpl timestamp = ei.getAttribute( entityDef.getDbCreatedTimestamp() );\n if ( timestamp.isNull() )\n {\n ZonedDateTime now = ZonedDateTime.now();\n timestamp.setValue( now );\n\n if ( entityDef.getDbUpdatedTimestamp() != null )\n ei.getAttribute( entityDef.getDbUpdatedTimestamp() ).setValue( now );\n }\n }\n\n // We need to handle multiple entities being created.\n List<EntityInstance> list = new ArrayList<EntityInstance>();\n list.add( ei );\n dbHandler.insertEntity( view, list );\n\n AttributeDef genkey = entityDef.getGenKey();\n if ( genkey != null )\n {\n List<Object> keys = dbHandler.getKeysGeneratedByDb();\n if ( keys.size() != 1 )\n throw new ZeidonException(\"Unexpected number of keys found: %s\", keys );\n\n AttributeDef keyAttrib = entityDef.getKeys().get( 0 );\n ei.getAttribute( keyAttrib ).setInternalValue( keys.get( 0 ), false );\n }\n\n // Indicate that--for now--we won't need to update later because of a FK.\n ei.dbhForeignKey = false;\n\n // Set the dbhCreated flag for ei and all its linked instances. This\n // will prevent us from trying to insert it again.\n for ( EntityInstanceImpl linked : ei.getAllLinkedInstances() )\n {\n linked.dbhCreated = true;\n\n // If the linked instance is flagged as created then we need\n // to set its included flag on so that the *relationship*\n // is still created.\n if ( linked.isCreated() )\n linked.dbhNeedsInclude = true;\n }\n }\n catch ( Exception e )\n {\n throw ZeidonException.wrapException( e ).prependEntityInstance( ei );\n }\n\n return true;\n }", "PastReservation createPastReservation();", "AchievementModel createAchievementModel(AchievementModel achievementModel);", "public static TabletView createUpdatedEntity(EntityManager em) {\n TabletView tabletView = new TabletView();\n return tabletView;\n }", "@Override\r\n public IObjectiveState createState(final Serializable staticState) {\r\n return new InternalState(this.m_func.createState(staticState));\r\n }", "public HomeState(TV tv) {\n this.tv = tv;\n }", "public Estado create(int id_estado) {\n\t\tEstado estado = new EstadoImpl();\n\n\t\testado.setNew(true);\n\t\testado.setPrimaryKey(id_estado);\n\n\t\treturn estado;\n\t}", "public static Inventarisation createEntity(EntityManager em) {\n Inventarisation inventarisation = new Inventarisation()\n .date(DEFAULT_DATE);\n return inventarisation;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_add_assignment); //inflates layout\n initViews(); //initializes views\n\n //gets instance for database\n mDatabase = EventDatabase.getInstance(this);\n\n //sets date and time formatters\n mDateFormatter = DateFormat.getDateInstance(DateFormat.LONG);\n mTimeFormatter = new SimpleDateFormat(\"h:mm a\");\n\n //gets time from INSTANCE_TIME if the activity is being recreated after being suddenly closed\n if(savedInstanceState != null && savedInstanceState.containsKey(INSTANCE_TIME)){\n long selectedTime = savedInstanceState.getLong(INSTANCE_TIME);\n Calendar temp = Calendar.getInstance();\n temp.setTimeInMillis(selectedTime);\n mDueDateCalendar = temp;\n } else mDueDateCalendar = Calendar.getInstance(); //if not, the default due date is the current time\n\n setDateTimeViews(); //sets mDueDate and mDueTime depending on the mDueDateCalendar\n\n //gets mEventId from bundle\n if (savedInstanceState != null && savedInstanceState.containsKey(INSTANCE_EVENT_ID)) {\n mEventId = savedInstanceState.getInt(INSTANCE_EVENT_ID, DEFAULT_EVENT_ID);\n }\n\n //gets the intent used to start the Activity\n Intent intent = getIntent();\n //checks if an event id was given to the class\n if(intent != null && intent.hasExtra(EXTRA_EVENT_ID)){\n if(mEventId == DEFAULT_EVENT_ID){\n mEventId = intent.getIntExtra(EXTRA_EVENT_ID, DEFAULT_EVENT_ID);\n //uses viewmodel factory to create a new event view model with database and id\n EventViewModelFactory factory = new EventViewModelFactory(mDatabase, mEventId);\n final EventViewModel eventViewModel =\n ViewModelProviders.of(this, factory).get(EventViewModel.class);\n //attaches listener to event\n eventViewModel.getEvent().observe(this, new Observer<Event>() {\n @Override\n public void onChanged(Event event) {\n mEvent = event;\n eventViewModel.getEvent().removeObserver(this);\n populateUI(event);\n }\n });\n }\n }\n //sets up view models\n setUpViewModels();\n //sets on click listeners to mDueDate and mDueTime TextViews\n setOnClickListeners();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_edit_day, container, false);\n ButterKnife.bind(this, view);\n\n if (mBinding == null) {\n mBinding = FragmentEditDayBinding.bind(view);\n }\n\n mViewModel = EditActivity.obtainViewModel(getActivity());\n mBinding.setViewmodel(mViewModel);\n\n setRetainInstance(false);\n\n return mBinding.getRoot();\n }", "@Override\n\tpublic void onSaveInstanceState(Bundle savedInstanceState) {\n\t savedInstanceState.putBoolean(HAS_RUN, true);\t \n\t //savedInstanceState.putParcelable(MODEL_DATA, dS);\n\t Log.i(\"MAIN\",\"Saved instances\");\n\t // Always call the superclass so it can save the view hierarchy state\n\t super.onSaveInstanceState(savedInstanceState);\n\t}", "CreateEventViewModelFactory() {\n super(Storage.class, Authenticator.class);\n }", "public static SavedHotelFragment newInstance() {\n SavedHotelFragment fragment = new SavedHotelFragment();\n return fragment;\n }", "public AppointmentTM() {\n }", "public static EditingStatus getInstance(boolean newInstance) {\n if(newInstance) instance = new EditingStatus();\n return instance;\n }", "public static ScheduleFragment newInstance() {\n ScheduleFragment fragment = new ScheduleFragment();\n Bundle args = new Bundle();\n //args.putString(ARG_PARAM1, param1);\n //args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public ViewModel(TableHomeFrame tableHomeFrame){\n dbActions = new Model();\n this.tableHomeFrame = tableHomeFrame;\n calculations = new Calculations();\n }", "HdbdtiModel createHdbdtiModel();", "public static AddNewScheduleDialog createInstance(int quantity){\n AddNewScheduleDialog frag = new AddNewScheduleDialog();\n frag.quantity = quantity;\n return frag;\n }", "public SavedState(SavedStateMap savedStateMap, Object model) {\n this.savedStateMap = savedStateMap;\n this.displayName = savedStateMap.displayName;\n this.model = model;\n modelName = model.getClass().getName();\n\n createBean();\n BeanInfo bi = new SimpleBeanInfo();\n PropertyDescriptor[] pd;\n try {\n bi = Introspector.getBeanInfo(stateBean.getClass());\n pd = bi.getPropertyDescriptors();\n } catch (IntrospectionException ex) {\n Logger.getLogger(SavedState.class.getName()).log(Level.SEVERE, null, ex);\n ex.printStackTrace();\n }\n if (stateBean != null) {\n this.makeSynchronizers();\n }\n\n }", "TimelineEntity(){}", "public static Vacation createEntity(EntityManager em) {\n Vacation vacation = new Vacation()\n .name(DEFAULT_NAME)\n .price(DEFAULT_PRICE)\n .description(DEFAULT_DESCRIPTION)\n .destination(DEFAULT_DESTINATION)\n .destinationAirport(DEFAULT_DESTINATION_AIRPORT)\n .departureDate(DEFAULT_DEPARTURE_DATE)\n .returnDate(DEFAULT_RETURN_DATE)\n .signature(DEFAULT_SIGNATURE)\n .signatureContentType(DEFAULT_SIGNATURE_CONTENT_TYPE)\n .travelProtection(DEFAULT_TRAVEL_PROTECTION)\n .status(DEFAULT_STATUS)\n .type(DEFAULT_TYPE);\n return vacation;\n }", "public BlogPostView() {\n this.blogPost = new BlogPost();\n }", "public Venda() {\n }", "Instance createInstance();", "private void setUpViewModels(){\n EventViewModelFactory factory = new EventViewModelFactory(mDatabase, mEventId);\n EventViewModel eventViewModel =\n ViewModelProviders.of(this, factory).get(EventViewModel.class);\n //Uses view model to get category list\n //listener is called any time the categories are changed or updated\n eventViewModel.getCategoryList().observe(this, new Observer<List<Category>>() {\n @Override\n public void onChanged(List<Category> categories) {\n mCategories = new ArrayList<>(categories);\n setUpSpinner(); //sets up spinner if categories change\n }\n });\n\n //creates a new Factory with database and current time\n AddScheduledEventViewModelFactory eventFactory =\n new AddScheduledEventViewModelFactory(mDatabase, Calendar.getInstance().getTimeInMillis());\n AddScheduledEventViewModel addScheduledEventViewModel =\n ViewModelProviders.of(this, eventFactory).get(AddScheduledEventViewModel.class);\n //attaches listener to events list\n addScheduledEventViewModel.getEvents().observe(this, new Observer<List<Event>>() {\n @Override\n public void onChanged(List<Event> events) {\n //updates the events that are given to mScheduler\n if(mScheduler == null){\n mScheduler = new Scheduler(events, Calendar.getInstance(), null);\n } else mScheduler.setEvents(events);\n }\n });\n }", "protected void onCreate(Bundle onSaveInstanceState) {\n super.onCreate(onSaveInstanceState);\n Bundle extras = getIntent().getExtras();\n dificultad = extras.getInt(\"DIFICULTAD\");\n\n partida = new Partida(getApplicationContext(), dificultad);\n\n setContentView(partida);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n viewModel = ViewModelProviders.of(this).get(TimeTableViewModel.class);\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n days = prefs.getInt(\"timetableSize\", getResources().getInteger(R.integer.timetableDaysDefault));\n viewModel.setNumDays(days);\n\n setContentView(R.layout.activity_timetable);\n popup = new TimetablePopupView(this);\n setupUIViews();\n setupListView();\n\n FloatingActionButton fab = findViewById(R.id.fabNewAppointmentButton);\n fab.setOnClickListener(v -> {\n Intent intent = new Intent(this, NewAppointmentActivity.class);\n startActivity(intent);\n });\n\n setSupportActionBar(findViewById(R.id.toolbarTimetable));\n drawerLayout = findViewById(R.id.drawerLayout_timetable);\n NavigationView navView = findViewById(R.id.nav_view);\n navView.setNavigationItemSelectedListener(new NavigationListener(TimeTableActivity.this, drawerLayout));\n ImageButton navButton = findViewById(R.id.navButton_timetable);\n navButton.setOnClickListener(new NavigationButtonListener(drawerLayout));\n }", "public ViewEntry() {\n initComponents();\n pnlRates.add(new ViewRateSchedule()); \n pnlRates.validate();\n }", "public void createModel() {\r\n\t\t\r\n\t\tEObject input;\r\n\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput());\r\n\t\tIEditorInput editorInput = getEditorInput();\r\n\r\n\t\tView v = getAllView(editorInput);\r\n\t\t\r\n\t\tif (editorInput instanceof ValueEditorInputAppFeature) {\r\n\t\t\tValueEditorInputAppFeature featureInput = (ValueEditorInputAppFeature) editorInput;\r\n\t\t\tinput = featureInput.getFeature();\r\n\t\t} else if (editorInput instanceof ValueEditorInputAppGroup){\r\n\t\t\tValueEditorInputAppGroup groupInput = (ValueEditorInputAppGroup) editorInput;\r\n\t\t\tinput = groupInput.getGroup();\r\n\t\t} else {\r\n\t\t\tEAppNamedItem namedInput = (EAppNamedItem) getInputObjectFromWorkspace(((URIEditorInput) editorInput)\r\n\t\t\t\t\t.getURI());\r\n\t\t\tsetPartName(namedInput.getName());\r\n\t\t\tinput = namedInput;\r\n\t\t}\r\n\r\n\t\tAppModel2EditorModelConverter instance = AppModel2EditorModelConverter.getInstance();\r\n\t\teditorModel = instance.createEditorModel(input, v);\r\n\t\t\r\n\t\tResource resource = new XMIResourceImpl(resourceURI);\r\n\t\tresource.getContents().add(editorModel);\r\n\t\teditingDomain.getResourceSet().getResources().add(resource);\r\n\t\t\r\n\t\tSettingEvaluator.initRelevantForWholeModel(v, true);\r\n\t\t\r\n\t\t//S60CTBuilder.setEditor(this);\r\n\t}", "public SavedState(SavedStateMap savedStateMap) {\n this.savedStateMap = savedStateMap;\n this.modelName = savedStateMap.associatedModel;\n this.displayName = savedStateMap.displayName;\n model = findModel(this.modelName);\n createBean();\n if (stateBean != null) {\n this.makeSynchronizers();\n }\n }", "public FundsVolunteerCreate(AppState appState) {\n initComponents();\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n btCancelar.setVisible(false);\n btSave.setVisible(false);\n btnRemove.setVisible(false);\n btnSaveEdit.setVisible(false);\n enableFields(false);\n this.appState = appState;\n }", "public static LabNotes newInstance() {\n LabNotes fragment = new LabNotes();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public Appointment() {\r\n\t\t\t\r\n\t\t}", "public static ForecastFragment newInstance() {\n\n //Create new fragment\n ForecastFragment frag = new ForecastFragment();\n return(frag);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n mEntry = (TimeTableEntry) getIntent().getSerializableExtra(\"entry\");\n\n mIsEdit = getIntent().getBooleanExtra(\"isEdit\", false);\n\n setContentView(R.layout.activity_time_table_entry_creation);\n\n addItemsOnSpinner();\n handleInputs();\n\n //Set the focus to the parent-LinearLayout to not focus the EditText at startup.\n LinearLayout focusableParent = (LinearLayout) findViewById(R.id.entry_creation_form);\n focusableParent.requestFocus();\n\n //Add back button to the ActionBar\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n updateTextViews();\n\n if (mIsEdit) {\n setTitle(String.format(getString(R.string.entry_edit_title),\n DateUtils.formatDateTime(this, mEntry.getStart(),\n DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_WEEKDAY | DateUtils.FORMAT_ABBREV_WEEKDAY)));\n }\n }", "public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }", "public static VniHistory createEntity(EntityManager em) {\n VniHistory vniHistory = new VniHistory()\n .date(DEFAULT_DATE)\n .value(DEFAULT_VALUE);\n return vniHistory;\n }", "ConfigModel createInstanceOfConfigModel();", "public static TabletView createEntity(EntityManager em) {\n TabletView tabletView = new TabletView();\n return tabletView;\n }", "public VehicleViewRecord() {\n super(VehicleView.VEHICLE_VIEW);\n }", "CurrentReservation createCurrentReservation();", "public TaskBoardModel() {\n\n }", "public MCalendarEventView()\r\n {\r\n }", "@Override\r\n public void onCreate(Bundle savedState) {\r\n super.onCreate(savedState);\r\n \r\n if (savedState != null) {\r\n dataController.setViewableDataTableRows(\r\n GraphActivityFunctions.restoreViewableDataTableRows(savedState));\r\n }\r\n \r\n SharedPreferences sp = getPreferences(MODE_PRIVATE);\r\n dataController.setViewableDataTableRows(\r\n GraphActivityFunctions.restoreViewableDataTableRows(sp));\r\n \r\n setContentView(R.layout.graph);\r\n\r\n Integer currentYearMaximum = Utility.getNumOfCompoundingPeriods();\r\n setupValueSpinner();\r\n setupTimeSlider(currentYearMaximum);\r\n setupValueSlider(currentYearMaximum);\r\n setupGraphs(currentYearMaximum);\r\n setupCurrentValueFields();\r\n valueToDataTableItemCorrespondence = GraphActivityFunctions.createDataTableItems(GraphActivity.this);\r\n setDataChangedToggle(true);\r\n }", "public AnnualLease(AnnualLeaseModel model)\t\t{ super(model);\t\t}", "public EAEditorView(ReadOnlyEAOperations model) {\n\n super();\n setTitle(\"The Easy Animator\");\n\n // check for null\n if (model == null) {\n throw new IllegalArgumentException(\"Model can't be null\");\n }\n this.model = model;\n\n // initialize the main panel\n constructMainPanel();\n constructAnimationPanel();\n generateLabelPanel();\n generateButtonPanel();\n constructPopup();\n createOKButtons();\n\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.pack();\n }", "private void createNewDynamicModel(){\n\t\tDynamicModel dModel = new DynamicModel(currentView.getViewModel().getName());\r\n\r\n\t\t// Add the new graph to the view\r\n\t\tint modelWidth = DynamicModelView.minimumWidth; \r\n\t\tint modelHeight = DynamicModelView.minimumHeight; \r\n\t\tint viewHeight = currentView.getHeight();\r\n\t\tint pad = 8;\r\n\t\tcurrentView.addModelView(new DynamicModelView(new EntityViewConfig(pad, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t viewHeight - (modelHeight + pad), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t modelWidth, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t modelHeight, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t EntityViewConfig.Type.DYNAMIC_MODEL), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdModel, this, currentView));\r\n\t\tcurrentView.repaint();\r\n\t}", "public State(){}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\ttaskId=getArguments().getInt(\"taskId\");\r\n\t\ttask=DBAccessImpl.getInstance(getActivity()).describeTask(taskId);\r\n\t\tself=this;\r\n\t\ttaskMgr=new TaskMgr(getActivity());\r\n\t\tthis.setStyle(DialogFragment.STYLE_NO_TITLE, 0);\r\n\t}", "@Override\n protected void commitCreates(ViewImpl view, ObjectInstance oi)\n {\n }", "public Controller(ViewIF view) {\n\t\tthis.view = view;\n\t\tthis.dao = new DAO();\n\t\tthis.stats = new Statistics(this.dao);\n\t\tthis.gameStarted = false;\n\t}", "@Override\n\tpublic TvShow create(long tvShowId) {\n\t\tTvShow tvShow = new TvShowImpl();\n\n\t\ttvShow.setNew(true);\n\t\ttvShow.setPrimaryKey(tvShowId);\n\n\t\tString uuid = PortalUUIDUtil.generate();\n\n\t\ttvShow.setUuid(uuid);\n\n\t\treturn tvShow;\n\t}", "public AgendaController(){\n setService(new JavaServiceFacade());\n setActividadRegistrar(new CalendarActivityClinica());\n setModel(new CalendarModelClinica());\n if(this.isPermisoAgendaPersonal()){\n setUsuarioAgenda(LoginController.getUsuarioLogged());\n }\n generarActividades();\n setListaPacientes(service.getPacienteFindAll());\n setListaUsuarios(service.getUsuarioFindAll());\n setMensajeRegistrar(\"\");\n setMensajeEditar(\"\");\n }", "StatePacBuilder lifecycleState(LifecycleState lifecycleState);", "public CreateEventViewModel(@NonNull Storage storage, @NonNull Authenticator authenticator, @NonNull Database database) {\n verifyNotNull(database);\n\n mStorage = verifyNotNull(storage);\n mUserInfo = authenticator.getCurrentUser();\n mEventCollection = database.query(\"events\");\n }", "public static DataModelBuilder create() {\n return new DataModelBuilder();\n }", "Snapshot create();", "public UseCaseItem() {\n delegate = new MyModel.Builder().build();\n }" ]
[ "0.68016565", "0.58077425", "0.5762859", "0.5523021", "0.5397831", "0.5374135", "0.5367585", "0.52794105", "0.52663535", "0.52283704", "0.5189382", "0.5172813", "0.5172813", "0.5172813", "0.5172813", "0.5172813", "0.5172813", "0.5172813", "0.51399165", "0.5138376", "0.5114372", "0.51116806", "0.5106647", "0.5095981", "0.5094381", "0.50885254", "0.5085053", "0.5072329", "0.5066033", "0.50602597", "0.5051372", "0.50471646", "0.5047015", "0.50428367", "0.5037741", "0.5015563", "0.50122464", "0.50066257", "0.5000381", "0.49844405", "0.4967739", "0.4959057", "0.49275222", "0.49256784", "0.49176413", "0.48852998", "0.48827454", "0.4862005", "0.48558956", "0.48495346", "0.48435673", "0.48430675", "0.48371708", "0.4830412", "0.48287112", "0.48274833", "0.48238248", "0.48172432", "0.48126605", "0.4810059", "0.4807068", "0.48057035", "0.48014817", "0.4800288", "0.47952005", "0.47910628", "0.4788163", "0.4787845", "0.4782674", "0.47716686", "0.475912", "0.47570148", "0.47561973", "0.47439888", "0.47421062", "0.47406083", "0.47373283", "0.4733353", "0.47324407", "0.47320417", "0.47297487", "0.47111636", "0.47042078", "0.47007367", "0.4698052", "0.46962714", "0.46957943", "0.4688946", "0.46878794", "0.46861598", "0.4685335", "0.4677994", "0.46774408", "0.46760157", "0.46697456", "0.4667378", "0.4667202", "0.46670598", "0.46655482", "0.46573344" ]
0.75597847
0
Retrieve tasks for the user within a date range in ascending order by date.
LiveData<List<Task>> getSortedTasks(LocalDate startDate, LocalDate endDate);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Task> getAllTasksForUser(long userId);", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "@GetMapping(\"/get\")\n public List<Task> getTasksBetweenDateAndTime(@RequestParam(\"dstart\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateStart,\n @RequestParam(\"dend\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateEnd,\n @RequestParam(value = \"number\", required = false, defaultValue = \"0\") int number) {\n return taskService.filterTasks(dateStart, dateEnd, number);\n }", "@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}", "public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate);", "public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);", "public List<TaskMaster> retrieveAllTasksForSpecificDays(Date currdate, Date xDaysAgo, List<Long> projectIds, Long userIds);", "public java.util.List<Todo> findByUserId(long userId, int start, int end);", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "public static List<Task> findByUser(String userID){\n return null;\n }", "public List<TaskMaster> retrieveTaskWithFilters(Date startDate, Date endDate, Long assignedTo, Long taskPriority, Long projectId, String status, Long createdBy);", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "@GetMapping(\"/users/{name}/tasks\")\n public List<Task> getTaskByAssignee(@PathVariable String name){\n List<Task> allTask = taskRepository.findByAssignee(name);\n return allTask;\n }", "public static List<Task> findByByUserId(long userId) {\n\t\treturn getPersistence().findByByUserId(userId);\n\t}", "@Query(\"select u from User u where u.role = 'EMPLOYEE' order by u.hireDay desc\")\n List<Task> getLatestHiredEmployees(Pageable pageable);", "public List<ScheduledTask> getAllPendingTasksByUser(int userId) {\n \t\tSet<String> smembers = jedisConn.smembers(USER_TASKS(String.valueOf(userId)));\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// for each user task id, get the actual task \n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "public List<Zadania> getAllTaskByDate(String date){\n String startDate = \"'\"+date+\" 00:00:00'\";\n String endDate = \"'\"+date+\" 23:59:59'\";\n\n List<Zadania> zadanias = new ArrayList<Zadania>();\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \"+TASK_DATE+\" BETWEEN \"+startDate+\" AND \"+endDate+\" ORDER BY \"+TASK_DATE+\" ASC\";\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()){\n do {\n Zadania zadania = new Zadania();\n zadania.setId(cursor.getInt(cursor.getColumnIndex(_ID)));\n zadania.setAction(cursor.getInt(cursor.getColumnIndex(KEY_ACTION)));\n zadania.setDesc(cursor.getString(cursor.getColumnIndex(TASK_DESC)));\n zadania.setDate(cursor.getString(cursor.getColumnIndex(TASK_DATE)));\n zadania.setBackColor(cursor.getString(cursor.getColumnIndex(BACK_COLOR)));\n zadanias.add(zadania);\n } while (cursor.moveToNext());\n }\n return zadanias;\n }", "@GET(\"pomodorotasks/all\")\n Call<List<PomodoroTask>> pomodorotasksAllGet(\n @Query(\"user\") String user\n );", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "public List<TaskMaster> retrieveTasksForSpecificDaysById(Date currdate, Date xDaysAgo, Long projectId, Long userId, List<Long> projectIds);", "List<Task> getAllTasks();", "ObservableList<Task> getCurrentUserTaskList();", "public java.util.List<Todo> findByUserId(\n\t\tlong userId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Todo>\n\t\t\torderByComparator);", "public List<TaskMaster> retrieveIncompleteTask(Long userId);", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\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 Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "public List<Login> getUsers(Date startDate, Date endDate);", "@GET(\"pomodorotasks\")\n Call<List<PomodoroTask>> pomodorotasksGet(\n @Query(\"user\") String user\n );", "List<Task> getTaskdetails();", "public TaskList incoming(Date from, Date to) {\n ArrayTaskList incomingTasks = new ArrayTaskList();\n for (int i = 0; i < size(); i++) {\n if (getTask(i).nextTimeAfter(from) != null && getTask(i).nextTimeAfter(from).compareTo(to) <= 0) {\n incomingTasks.add(getTask(i));\n }\n }\n return incomingTasks;\n }", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "public List<TaskMaster> retrieveAllTaskByUserIdAndProjectId(Long projectId, Long userId);", "public static List<TaskTimeElement> findAllByTaskDate(String taskDate) {\r\n String sql = null;\r\n List<TaskTimeElement> ret = new ArrayList<TaskTimeElement>();\r\n Statement theStatement = null;\r\n Connection theConnection = null;\r\n ResultSet rs = null;\r\n\r\n try {\r\n theConnection = AdminConnectionManager.getConnection(ME + \".findAllByTaskDate\");\r\n theStatement = theConnection.createStatement();\r\n sql = \"SELECT \" +\r\n \"ID\" +\r\n \",DURATION\" +\r\n \",TASKNAME\" +\r\n \",USERNAME\" +\r\n \" FROM TaskTimeElement\" +\r\n \" WHERE TASKDATE=\" + \r\n \"'\" + DatabaseBase.encodeToSql(taskDate) + \"'\" +\r\n \" AND ENABLED IS TRUE\" +\r\n (userName == null\r\n ? \"\"\r\n : (\" AND USERNAME='\" + DatabaseBase.encodeToSql(userName) + \"'\")) +\r\n \" ORDER BY TASKNAME\";\r\n rs = theStatement.executeQuery(sql);\r\n TaskTimeElement object = null;\r\n while (rs.next()) {\r\n object = new TaskTimeElement();\r\n object.setTaskDate(taskDate);\r\n object.setEnabled(true);\r\n int i = 1;\r\n object.setId(rs.getLong(i++));\r\n object.setDuration(rs.getDouble(i++));\r\n object.setTaskName(rs.getString(i++));\r\n object.setUserName(rs.getString(i++));\r\n ret.add(object);\r\n }\r\n } catch (SQLException sqle) {\r\n Trace.error(\"sql = \" + sql, sqle);\r\n }\r\n finally {\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theStatement != null) {\r\n try {\r\n theStatement.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theConnection != null)\r\n AdminConnectionManager.releaseConnection(theConnection);\r\n }\r\n return ret;\r\n }", "public static Iterable<Task> incoming(Iterable<Task> tasks, Date from, Date to) throws Exception {\n ArrayTaskList incomingList = new ArrayTaskList();\n for (Task task : tasks)\n try {\n if (task.nextTimeAfter(from).before(to) || task.nextTimeAfter(from).equals(to))\n incomingList.add(task);\n } catch (NullPointerException e) {\n }\n return incomingList;\n }", "public List<Task> listTasks(String extra);", "Set<Task> getAllTasks();", "TaskList getList();", "@Override\n public String getAllTaskUser(String userId) {\n try {\n Set<ITaskInstance> allTasks = dataAccessTosca.getTasksByUser(userId);\n JSONArray fullResponse = new JSONArray();\n //if allTasks is null, then no tasks for this user was found\n if (allTasks != null) {\n // create a JSON-Object for every task and add it to fullresponse\n for (ITaskInstance task : allTasks) {\n JSONObject response = new JSONObject();\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(task.getId());\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n //response.put(\"taskType\", \"Noch einfügen\");\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n fullResponse.add(response);\n }\n return fullResponse.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n public List<ScheduledInterview> getForPerson(String userId) {\n List<ScheduledInterview> relevantInterviews = new ArrayList<>();\n List<ScheduledInterview> scheduledInterviews = new ArrayList<ScheduledInterview>(data.values());\n scheduledInterviews.sort(\n (ScheduledInterview s1, ScheduledInterview s2) -> {\n if (s1.when().start().equals(s2.when().start())) {\n return 0;\n }\n if (s1.when().start().isBefore(s2.when().start())) {\n return -1;\n }\n return 1;\n });\n\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (userId.equals(scheduledInterview.interviewerId())\n || userId.equals(scheduledInterview.intervieweeId())\n || userId.equals(scheduledInterview.shadowId())) {\n relevantInterviews.add(scheduledInterview);\n }\n }\n return relevantInterviews;\n }", "@Transactional\r\n\tpublic List<String> getTasks(String assignee) {\r\n\t\tString assign = ORDER_ASSIGNEE;\r\n\t\tlogger.info(\"Received order to getTasks, assignee : \" + assign);\r\n\t\tList<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(assign).list();\r\n\r\n\t\tList<String> orders = tasks.stream().map(task -> {\r\n\t\t\tMap<String, Object> variables = taskService.getVariables(task.getId());\r\n\t\t\treturn (String) variables.get(\"orderid\");\r\n\t\t}).collect(Collectors.toList());\r\n\r\n\t\tlogger.info(\"orderid(s) : \" + orders.toString());\r\n\t\treturn orders;\r\n\t}", "public java.util.List<Todo> findByUserIdGroupId(\n\t\tlong userId, long groupId, int start, int end);", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "public List<Events> getMostUpcomingUserEvents(long userId);", "@GET(\"pomodorotasks/todo\")\n Call<List<PomodoroTask>> pomodorotasksTodoGet(\n @Query(\"user\") String user\n );", "public List<Task> getTaskForToday(String owner) {\n\n\t\tList<Task> tasksEOD = null;\n\t\tif (owner.equals(TVSchedulerConstants.CESAR)) {\n\t\t\ttasksEOD = getCesarTasksExpiringToday();\n\t\t} else if (owner.equals(TVSchedulerConstants.HOME)) {\n\t\t\ttasksEOD = getHomeTasksExpiringToday();\n\t\t}\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.HOUR, -2);\n\t\tList<Task> tasksPermanentTasks = taskRepository\n\t\t\t\t.getTaskByOwnerAndExpireAtTheEndOfTheDayAndCompletionDateAfter(owner, false, calendar.getTime());\n\t\tList<Task> tasks = tasksEOD;\n\t\ttasks.addAll(tasksPermanentTasks);\n\t\tDate date = DateUtils.truncate(new Date(), Calendar.DATE);\n\t\ttasksPermanentTasks = taskRepository.getTaskByDateAndOwnerAndExpireAtTheEndOfTheDayAndDone(date, owner, false,\n\t\t\t\ttrue);\n\t\ttasks.addAll(tasksPermanentTasks);\n\t\treturn tasks;\n\t}", "@GET(\"pomodorotasks/activity\")\n Call<List<PomodoroTask>> pomodorotasksActivityGet(\n @Query(\"user\") String user\n );", "@RequestMapping(method = RequestMethod.GET, value = \"/get-tasks\")\r\n\tpublic List<Task> getTasks() {\r\n\t\tList<Task> dummyTasks = new ArrayList<Task>();\r\n\t\treturn dummyTasks;\r\n\t}", "public List<Task> getTaskForToday() {\n\t\tDate currentDate = DateUtils.truncate(new Date(), Calendar.DATE);\n\n\t\tgetCesarTasksExpiringToday();\n\t\tgetHomeTasksExpiringToday();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.HOUR, -2);\n\t\tList<Task> tasksPermanentTasks = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndCompletionDateAfterOrCompletionDateIsNullOrderByDoneAsc(false,\n\t\t\t\t\t\tcalendar.getTime());\n\t\tList<Task> tasksTemp = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndDateAndCompletionDateAfterOrderByDoneAsc(true, currentDate,\n\t\t\t\t\t\tcalendar.getTime());\n\t\ttasksPermanentTasks.addAll(tasksTemp);\n\t\treturn tasksPermanentTasks;\n\t}", "public List<Task> getCesarTasksExpiringToday() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate date = DateUtils.truncate(new Date(), Calendar.DATE);\n\t\tcalendar.setTime(date);\n\t\tint dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\tList<Task> tasks = taskRepository.getTaskByDateAndOwnerAndExpireAtTheEndOfTheDay(date,\n\t\t\t\tTVSchedulerConstants.CESAR, true);\n\t\tif (tasks.size() == 0) {\n\t\t\tTask task;\n\t\t\tswitch (dayOfWeek) {\n\t\t\tcase Calendar.SATURDAY:\n\t\t\t\ttask = new Task(\"Mettre la table\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Faire le piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"jeu de Société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.SUNDAY:\n\t\t\t\ttask = new Task(\"Faire du sport (piscine/footing)\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jouer tout seul\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jeu de société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"S'habiller\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.MONDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.TUESDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.WEDNESDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.THURSDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.FRIDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\treturn tasks;\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getByTime(String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,time1,time2);\r\n\t}", "public List<Task> getpublishTask(Integer uid);", "@Query(\"SELECT * from task_table ORDER BY task ASC\")\n LiveData<List<Task>> getAllTasks();", "public java.util.List<Todo> findByUserId(\n\t\tlong userId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Todo>\n\t\t\torderByComparator,\n\t\tboolean useFinderCache);", "public static List<LogEntry> getAllByDates ( final String user, final String startDate, final String endDate ) {\n // Parse the start string for year, month, and day.\n final String[] startDateArray = startDate.split( \"-\" );\n final int startYear = Integer.parseInt( startDateArray[0] );\n final int startMonth = Integer.parseInt( startDateArray[1] );\n final int startDay = Integer.parseInt( startDateArray[2] );\n\n // Parse the end string for year, month, and day.\n final String[] endDateArray = endDate.split( \"-\" );\n final int endYear = Integer.parseInt( endDateArray[0] );\n final int endMonth = Integer.parseInt( endDateArray[1] );\n final int endDay = Integer.parseInt( endDateArray[2] );\n\n // Get calendar instances for start and end dates.\n final Calendar start = Calendar.getInstance();\n start.clear();\n final Calendar end = Calendar.getInstance();\n end.clear();\n\n // Set their values to the corresponding start and end date.\n start.set( startYear, startMonth, startDay );\n end.set( endYear, endMonth, endDay );\n\n // Check if the start date happens after the end date.\n if ( start.compareTo( end ) > 0 ) {\n System.out.println( \"Start is after End.\" );\n // Start is after end, return empty list.\n return new ArrayList<LogEntry>();\n }\n\n // Add 1 day to the end date. EXCLUSIVE boundary.\n end.add( Calendar.DATE, 1 );\n\n\n // Get all the log entries for the currently logged in users.\n final List<LogEntry> all = LoggerUtil.getAllForUser( user );\n // Create a new list to return.\n final List<LogEntry> dateEntries = new ArrayList<LogEntry>();\n\n // Compare the dates of the entries and the given function parameters.\n for ( int i = 0; i < all.size(); i++ ) {\n // The current log entry being looked at in the all list.\n final LogEntry e = all.get( i );\n\n // Log entry's Calendar object.\n final Calendar eTime = e.getTime();\n // If eTime is after (or equal to) the start date and before the end\n // date, add it to the return list.\n if ( eTime.compareTo( start ) >= 0 && eTime.compareTo( end ) < 0 ) {\n dateEntries.add( e );\n }\n }\n // Return the list.\n return dateEntries;\n }", "@Query(\"SELECT * FROM DBTask WHERE taskState = :taskState ORDER by endTime DESC LIMIT 20\")\n List<DBTask> getDBTaskByDBTaskState(String taskState);", "@RequestMapping(\n value = \"/{start}/{end}\",\n method = RequestMethod.GET\n )\n public final Iterable<Entry> filter(\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date start,\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date end\n ) {\n if (end.before(start)) {\n throw new IllegalArgumentException(\"Start date must be before end\");\n }\n final List<Entry> result = new LinkedList<Entry>();\n List<Entry> entries = SecurityUtils.actualUser().getEntries();\n if (entries == null) {\n entries = Collections.emptyList();\n }\n for (final Entry entry : entries) {\n if (entry.getDate().after(start)\n && entry.getDate().before(end)) {\n result.add(entry);\n }\n }\n return result;\n }", "private void getTasks(){\n\n currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();\n if(currentFirebaseUser !=null){\n Log.e(\"Us\", \"onComplete: good\");\n } else {\n Log.e(\"Us\", \"onComplete: null\");\n }\n\n\n mDatabaseReference.child(currentFirebaseUser.getUid())\n .addValueEventListener(new ValueEventListener() {\n //если данные в БД меняются\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (mTasks.size() > 0) {\n mTasks.clear();\n }\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n Task task = postSnapshot.getValue(Task.class);\n mTasks.add(task);\n if (mTasks.size()>2){\n\n }\n }\n setAdapter(taskId);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n\n });\n }", "public EventList getEvents(String userName) {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT userId, eventName, startMonth, startDay, startYear, startHour, startMinute\" +\n \", endMonth, endDay, endYear, endHour, endMinute FROM Events WHERE userId=?\");\n s.setInt(1, getIdOfUser(userName));\n s.execute();\n ResultSet results = s.getResultSet();\n\n EventList events = new EventList();\n if (!results.isBeforeFirst()) {\n return events;\n }\n\n while (!results.isLast()) {\n results.next();\n Event e = new Event(userName, results.getString(2),\n results.getInt(3), results.getInt(4), results.getInt(5),\n results.getInt(6), results.getInt(7), results.getInt(8),\n results.getInt(9), results.getInt(10), results.getInt(11),\n results.getInt(12));\n events.add(e);\n }\n results.close();\n s.close();\n events.sort();\n\n return events;\n } catch (SQLException e) {\n System.err.println(\"SQLE\");\n sqlException(e);\n return null;\n }\n }", "public List<String> retrieveByDate(List<String> jobId, String userId,\n Calendar startDate, Calendar endDate) throws DatabaseException, IllegalArgumentException;", "public List<TaskItem> zGetTasks() throws HarnessException {\n\n\t\tList<TaskItem> items = new ArrayList<TaskItem>();\n\n\t\t// The task page has the following under the zl__TKL__rows div:\n\t\t// <div id='_newTaskBannerId' .../> -- enter a new task\n\t\t// <div id='_upComingTaskListHdr' .../> -- Past due\n\t\t// <div id='zli__TKL__267' .../> -- Task item\n\t\t// <div id='zli__TKL__299' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- Upcoming\n\t\t// <div id='zli__TKL__271' .../> -- Task item\n\t\t// <div id='zli__TKL__278' .../> -- Task item\n\t\t// <div id='zli__TKL__275' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- No due date\n\t\t// <div id='zli__TKL__284' .../> -- Task item\n\t\t// <div id='zli__TKL__290' .../> -- Task item\n\n\t\t// How many items are in the table?\n\t\tString rowLocator = \"//div[@id='\" + Locators.zl__TKL__rows + \"']/div\";\n\t\tint count = this.sGetXpathCount(rowLocator);\n\t\tlogger.debug(myPageName() + \" zGetTasks: number of rows: \" + count);\n\n\t\t// Get each conversation's data from the table list\n\t\tfor (int i = 1; i <= count; i++) {\n\n\t\t\tString itemLocator = rowLocator + \"[\" + i + \"]\";\n\n\t\t\tString id;\n\t\t\ttry {\n\t\t\t\tid = this.sGetAttribute(\"xpath=(\" + itemLocator + \")@id\");\n\t\t\t} catch (SeleniumException e) {\n\t\t\t\t// Make sure there is an ID\n\t\t\t\tlogger.warn(\"Task row didn't have ID. Probably normal if message is 'Could not find element attribute' => \"+ e.getMessage());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString locator = null;\n\t\t\tString attr = null;\n\n\t\t\t// Skip any invalid IDs\n\t\t\tif ((id == null) || (id.trim().length() == 0))\n\t\t\t\tcontinue;\n\n\t\t\t// Look for zli__TKL__258\n\t\t\tif (id.contains(Locators.zli__TKL__)) {\n\t\t\t\t// Found a task\n\n\t\t\t\tTaskItem item = new TaskItem();\n\n\t\t\t\tlogger.info(\"TASK: \" + id);\n\n\t\t\t\t// Is it checked?\n\t\t\t\t// <div id=\"zlif__TKL__258__se\" style=\"\"\n\t\t\t\t// class=\"ImgCheckboxUnchecked\"></div>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//div[contains(@class, 'ImgCheckboxUnchecked')]\";\n\t\t\t\titem.gIsChecked = this.sIsElementPresent(locator);\n\n\t\t\t\t// Is it tagged?\n\t\t\t\t// <div id=\"zlif__TKL__258__tg\" style=\"\"\n\t\t\t\t// class=\"ImgBlank_16\"></div>\n\t\t\t\tlocator = itemLocator + \"//div[contains(@id, '__tg')]\";\n\t\t\t\t// TODO: handle tags\n\n\t\t\t\t// What's the priority?\n\t\t\t\t// <td width=\"19\" id=\"zlif__TKL__258__pr\"><center><div style=\"\"\n\t\t\t\t// class=\"ImgTaskHigh\"></div></center></td>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div\";\n\t\t\t\tif (!this.sIsElementPresent(locator)) {\n\t\t\t\t\titem.gPriority = \"normal\";\n\t\t\t\t} else {\n\t\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div)@class\";\n\t\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\t\tif (attr.equals(\"ImgTaskHigh\")) {\n\t\t\t\t\t\titem.gPriority = \"high\";\n\t\t\t\t\t} else if (attr.equals(\"ImgTaskLow\")) {\n\t\t\t\t\t\titem.gPriority = \"low\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Is there an attachment?\n\t\t\t\t// <td width=\"19\" class=\"Attach\"><div id=\"zlif__TKL__258__at\"\n\t\t\t\t// style=\"\" class=\"ImgBlank_16\"></div></td>\n\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t+ \"//div[contains(@id, '__at')])@class\";\n\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\tif (attr.equals(\"ImgBlank_16\")) {\n\t\t\t\t\titem.gHasAttachments = false;\n\t\t\t\t} else {\n\t\t\t\t\t// TODO - handle other attachment types\n\t\t\t\t}\n\n\t\t\t\t// See http://bugzilla.zmail.com/show_bug.cgi?id=56452\n\n\t\t\t\t// Get the subject\n\t\t\t\tlocator = itemLocator + \"//td[5]\";\n\t\t\t\titem.gSubject = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the status\n\t\t\t\tlocator = itemLocator + \"//td[6]\";\n\t\t\t\titem.gStatus = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the % complete\n\t\t\t\tlocator = itemLocator + \"//td[7]\";\n\t\t\t\titem.gPercentComplete = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the due date\n\t\t\t\tlocator = itemLocator + \"//td[8]\";\n\t\t\t\titem.gDueDate = this.sGetText(locator).trim();\n\n\t\t\t\titems.add(item);\n\t\t\t\tlogger.info(item.prettyPrint());\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the list of items\n\t\treturn (items);\n\n\t}", "public static List<ITask> findTaskOfSessionUser(int startIndex, int pageSize, String sortField, SortOrder sortOrder,\r\n boolean isHistory, IPropertyFilter<TaskProperty> taskFilter) {\r\n Ivy ivy = Ivy.getInstance();\r\n IQueryResult<ITask> queryResult;\r\n\r\n List<PropertyOrder<TaskProperty>> taskPropertyOrder =\r\n PropertyOrder.create(getTaskProperty(sortField), getTaskDirection(sortOrder));\r\n if (isHistory) {\r\n queryResult = ivy.session.findWorkedOnTasks(taskFilter, taskPropertyOrder, startIndex, pageSize, true);\r\n } else {\r\n\r\n queryResult =\r\n ivy.session.findWorkTasks(taskFilter, taskPropertyOrder, startIndex, pageSize, true,\r\n EnumSet.of(TaskState.SUSPENDED, TaskState.RESUMED, TaskState.PARKED));\r\n }\r\n\r\n List<ITask> tasks = queryResult.getResultList();\r\n return tasks;\r\n }", "private static String getFastestResources(Date p_baseDate, long p_duration,\n String[] p_userIds) throws Exception\n {\n Date bestDate = null;\n StringBuilder sb = null;\n\n // loop thru users and compute estimated completion date for each\n for (int i = 0; i < p_userIds.length; i++)\n {\n UserFluxCalendar cal = ServerProxy.getCalendarManager()\n .findUserCalendarByOwner(p_userIds[i]);\n Date dt = ServerProxy.getEventScheduler().determineDate(p_baseDate,\n cal, p_duration);\n\n if (bestDate == null || dt.before(bestDate))\n {\n bestDate = dt;\n sb = new StringBuilder();\n sb.append(p_userIds[i]);\n }\n else if (dt.equals(bestDate))\n {\n // add the user to list\n sb.append(\",\");\n sb.append(p_userIds[i]);\n }\n }\n\n return sb.toString();\n }", "public List<Task> getTasks(String category, String keyword, Boolean isApproved, Integer olderThan) {\n if ((category == null || category.equals(\"None\")) && keyword == null) return taskRepository.findAllByIsApproved(isApproved, PageRequest.of(olderThan, 20));\n else if (category != null && keyword == null) return taskRepository.findAllByCategoryCategoryAndIsApproved(category, isApproved, PageRequest.of(olderThan, 20));\n else if (category == null || category.equals(\"None\")) return taskRepository.findAllByQuestionAndIsApproved(keyword, isApproved, PageRequest.of(olderThan, 20));\n return taskRepository.findAllByTitleAndCategoryAndIsApproved(keyword, category, isApproved, PageRequest.of(olderThan, 20));\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<MobileTaskAssignment> getByUser(int userId) {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\t\"from \" + domainClass.getName() + \" task \" +\r\n\t\t\t\t\t\t\"where task.user.userId = :userId\")\r\n\t\t\t\t\t.setInteger(\"userId\", userId)\r\n\t\t\t\t\t.list();\r\n\t}", "void nominateTask(String userId, List<String> userList, Long taskId);", "ObservableList<Task> getFilteredTaskList();", "public java.util.List<Todo> filterFindByUserIdGroupId(\n\t\tlong userId, long groupId, int start, int end);", "@RequestMapping(value = \"/user/from/{userId}\", method = RequestMethod.GET)\n public Iterable<Task> getAllAssignedByMe(@PathVariable Long userId,\n @RequestParam Integer month,\n @RequestParam Integer year,\n @RequestParam(value = \"page\", defaultValue = \"0\") Integer page) throws Exception {\n if (userId == null || month == null || year == null) {\n throw new EntityNotFoundException(\"Invalid data found!\");\n }\n\n return taskService.readAllAssignedByUser(userId, month, year, page);\n }", "public static List<ITask> findWorkedTaskOfSessionUser() {\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, FINISHED_MODE, null);\r\n }", "public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\n }", "ObservableList<Task> getTaskList();", "public java.util.List<Todo> findByU_S(\n\t\tlong userId, int status, int start, int end);", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "public static List<ITask> findAllTasks(final int startIndex, final int pageSize, final String sortField,\r\n final SortOrder sortOrder, final boolean isHistory, final IPropertyFilter<TaskProperty> taskFilter) {\r\n List<ITask> outTasks = Collections.emptyList();\r\n Ivy ivy = Ivy.getInstance();\r\n IQueryResult<ITask> queryResult;\r\n\r\n List<PropertyOrder<TaskProperty>> taskPropertyOrder =\r\n PropertyOrder.create(ch.ivy.addon.portalkit.util.TaskUtils.getTaskProperty(sortField),\r\n ch.ivy.addon.portalkit.util.TaskUtils.getTaskDirection(sortOrder));\r\n if (isHistory) {\r\n queryResult = ivy.session.findWorkedOnTasks(taskFilter, taskPropertyOrder, startIndex, pageSize, true);\r\n } else {\r\n if (checkReadAllTasksPermission()) {\r\n IPropertyFilter<TaskProperty> filter =\r\n Ivy.wf().createTaskPropertyFilter(TaskProperty.STATE, RelationalOperator.EQUAL,\r\n TaskState.SUSPENDED.intValue());\r\n filter = filter.or(TaskProperty.STATE, RelationalOperator.EQUAL, TaskState.RESUMED.intValue());\r\n filter = filter.or(TaskProperty.STATE, RelationalOperator.EQUAL, TaskState.PARKED.intValue());\r\n filter = filter.or(TaskProperty.STATE, RelationalOperator.EQUAL, TaskState.DELAYED.intValue());\r\n queryResult = Ivy.wf().findTasks(filter, taskPropertyOrder, startIndex, pageSize, true);\r\n outTasks = queryResult.getResultList();\r\n }\r\n }\r\n\r\n return outTasks;\r\n\r\n }", "ResponseEntity<List<Priority>> findTaskPriorities();", "public TaskList() {\n this.USER_TASKS = new ArrayList<>();\n }", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "public java.util.List<DataEntry> findByUserId(\n\t\tlong userId, int start, int end);", "private void doViewAllTasks() {\n ArrayList<Task> t1 = todoList.getListOfTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No tasks available.\");\n }\n }", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "public List<TaskDescription> getActiveTasks();", "public java.util.List<Todo> findByG_U_S(\n\t\tlong groupId, long userId, int status, int start, int end);", "public static Task<DocumentSnapshot> getUserDates(String userId) {\n Log.d(Const.TAG, \"getUserDatesForCal: \" + Thread.currentThread().getId());\n return FirebaseFirestore.getInstance()\n .collection(Const.USERS_COLLECTION)\n .document(userId)\n .get();\n }", "public java.util.List<Todo> filterFindByUserIdGroupId(\n\t\tlong userId, long groupId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Todo>\n\t\t\torderByComparator);", "public List<Date> determineTaskDateTime(String userCommand) {\n\t\tif (userCommand == null || userCommand.equals(\"\")) {\n\t\t\tlogger.log(Level.WARNING, Global.MESSAGE_ILLEGAL_ARGUMENTS);\n\t\t\treturn null;\n\t\t}\n\n\t\tString userCommandWithoutIndex = removeIndex(userCommand);\n\t\tString userCommandWithoutCommandType = removeCommandType(userCommandWithoutIndex);\n\t\tString userCommandWithoutTaskNameAndCommandType = removeTaskName(userCommandWithoutCommandType);\n\t\tList<Date> dateTimes;\n\n\t\ttry {\n\t\t\tdateTimes = getDateTimes(userCommandWithoutTaskNameAndCommandType);\n\t\t} catch (Exception e) {\n\t\t\tlogger.log(Level.INFO, MESSAGE_NO_DATETIMES);\n\t\t\treturn null;\n\t\t}\n\t\tdateTimes = checkOrderOfDateTimes(dateTimes);\n\t\treturn dateTimes;\n\t}", "private static String getAvailableResources(Date p_baseDate,\n Date p_estimatedCompletionDate, long p_duration, String[] p_userIds)\n throws Exception\n {\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < p_userIds.length; i++)\n {\n UserFluxCalendar cal = ServerProxy.getCalendarManager()\n .findUserCalendarByOwner(p_userIds[i]);\n Date dt = ServerProxy.getEventScheduler().determineDate(p_baseDate,\n cal, p_duration);\n if (dt.compareTo(p_estimatedCompletionDate) > 0)\n {\n continue;\n }\n\n if (sb.length() > 0)\n {\n sb.append(\",\");\n }\n sb.append(p_userIds[i]);\n }\n return sb.length() > 0 ? sb.toString() : null;\n }", "@RequestMapping(value=\"/tasks\", method = RequestMethod.GET)\npublic @ResponseBody List<Task> tasks(){\n\treturn (List<Task>) taskrepository.findAll();\n}", "public static List<ITask> findWorkTaskOfSessionUser() {\r\n\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n }", "public Map<Long, Collection<TaskShortInfo>> findAllPendingTasksForUserAndTeamMembers(User user) {\n return taskRepository.findAllPendingTasksForUserAndTeamMembers(user.getId(), user.getRolesName());\n }", "@Override\n public ResponseEntity<GenericResponseDTO> getTasks(String idUser) {\n List<TaskEntity> tasksEntity = new ArrayList<>();\n try{\n tasksEntity = taskRepository.findAllByIdUser(idUser);\n if(!tasksEntity.isEmpty()){\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"tareas encontradas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }else {\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"No se encontraron Tareas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }\n }catch (Exception e){\n log.error(\"Algo fallo en la actualizacion de la fecha \" + e);\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"Error consultando la persona: \" + e.getMessage())\n .objectResponse(null)\n .statusCode(HttpStatus.BAD_REQUEST.value())\n .build(), HttpStatus.BAD_REQUEST);\n }\n }", "private List<Task> tasks2Present(){\n List<Task> tasks = this.taskRepository.findAll();\n// de taken verwijderen waar user eerder op reageerde\n tasks2React(tasks);\n// taken op alfabetische volgorde zetten\n sortTasks(tasks);\n// opgeschoonde lijst aan handler geven\n return tasks;\n }", "public java.util.List<Todo> findByTodoDateTime(\n\t\tDate todoDateTime, int start, int end);", "public java.util.List<Todo> filterFindByG_U_S(\n\t\tlong groupId, long userId, int status, int start, int end);", "List<TaskSummary> getTasksAssignedAsPotentialOwnerByProcessId(String userId, String processId);", "public List<TaskItem> zGetTasks(TaskStatus status) throws HarnessException {\n\n\t\tList<TaskItem> items = null;\n\n\t\t// The task page has the following under the zl__TKL__rows div:\n\t\t// <div id='_newTaskBannerId' .../> -- enter a new task\n\t\t// <div id='_upComingTaskListHdr' .../> -- Past due\n\t\t// <div id='zli__TKL__267' .../> -- Task item\n\t\t// <div id='zli__TKL__299' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- Upcoming\n\t\t// <div id='zli__TKL__271' .../> -- Task item\n\t\t// <div id='zli__TKL__278' .../> -- Task item\n\t\t// <div id='zli__TKL__275' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- No due date\n\t\t// <div id='zli__TKL__284' .../> -- Task item\n\t\t// <div id='zli__TKL__290' .../> -- Task item\n\n\t\t// How many items are in the table?\n\t\tString rowLocator = \"//div[@id='\" + Locators.zl__TKL__rows + \"']\";\n\t\tint count = this.sGetXpathCount(rowLocator);\n\t\tlogger.debug(myPageName() + \" zGetTasks: number of rows: \" + count);\n\n\t\t// Get each conversation's data from the table list\n\t\tfor (int i = 1; i <= count; i++) {\n\t\t\tString tasklocator = rowLocator + \"/div[\" + i + \"]\";\n\n\t\t\tString id = this.sGetAttribute(\"xpath=(\" + tasklocator + \")@id\");\n\t\t\tif (Locators._newTaskBannerId.equals(id)) {\n\t\t\t\t// Skip the \"Add New Task\" row\n\t\t\t\tcontinue;\n\t\t\t} else if (Locators._upComingTaskListHdr.equals(id)) {\n\t\t\t\t// Found a status separator\n\n\t\t\t\tString text = this.sGetText(tasklocator);\n\t\t\t\tif ((\"Past Due\".equals(text)) && (status == TaskStatus.PastDue)) {\n\n\t\t\t\t\titems = new ArrayList<TaskItem>();\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else if ((\"Upcoming\".equals(text))\n\t\t\t\t\t\t&& (status == TaskStatus.Upcoming)) {\n\n\t\t\t\t\titems = new ArrayList<TaskItem>();\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else if ((\"No Due Date\".equals(text))\n\t\t\t\t\t\t&& (status == TaskStatus.NoDueDate)) {\n\n\t\t\t\t\titems = new ArrayList<TaskItem>();\n\t\t\t\t\tcontinue;\n\n\t\t\t\t}\n\n\t\t\t\t// If a list already exists, then we've just completed it\n\t\t\t\tif (items != null)\n\t\t\t\t\treturn (items);\n\n\t\t\t} else if (id.contains(Locators.zli__TKL__)) {\n\t\t\t\t// Found a task\n\n\t\t\t\t// If the list is initialized, then we are in the correct list\n\t\t\t\t// section\n\t\t\t\tif (items == null)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tTaskItem item = new TaskItem();\n\n\t\t\t\t// TODO: extract the info from the GUI\n\n\t\t\t\titems.add(item);\n\t\t\t\tlogger.info(item.prettyPrint());\n\n\t\t\t} else {\n\t\t\t\tlogger.warn(\"Unknown task row ID: \" + id);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// If items is still null, then we didn't find any matching tasks\n\t\t// Just return an empty list\n\t\tif (items == null)\n\t\t\titems = new ArrayList<TaskItem>();\n\n\t\t// Return the list of items\n\t\treturn (items);\n\n\t}", "@Override\n public int compare(Task task1, Task task2) {\n return task1.getDate().compareTo(task2.getDate());\n }", "public ArrayList<Task> getTasks() {\n // List of workouts to return\n ArrayList<Task> tasks = new ArrayList<>();\n\n // Cursor is what moves throughout the entire database\n Cursor cursor = database.query(SQLiteHelper.TABLE_TASKS,\n allColumns, null, null, null, null,\n SQLiteHelper.COLUMN_ID + \" ASC\");\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n Task task = cursorToTask(cursor);\n\n tasks.add(task);\n\n cursor.moveToNext();\n }\n cursor.close();\n\n return tasks;\n }", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "public java.util.List<Todo> findByU_S(\n\t\tlong userId, int status, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Todo>\n\t\t\torderByComparator);" ]
[ "0.70637053", "0.6594306", "0.6514703", "0.64885885", "0.64542705", "0.64428633", "0.64018434", "0.6396453", "0.62992465", "0.6282992", "0.6261055", "0.6198341", "0.61296105", "0.6112541", "0.61016434", "0.609762", "0.6053379", "0.6044664", "0.60233295", "0.60155964", "0.6002686", "0.594781", "0.59383214", "0.5923967", "0.5889504", "0.587491", "0.58719873", "0.5858737", "0.58196056", "0.58136547", "0.58115137", "0.58115137", "0.58098894", "0.58051556", "0.57729244", "0.5735204", "0.5723736", "0.56762147", "0.5668526", "0.56611973", "0.56531155", "0.56508857", "0.5640104", "0.5628385", "0.5623411", "0.5615269", "0.5607776", "0.5593566", "0.5587152", "0.55813986", "0.5571399", "0.5569928", "0.55693847", "0.5562106", "0.55548316", "0.55540353", "0.5553515", "0.5545818", "0.55442274", "0.5541664", "0.5521464", "0.5519297", "0.55116653", "0.5504059", "0.55007327", "0.5499104", "0.5496048", "0.54750955", "0.5472933", "0.5464917", "0.54506254", "0.54477334", "0.54244816", "0.54141915", "0.54015493", "0.539429", "0.53841424", "0.5380912", "0.53773224", "0.53757995", "0.53750706", "0.537225", "0.5360586", "0.5347224", "0.533942", "0.5333612", "0.5330145", "0.53189296", "0.5312242", "0.53075206", "0.5304977", "0.5293785", "0.52810746", "0.52757525", "0.5268362", "0.5266007", "0.52564436", "0.5253555", "0.52532923", "0.5250636" ]
0.71927965
0
Add a task for the user.
boolean addTask(Task newTask);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addTask(Task task);", "public void addTask(Task task) {\n\t\tSystem.out.println(\"Inside createTask()\");\n\t\t\n\t\ttoDoList.add(task);\n\t\tdisplay();\n\t}", "public void add(Task task)\n {\n this.tasks.add(task);\n }", "void add(final Task task);", "public void add(Task task){ this.tasks.add(task);}", "public void addTask(Task task)\n {\n tasks.add(task);\n }", "public void addTask(Task task) {\n this.tasks.add(task);\n }", "public void addTask(Task task) {\n tasks.add(task);\n }", "public void addTask(Task task) {\n tasks.add(task);\n }", "public void addTask(Task task) {\n tasks.add(task);\n }", "public void add(final Task task) {\n }", "String addTask(Task task);", "public void addTask(Task task) {\n list.add(task);\n }", "public void add(Task task) {\r\n tasks.add(task);\r\n }", "@Override\n\tpublic void addTask(Task task) {\n\t\t\n\t}", "@Override\r\n\tpublic Task addTask(Task task) {\n\t\treturn taskRepository.save(task);\r\n\t}", "public void add(Task t)\n {\n\ttoDo.add(t);\n }", "@Override\r\n\tpublic String addUser(taskPojo addUser,HttpServletRequest request, HttpServletResponse response) {\n\t\treturn dao.addUser(addUser,request,response);\r\n\t}", "public void addTask(Task task){\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID, task.getId());\n values.put(KEY_LABEL, task.getLabel());\n values.put(KEY_TIME, task.getTime());\n db.insert(TABLE_NAME, null, values);\n db.close();\n }", "public void addTask(View v) {\n int taskId = Integer.parseInt(txtId.getText().toString());\n String tskName = txtTaskName.getText().toString();\n String taskDesc = txtTaskDescription.getText().toString();\n ContentValues values = new ContentValues();\n values.put(\"taskId\", taskId);\n values.put(\"taskName\", tskName);\n values.put(\"taskDescription\", taskDesc);\n try {\n taskManager.addTask(values);\n Toast.makeText(this, \"Data Inserted\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\tpublic void addTask(Teatask ta)\n\t{\n\t\tteataskMapper.addTask(ta);\n\t}", "public void addNewTask(String taskName) {\n\t\tCommand cmdAdd = new CmdAdd();\n\t\tcmdAdd.setParameter(CmdParameters.PARAM_NAME_TASK_NAME, taskName);\n\t\tcmdAdd.execute();\n\t}", "public void addTask(Task task) {\n\t\tMessage msg=new Message(null, null, task);\n\t\ttry {\n\t\t\tchannel.send(msg);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\t//Runtime exception with info for use in debugging\n\t\t\tthrow new RuntimeException(ex.getMessage());\n\t\t}\n\t}", "public static void addTask(@NonNull final AsyncTask<Void, Integer, Boolean> task) {\n tasksList.add(task);\n }", "void addTask(Task person) throws UniqueTaskList.DuplicateTaskException;", "public void addTask(Task task) {\n tasks.add(task);\n notifyObservers();\n }", "void addTask(Task<?> task) {\n tasks.addFirst(task);\n }", "public void addTask(String task, String... args) {\r\n\t\ttasks.add(new String[][]{new String[]{task}, args});\r\n\t}", "@RequestMapping(method = RequestMethod.POST, value = \"/add-task\",consumes = MediaType.APPLICATION_JSON_VALUE,headers = {\r\n \"content-type=application/json\" })\r\n\tpublic Task addTask(@RequestBody Task task) {\r\n\t\tinvokeNotification();\r\n\t\treturn task;\r\n\r\n\t}", "public void addToTaskList(Task task) {\n taskList.add(task);\n }", "public void createTask(Task task) {\n ContentValues values = new ContentValues();\n values.put(SQLiteHelper.COLUMN_NAME, task.getName());\n database.insert(SQLiteHelper.TABLE_TASKS, null, values);\n }", "public void addTask(Task t){\n\t\ttry {\n\t\t\taction.put(t);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void addTask(Task task) {\n tasks.add(task);\n cachedTasks.push(new CachedTask(task, \"add\", getTasksSize() - 1));\n }", "public void add(Task var) {\n\t\tif (tasks.size() < numOfTasks) {\n\t\t\ttasks.add(var);\n\t\t}\n\t}", "public void createTask() {\n \tSystem.out.println(\"Inside createTask()\");\n \tTask task = Helper.inputTask(\"Please enter task details\");\n \t\n \ttoDoList.add(task);\n \tSystem.out.println(toDoList);\n }", "public void add(Task newTask) {\n tasks.add(newTask);\n }", "public int addTask(Task task) {\n\t\treturn (Integer)getHibernateTemplate().save(task);\n\t}", "public static void addTask(Task taskToAdd)\n\t{\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tCalendar cal = taskToAdd.getCal();\n\t\tint year = cal.get(YEAR);\n\t\tint month = cal.get(MONTH);\n\t\tint day = cal.get(DAY_OF_MONTH);\n\t\tint hour = cal.get(HOUR_OF_DAY);\n\t\tint minute = cal.get(MINUTE);\n\t\t\n\t\tString descrip = taskToAdd.getDescription();\n\t\tboolean recur = taskToAdd.getRecurs();\n\t\tint recurI;\n\t\tif(recur) recurI = 1;\n\t\telse recurI = 0;\n\t\tint recursDays = taskToAdd.getRecurIntervalDays();\n\t\t\n\t\tstatement.executeUpdate(\"INSERT INTO tasks (Year, Month, Date, Hour, Minute, Description, Recursion, RecursionDays) VALUES(\" +year+\", \"+month+\", \"+day+\", \"+hour+\", \"+minute+\", '\"+descrip+\"', \"+recurI+\", \"+recursDays+\")\");\n\t\tstatement.close();\n\t\treturn;\n\t}", "private void doAddTask() {\n System.out.println(\n \"Kindly enter the time, description and date of the task you would like to add on separate lines.\");\n String time = input.nextLine();\n String description = input.nextLine();\n String date = input.nextLine();\n todoList.addTask(new Task(time,description,date));\n System.out.println(time + \" \" + description + \" \" + date + \" \" + \"has been added.\");\n }", "public void addTask(View v) {\n EditText field = (EditText) findViewById(R.id.list_edittext);\n String task = field.getText().toString().trim();\n\n // Do not add empty tasks\n if(!task.equals(\"\")) {\n database.addTask(task);\n field.setText(\"\");\n Toast.makeText(this, String.format(getResources().getString(R.string.list_add_toast),\n task), Toast.LENGTH_LONG).show();\n }\n }", "public static void testAddTask(final Todoist todo, final String[] tokens) {\n try {\n todo.addTask(createTask(tokens));\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }", "public static void testAddTask(final Todoist todo, final String[] tokens) {\n try {\n todo.addTask(createTask(tokens));\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }", "void addToList(Task task) throws InvalidCommandException;", "@Override\n\tpublic void addTask(ISimpleTask task) {\n\t\ttry {\n\t\t\tqueue.put(task);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void addElement(DemoTask task) {\n\t\tdata.add(task);\n\t}", "public void addTask(Task newTask) {\n recordedTask.add(newTask);\n updateTaskToFile();\n }", "@PreAuthorize(\"hasRole('ADMIN') or hasRole('DBA')\")\n\t@PostMapping(value=\"/add\",consumes= { MediaType.APPLICATION_JSON_VALUE },produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic StatusDTO addtask(@RequestBody TaskDTO task)\n\t{\n\t\ttaskService.addTask(task);\n\t\tStatusDTO status = new StatusDTO();\n\t\tstatus.setMessage(\"Task added successfully\");\n\t\tstatus.setStatus(200);\n\t\treturn status;\n\t\t\n\t}", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public long addTask(Task taskObj, ContentData cData) throws CannotAddTaskException {\n OrganizationalEntity orgOBj = taskObj.getTaskData().getCreatedBy();\n checkAndSetTempOrgEntitySet(orgOBj);\n checkAndSetListOfOrgEntities(taskObj.getPeopleAssignments().getPotentialOwners());\n \n TaskServiceSession taskSession = null;\n try {\n taskSession = taskService.createSession();\n taskSession.addTask(taskObj, cData);\n int sessionId = taskObj.getTaskData().getProcessSessionId();\n eventSupport.fireTaskAdded(taskObj, cData);\n return taskObj.getId();\n }finally {\n if(taskSession != null)\n taskSession.dispose();\n }\n }", "void addSubTask(AuctionTask task);", "public synchronized void addTask(AnimatorTask task) {\r\n\r\n\t\tif (!running) {\r\n\t\t\ttasks.add(task);\r\n\t\t}\r\n\t}", "public void AddTaskToDB(View view){\n\t\tif (TASK_CREATED == true){\n\t\t\tString name = taskName.getText().toString();\n\t\t\tString desc = taskDescription.getText().toString();\n//\t\t\tlong millisecondsToReminder = 0;\n\t\t\tlong millisecondsToCreated = 0;\n//\t\t\tyear = taskDatePicker.getYear();\n//\t\t\tmonth = taskDatePicker.getMonth() + 1;\n//\t\t\tday = taskDatePicker.getDayOfMonth();\n//\t\t\thour = taskTimePicker.getCurrentHour();\n//\t\t\tminute = taskTimePicker.getCurrentMinute();\n\t\t\ttry {\n\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\tDate dateCreated = cal.getTime();\n\t\t\t\tmillisecondsToCreated = dateCreated.getTime();\n//\t\t\t\tString dateToParse = day + \"-\" + month + \"-\" + year + \" \" + hour + \":\" + minute;\n//\t\t\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"d-M-yyyy hh:mm\");\n//\t\t\t\tDate date = dateFormatter.parse(dateToParse);\n//\t\t\t\tmillisecondsToReminder = date.getTime();\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} // You will need try/catch around this\n\n\t\t\tBujoDbHandler taskHandler = new BujoDbHandler(view.getContext());\n\t\t\tcurrentTask = new Task(name, desc, millisecondsToCreated);\n\t\t\ttaskHandler.addTask(currentTask);\n\t\t}\n\t}", "public void addTask(String type, String name) {\n Task taskToAdd = new Task(type, name);\n storage.add(taskToAdd);\n if (taskToAdd.hasDate()) {\n if (!dateStorage.containsKey(taskToAdd.getDate())) {\n dateStorage.put(taskToAdd.getDate(), new ArrayList<>());\n }\n dateStorage.get(taskToAdd.getDate()).add(taskToAdd);\n }\n taskAdded(taskToAdd, storage);\n }", "public static void add(Tasks currentTask) {\n tasks.add(currentTask);\n tasksCount++;\n }", "long addTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n double time;\n\n ContentValues values = new ContentValues();\n values.put(KEY_INFO, task.getInfo()); // task info\n if (task.calendarExists()) {\n time = task.getCalendar().getTimeInMillis();\n } else {\n time = 0;\n }\n values.put(KEY_CALENDAR, time); // Task calendar\n values.put(KEY_LATITUDE, task.getLatitude());\n values.put(KEY_LONGITUDE, task.getLongitude());\n\n // Inserting Row\n long id;\n id = db.insert(TABLE_TASKS, null, values);\n Log.d(TAG, \"ID: \" + Long.toString(id));\n db.close(); // Closing database connection\n return id;\n }", "@Override\n public CommandResult execute() {\n tasks.add(taskToAdd);\n try {\n storage.appendToFile(taskToAdd);\n return new CommandResult(String.format(MESSAGE_SUCCESS, taskToAdd));\n } catch (IOException e) {\n return new CommandResult(e.getMessage());\n }\n }", "public String addTask(Task t) {\n tasks.add(t);\n return tasks.get(tasks.size() - 1).toString();\n }", "@Override\n public boolean add(Task task) {\n return tasks.add(task);\n }", "public void addTask(final BTask t) {\n\t\tbloc.addLast(t);\n\t}", "public long addTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_TASKNAME, task.getTaskName()); // task name\n // status of task- can be 0 for not done and 1 for done\n values.put(KEY_STATUS, task.getStatus());\n values.put(KEY_DATE,task.getDateAt());\n\n // Inserting Row\n long task_id= db.insert(TABLE_TASKS, null, values);\n // insert row\n\n return task_id;\n\n }", "public void addCommandMutable(ListItem task) {\n this.listItems.add(task);\n }", "int insertTask(TaskInfo taskInfo);", "void addDoneTask(Task task);", "private void addTask(ToDoList toDoList, JSONObject jsonObject) {\n String name = jsonObject.getString(\"title\");\n LocalDate dueDate = LocalDate.parse(jsonObject.getString(\"dueDate\"));\n boolean complete = jsonObject.getBoolean(\"complete\");\n boolean important = jsonObject.getBoolean(\"important\");\n Task newTask = new Task(name, dueDate);\n newTask.setComplete(complete);\n newTask.setImportant(important);\n\n toDoList.addTask(newTask);\n }", "public void addUser(User user);", "void put(TaskEntity userEntity);", "void addUser(User user);", "void addUser(User user);", "void addTasks(List<Task> tasks);", "public static void addTask(ArrayList<Task> taskList) {\n // String response; // String variable for user's input\n Task task; // declaring the temporary task variable for the user's task\n do { // do while loop for preventing the user from entering a label longer than 20 characters\n System.out.print(\"Task (max 20 char.): \"); // prompting the user for task label\n response = input.nextLine(); // receiving user input\n } while (response.length() > 20); // runs until they enter a valid input\n \n if (response.equals(\"\") || response.equals(\" \")) { // if they left the label blank\n task = new Task();\n } else {\n task = new Task(response);\n }\n System.out.print(\"Task added.\"); // tells the user that adding the task was successful\n System.out.println(\"\\n\"); // prints a newline for formatting\n taskList.add(task); // adds task to the task list\n pause(); // pauses the screen\n }", "@Override\n\tpublic void addScheduleTask(ScheduleTask st) {\n\t\tscheduleTaskDAO.add(st);\n\t}", "public void addUser(User user) {\n\t\t\r\n\t}", "public void add(MiningTask mt) {\n miningTasks.add(mt);\n }", "public AddCommand(Task task){\r\n this.task = task;\r\n }", "public void addUser(UserModel user);", "public Task createTask(long userId, String description, String groupId, String dueTimeStr, int priority, String labels, \n\t\t\tString parentId, long owner);", "@FXML\n void addTaskClicked(ActionEvent event)\n {\n createTask();\n }", "private void addTask(JPanel panel,Tasks task){\n Task taskPane = new Task(task, this.agenda.getConnector());\n this.setUpSize(taskPane,1920,50,AgendaConstants.ALL);\n panel.add(taskPane);\n if(add) {\n agenda.getConnector().addTask(task);\n }\n this.updateComponent(panel);\n }", "@Override\n public CreateFuotaTaskResult createFuotaTask(CreateFuotaTaskRequest request) {\n request = beforeClientExecution(request);\n return executeCreateFuotaTask(request);\n }", "public void addTask(View view) {\n // Model of the list data\n ListModel model = ListModel.getInstance();\n\n // String for the date in \"mm/dd/yyyy\" format\n String date;\n\n // Get the name of the task\n EditText text = (EditText) findViewById(R.id.taskInput);\n String taskName = text.getText().toString();\n\n // Add list to model\n model.addTask(listName, taskName);\n\n\n // Return to the single list activity\n Log.i(TAG, \"Creating intent to return to the single list activity\");\n Intent intent = new Intent(this, SingleListActivity.class);\n intent.putExtra(Extra.LIST, listName);\n Log.i(TAG, \"Intent created with extra message (list name).\");\n Log.i(TAG, \"Starting single list activity\");\n startActivity(intent);\n }", "void claimTask(String userId, Long taskId);", "public void addUser(User user){\r\n users.add(user);\r\n }", "@Override\n\tpublic void add(ScheduleTask st) {\n\t\tsave(st);\n\n\t}", "public void addTaskListener(TaskListener task){\n initListener();\n listeners.add(task);\n }", "private static void addTask() {\n Task task = new Task();\n System.out.println(\"Podaj tytuł zadania\");\n task.setTitle(scanner.nextLine());\n System.out.println(\"Podaj datę wykonania zadania (yyyy-mm-dd)\");\n\n while (true) {\n try {\n LocalDate parse = LocalDate.parse(scanner.nextLine(), DateTimeFormatter.ISO_LOCAL_DATE);\n task.setExecuteDate(parse);\n break;\n } catch (DateTimeParseException e) {\n System.out.println(\"Nieprawidłowy format daty. Spróbuj YYYY-MM-DD\");\n }\n }\n\n task.setCreationDate(LocalDate.now());\n\n queue.offer(task);\n System.out.println(\"tutuaj\");\n }", "@Override\n public CompletableFuture<Void> addTask(String queueName, GarbageCollector.TaskInfo task) {\n Preconditions.checkNotNull(queueName, \"queueName\");\n Preconditions.checkNotNull(task, \"task\");\n try {\n val processor = eventProcessorMap.get(queueName);\n Preconditions.checkArgument(null != processor, \"Attempt to add to non existent queue (%s).\", queueName);\n return Futures.toVoid(processor.add(SERIALIZER.serialize(task), Duration.ofMillis(1000)));\n } catch (Throwable e) {\n return CompletableFuture.failedFuture(e);\n }\n }", "Task<?> addInvitationForSendingUser(Invitation invitation);", "public User_Task createUser_Task(String usertaskid, long user_task, long task_task, Date lastupdate, int status) {\r\n\t\t\t\tContentValues values = new ContentValues();\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKUSERFID,user_task);\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKTASKFID, task_task);\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKLASTUPDATE, lastupdate.toString());\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKSTATUS, status);\r\n\t\t\t\t\r\n\t\t\t\tString[] str = {usertaskid};\r\n\t\t\t\t\r\n\t\t\t\tint affectedRows = database.update(MySQLHelper.TABLE_USER_TASK,\r\n\t\t\t\t\t\tvalues, MySQLHelper.COLUMN_USERTASKID + \" = ?\",\r\n\t\t\t\t\t\tstr);\r\n\t\t\t\t\r\n\t\t\t\tif (affectedRows == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tCursor cursor = database.query(MySQLHelper.TABLE_USER_TASK,\r\n\t\t\t\t\t allColumns, MySQLHelper.COLUMN_USERTASKID + \" = \" + usertaskid, null,\r\n\t\t\t\t\t null, null, null);\r\n\t\t\t\t\t cursor.moveToFirst();\r\n\t\t\t\t\t User_Task newUser_Task = cursorToUser_Task(cursor);\r\n\t\t\t\t\t cursor.close();\r\n\t\t\t\t\t return newUser_Task;\r\n\t\t\t \r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKID, usertaskid);\r\n\t\t\t\t\tlong insertId = database.insert(MySQLHelper.TABLE_USER_TASK, null,\r\n\t\t\t\t\t values);\r\n\t\t\t\t\t Cursor cursor = database.query(MySQLHelper.TABLE_USER_TASK,\r\n\t\t\t\t\t allColumns, MySQLHelper.COLUMN_USERTASKID + \" = \" + insertId, null,\r\n\t\t\t\t\t null, null, null);\r\n\t\t\t\t\t cursor.moveToFirst();\r\n\t\t\t\t\t User_Task newUser_Task = cursorToUser_Task(cursor);\r\n\t\t\t\t\t cursor.close();\r\n\t\t\t\t\t return newUser_Task;\r\n\t\t\t\t}\r\n\t\t\t}", "public void add(User user) {\r\n this.UserList.add(user);\r\n }", "private void newTask()\n {\n \t//TODO add alarm\n \tTask task = new Task(taskName.getText().toString(), taskDetails.getText().toString());\n \tdb.createTask(task);\n \t//TODO Tie notification to an alarm\n \t//Create notification\n \tIntent notifyIntent = new Intent(this, TaskNotification.class);\n \tnotifyIntent.putExtra(\"title\", task.name); //add title name\n \tnotifyIntent.putExtra(\"id\", (int) task.id); //add id\n \tstartActivity(notifyIntent); //create the intent\n \t\n \trefreshData();\n }", "public String add() {\r\n\t\tuserAdd = new User();\r\n\t\treturn \"add\";\r\n\t}", "public void createTask()\n {\n boolean copy = false;\n if(check.checkTask(taskName.getText()))\n {\n // Go through list and make sure task isnt already there\n // If there is one already in list, then tell user there it is on list\n if(!(Item.getToDoList().isEmpty()))\n {\n for(Item task : Item.getToDoList())\n {\n if(task.getTask().equals(taskName.getText()))\n {\n status.setText(\"Task is already on the list. \");\n copy = true;\n }\n }\n\n if(!copy)\n {\n // If not copy, add the task to the list by calling method\n addTaskAndDisplay(taskName.getText(), completionDate.getText(), taskCompletedCheckBox.isSelected());\n }\n }\n\n // If list is empty, then no need to check if task is copy\n else\n {\n addTaskAndDisplay(taskName.getText(), completionDate.getText(), taskCompletedCheckBox.isSelected());\n }\n\n }\n\n // If task is invalid, alert user\n else\n {\n status.setText(\"Task invalid. Try again. \");\n }\n\n }", "public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }", "public void createTask(){\n final String name = newTaskNameField.getText().toString();\n final String description = newTaskDescriptionField.getText().toString();\n\n if (name.isEmpty()){\n newTaskNameField.setText(\"Please Enter a name\");\n newTaskNameField.requestFocus();\n newTaskNameField.selectAll();\n return;\n }\n\n if (description.isEmpty()){\n newTaskDescriptionField.setText(\"Please Enter a Description\");\n newTaskDescriptionField.requestFocus();\n newTaskDescriptionField.selectAll();\n return;\n }\n\n if(!getValidDate(newtaskDateField.getText().toString())) {\n handleInvalidDate();\n return;\n }\n\n if(newTaskAssignee == null) {\n newTaskAssigneeField.setText(\"Please assign a user\");\n newTaskAssigneeField.selectAll();\n return;\n }\n\n TaskManager.sharedInstance().CreateTask(name, description, newTaskAssignee, DueDate, false);\n newTaskDialog.dismiss();\n }", "public Task getTaskToAdd() {\n return taskToAdd;\n }", "TaskDetail add() {\n taskDetails.put(task, this);\n return this;\n }", "public void addItemToList(String task, String completionDate, boolean completed)\n {\n Item.getToDoList().add(new Item(task, completionDate, completed));\n }", "public int addTask(Item item) {\n try (Session session = this.factory.openSession()) {\n session.beginTransaction();\n session.save(item);\n session.getTransaction().commit();\n } catch (Exception e) {\n this.factory.getCurrentSession().getTransaction().rollback();\n }\n return item.getId();\n }", "public Boolean assignTask(Task task, User user) {\r\n\t\t\r\n\t\tint time_block = 0;\r\n\t\tDate cur_date = new Date();\r\n\t\tDate end_date = new Date();\r\n\t\t\t\r\n\t\t/** rounds the estimated time to the nearest half hour */\r\n\t\tdouble task_len = roundEstimatedTimeToMinutes(task.getEstimatedTime());\r\n\r\n\t\t/** round up the suggested start time to the nearest half hour */\r\n\t\tcur_date = checkMin(roundUpTime(task.getSuggestedStartTime()));\r\n\t\t\r\n\t\t/** round down the suggested end time to the nearest half hour */\r\n\t\tend_date = checkMax(roundDownTime(task.getSuggestedEndTime()));\r\n\t\t\t\t\t\t\r\n\t\t/** iterate, checking for availability in half hour time blocks */\r\n\t\twhile(cur_date.before(end_date)) {\r\n\t\t\t\t\r\n\t\t\t/** if the user is available increase available time block by half hour\r\n\t\t\t * otherwise, reset available time block to 0 */\r\n\t\t\tif (isUserAvailable(user, cur_date)) {\r\n\t\t\t\ttime_block += halfhour_min;\r\n\t\t\t} else {\r\n\t\t\t\ttime_block = 0;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t/** adjust current time by half hour to test next time block */\r\n\t\t\tcur_date.setTime(cur_date.getTime() + halfhour_ms);\r\n\t\t\t\r\n\t\t\t/** if available time block == estimated task length, assign task */\r\n\t\t\tif (time_block == task_len) {\r\n\t\t\t\t\r\n\t\t\t\t/** adjust current time = (current time - task length) */\r\n\t\t\t\tcur_date = resetCurrentTimeByTaskLengh(cur_date, task_len);\r\n\t\t\t\t\r\n\t\t\t\t/** associate the task and user and update database */\r\n\t\t\t\ttask = assignTaskToUser(user, task, cur_date);\r\n\t\t\t\tTaskDao.getInstance().updateTask(task);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "@Override\n public void execute(TaskList tasks, Storage storage, Ui ui) throws IOException {\n Todo toAdd = new Todo(description, false);\n tasks.addTask(toAdd);\n storage.writeToData(toAdd, tasks.getNumberOfTasks());\n ui.acknowledgeAddCommand(toAdd, tasks.getNumberOfTasks());\n }", "public void creatTask(int uid,String title,String detail,int money,String type,int total_num,Timestamp end_time,String state);" ]
[ "0.7559337", "0.7349781", "0.7315991", "0.72923434", "0.72894424", "0.7270748", "0.7269865", "0.72222376", "0.72222376", "0.72222376", "0.7209485", "0.7190178", "0.7139542", "0.7130383", "0.70972836", "0.7008308", "0.69241375", "0.69127876", "0.68999153", "0.68763494", "0.68400913", "0.6784882", "0.67774034", "0.6730595", "0.67098397", "0.6696695", "0.66832626", "0.66719246", "0.6668772", "0.666313", "0.66133755", "0.6564624", "0.65514064", "0.64833724", "0.64771724", "0.64610577", "0.64211535", "0.6401979", "0.63986945", "0.63945735", "0.63864", "0.63864", "0.63720226", "0.63668346", "0.6366723", "0.6328661", "0.63185716", "0.6297824", "0.62486184", "0.6232585", "0.62114877", "0.6210967", "0.62035614", "0.6189706", "0.61818826", "0.6170365", "0.6166441", "0.6160096", "0.6153889", "0.6133597", "0.6133411", "0.6126633", "0.6124974", "0.608049", "0.6076481", "0.60711914", "0.60711914", "0.6031874", "0.60263497", "0.6008137", "0.6007073", "0.60027283", "0.60023254", "0.5997001", "0.5996416", "0.597154", "0.5970606", "0.59564286", "0.5947188", "0.5945313", "0.59129465", "0.59079784", "0.5899495", "0.5899332", "0.5889358", "0.58780944", "0.58760643", "0.58676785", "0.586324", "0.58612895", "0.5853862", "0.5833179", "0.5830907", "0.5822366", "0.577302", "0.57707644", "0.5752495", "0.5750591", "0.57505566", "0.5746249" ]
0.66107225
31
Update a task for the user.
boolean updateTask(Task updatedTask);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateTask(UserDto user);", "TaskResponse updateTask(TaskRequest taskRequest, Long taskId);", "@Override\n public UpdateFuotaTaskResult updateFuotaTask(UpdateFuotaTaskRequest request) {\n request = beforeClientExecution(request);\n return executeUpdateFuotaTask(request);\n }", "public int updateTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_TASKNAME, task.getTaskName());\n values.put(KEY_STATUS, task.getStatus());\n values.put(KEY_DATE,task.getDateAt());\n\n // updating row\n return db.update(TABLE_TASKS, values, KEY_ID + \" = ?\",\n new String[] { String.valueOf(task.getId()) });\n }", "public void updateTask() {}", "public Task update(Task item) {\n\t\t// set the user id (not sure this is where we should be doing this)\n\t\titem.setUserId(getUserId());\n\t\titem.setEmailAddress(getUserEmail());\n\t\tif (item.getDueDate() == null) {\n\t\t\tCalendar c = Calendar.getInstance();\n\t\t\tc.set(2011, 5, 11);\n\t\t\titem.setDueDate(c.getTime());\n\t\t}\n\t\tPersistenceManager pm = PMF.get().getPersistenceManager();\n\t\ttry {\n\t\t\tpm.makePersistent(item);\n\t\t\treturn item;\n\t\t} finally {\n\t\t\tpm.close();\n\t\t}\n\t}", "boolean updateActiveTask(Task task);", "public void updateTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n todoTaskGui(\"Update\", task);\r\n }\r\n }", "public void updateTask(int tid,String title,String detail,int money,String type,int total_num,int current_num,Timestamp start_time,Timestamp end_time,String state);", "public void updateTask(Task task){//needs to depend on row num\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID,task.getId());\n values.put(KEY_LABEL,task.getLabel());\n values.put(KEY_TIME, task.getTime());\n db.update(TABLE_NAME, values, KEY_ID+\" = ?\",\n new String[] { String.valueOf(task.getId()) });\n }", "public void editTask(String newTask) {\n task = newTask;\n }", "@SuppressWarnings(\"unchecked\")\r\n public UserPlanTask UserPlanTaskUpdate(long taskId, String TTitle, String TDescription, String TDate, Integer status) {\r\n session = sf.openSession();\r\n Transaction t = session.beginTransaction();\r\n UserPlanTask UpdateTaskList = (UserPlanTask) session.load(UserPlanTask.class, taskId);\r\n UpdateTaskList.setTTitle(TTitle);\r\n UpdateTaskList.setTDescription(TDescription);\r\n UpdateTaskList.setTDate(TDate);\r\n UpdateTaskList.setStatus(status);\r\n if (null != UpdateTaskList) {\r\n session.update(UpdateTaskList);\r\n }\r\n t.commit();\r\n session.close();\r\n sf.close();\r\n return UpdateTaskList;\r\n }", "private void updateTask(ICompositeCheatSheetTask task) {\n \t\tif (task==null || task != selectedTask) return;\n \t\tif ( task instanceof EditableTask) {\n \t\t\tEditableTask editable = (EditableTask)task;\n \t\t\tif (editable.getState() == ICompositeCheatSheetTask.IN_PROGRESS) {\n \t\t\t\tshowEditor(editable);\n \t\t\t\treturn;\n \t\t\t} else if (editable.isUnderReview()) {\n \t\t\t\tif (editable.getState() == ICompositeCheatSheetTask.COMPLETED) {\n \t\t\t\t\tshowEditor(editable);\n \t\t\t\t} else {\n \t\t\t\t\tendReview(editable);\n \t\t\t\t}\n \t\t\t\treturn;\n \t\t\t}\n \t\t} \n \t\tshowDescription(task);\n \t}", "void put(TaskEntity userEntity);", "public void update(User user);", "@Test\n\tpublic void updateTask() {\n\t\tfinal Date dueDate = new Date();\n\t\tfinal Template template = new Template(\"Template 1\");\n\t\ttemplate.addStep(new TemplateStep(\"Step 1\", 1.0));\n\t\tfinal Assignment asgn = new Assignment(\"Assignment 1\", dueDate, template);\n\t\tfinal Task task = new Task(\"Task 1\", 1, 1, asgn.getID());\n\t\tasgn.addTask(task);\n\t\t\n\t\tfinal String asgnId = asgn.getID();\n\t\t\n\t\ttry {\n\t\t\tStorageService.addTemplate(template);\n\t\t\tStorageService.addAssignment(asgn);\n\t\t} catch (final StorageServiceException e) {\n\t\t\tfail(e.getMessage());\n\t\t}\n\t\t\n\t\ttask.setPercentComplete(0.174);\n\t\tStorageService.updateTask(task);\n\t\t\n\t\tfinal Assignment afterAsgn = StorageService.getAssignment(asgnId);\n\t\tassertEquals(asgn.fullString(), afterAsgn.fullString());\n\t}", "@PostMapping(value=\"/{id}/edit\")\n public String editTask(@PathVariable(\"id\") Long id, @ModelAttribute @Valid Task task, Errors errors,\n Model model, @RequestParam Long projectId, @RequestParam Long userId) {\n task.setProject(projectService.findById(projectId));\n task.setUser(userService.findById(userId));\n\n if (errors.hasErrors()) {\n model.addAttribute(\"projects\", projectService.findAll());\n model.addAttribute(\"users\", userService.findAll());\n return EDIT_TASK_PAGE;\n }\n\n taskService.saveOne(task);\n\n return REDIRECT_TASK_PAGE;\n }", "@Test\n\tpublic void testUpdateTask() {\n\t}", "@PostMapping(value=\"/update\",consumes={MediaType.APPLICATION_JSON_VALUE},produces={MediaType.APPLICATION_JSON_VALUE})\n\t public StatusDTO updateTask(@RequestBody TaskDTO task){\n\t\t taskService.updateTask(task);\n\t\t StatusDTO status = new StatusDTO();\n\t status.setMessage(\"Task details updated successfully\");\n\t status.setStatus(200);\n\t return status;\n\t }", "@Override\r\n\tpublic void update(ExecuteTask executeTask) {\n\t\tString sql = \"UPDATE executetask SET et_comments = ? WHERE et_id = ?\";\r\n\t\tupdate(sql,executeTask.getComments(),executeTask.getId());\r\n\t}", "void updateUser(@Nonnull User user);", "void update(User user);", "void update(User user);", "public void updateTasks(List<Task> listOfTasks);", "private void updateAction(String taskId) {\n setupPrioritySpinner();\n try {\n QueryBuilder<Task, String> queryBuilder = taskDao.queryBuilder();\n taskForUpdate = taskDao.queryForFirst(queryBuilder.where().eq(Task.TASK_ID, taskId).prepare());\n mTitle.setText(taskForUpdate.getTitle());\n mDescription.setText(taskForUpdate.getDescription());\n mDate.setDate(taskForUpdate.getDate().getTime());\n mPriority.setSelection(taskForUpdate.getPriority());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void setTask(Task task) {\n this.task = task;\n }", "int updateByPrimaryKey(Task record);", "public boolean update(User u);", "public void updateTaskStatus(CaptureTask task, String status, String description) {\n\t\t\r\n\t}", "boolean setTask(UUID uuid, IAnimeTask task);", "void editTask(ReadOnlyTask taskToEdit, Name taskName, Date startDate, Date endDate, Priority priority,\n\t\t\tRecurrenceRate recurrenceRate);", "private void updateTask(String task_id, final String task, final String status, final int position){\n if(!preference.getAPI_KEY().isEmpty()){\n Call call = service.updateTask(preference.getAPI_KEY(), task_id, task, status);\n connection.request(call, new ResponseListener() {\n @Override\n public void onSuccess(String response) {\n Log.e(TAG, \"\"+response);\n list_task.get(position).setTask(task);\n list_task.get(position).setStatus(status);\n notifyDataSetChanged();\n }\n\n @Override\n public void onError(String error) {\n Log.e(TAG, \"\"+error);\n }\n });\n }else {\n Toast.makeText(context, \"please login to check data\", Toast.LENGTH_SHORT).show();\n }\n\n }", "int updateByPrimaryKey(_task record);", "public void updateUser(User user) {\n\t\t\r\n\t}", "public void onClick(View v) {\n Task task = new Task();\n task.setTask_id(key); // Use the generated key from the database as id.\n task.setMessage(editText.getText().toString());\n String rating = spinner.getSelectedItem().toString();\n task.setPriority(rating);\n\n // we need to convert our model into a Hashmap since Firebase cannot save custom classes.\n // String/ArrayList/Integer and Hashmap are the only supported types.\n Map<String, Object> childUpdates = new HashMap<>();\n childUpdates.put( key, task.toFirebaseObject());\n\n database.child(\"users\").child(currentUserID).child(\"taskList\").updateChildren(childUpdates, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError == null) {\n // Return to previous activity\n finish();\n }\n }\n });\n }", "@Override\n public boolean updateTask(String id,String name, String[] taskTypeNames, String state, HashMap inputParameter, HashMap outputParameter, String title, String subject, String description, String priority, String claimed) {\n boolean response = false;\n try {\n response = dataAccessTosca.updateTask(id, name, taskTypeNames, state, inputParameter ,outputParameter, title, subject, description, priority, claimed);\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return response;\n }", "@Override\r\n\tpublic void updateUser(TUsers tuser) {\n\t\tdao.updateUser(tuser);\r\n\t}", "public void setTask(Task inTask){\n punchTask = inTask;\n }", "public User updateUser(User user);", "public void updateUser(Person user) {\n\t\t\n\t}", "public void updateToDone(int _id) {\n\n ContentValues values = new ContentValues();\n String date = DateFormat.getDateInstance().format(new Date());\n\n values.put(\"dateDone\", date);\n values.put(\"done\", 1);\n\n getWritableDatabase().update(\"tasks\", values, \"_id = '\"+_id+\"'\", null);\n }", "public static boolean updateTask(String taskName, String taskColour, Task task){\n String previousName = task.getName(); // Get information of the task up for editing\n Color previousColor = task.getColor();\n try{\n String query = \"UPDATE TASK SET NAME = ?, COLOUR = ? WHERE (NAME = ? AND COLOUR = ? AND DATE = ?)\"; // Setup query for task\n PreparedStatement statement = DatabaseHandler.getConnection().prepareStatement(query); // Setup statement for query\n statement.setString(1, taskName); // Add new values to the statement\n statement.setString(2, taskColour);\n statement.setString(3, previousName); // Add old values to the statement\n statement.setString(4, previousColor.toString());\n statement.setString(5, Calendar.selectedDay.getDate().toString());\n int result = statement.executeUpdate(); // send out the statement\n if (result > 0) // If it was successful, reload the task list.\n {\n getMainController().loadTasks();\n }\n return (result > 0);\n } catch (SQLException e) { // If task was unable to be edited\n e.printStackTrace(); // Create alert for failing to edit\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setHeaderText(null);\n alert.setContentText(\"Unable to edit task.\");\n alert.showAndWait();\n }\n return false;\n }", "void updateTaskHours(int id, float hours);", "int updateUserById( User user);", "public void updateTaskDetailsInDB(UniverseDefinitionTaskParams taskParams) {\n getRunnableTask().setTaskDetails(RedactingService.filterSecretFields(Json.toJson(taskParams)));\n }", "void refreshTaskInformation();", "@Test\n public void updateTaskAndGetById() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When the task is updated\n Task updatedTask = new Task(\"title2\", \"description2\", \"id\", true);\n mDatabase.taskDao().updateTask(updatedTask);\n\n // When getting the task by id from the database\n Task loaded = mDatabase.taskDao().getTaskById(\"id\");\n\n // The loaded data contains the expected values\n assertTask(loaded, \"id\", \"title2\", \"description2\", true);\n }", "void updateTaskName(int id, String name);", "void updateTaskDueDate(int id, LocalDateTime dueDate);", "public Boolean assignTask(Task task, User user) {\r\n\t\t\r\n\t\tint time_block = 0;\r\n\t\tDate cur_date = new Date();\r\n\t\tDate end_date = new Date();\r\n\t\t\t\r\n\t\t/** rounds the estimated time to the nearest half hour */\r\n\t\tdouble task_len = roundEstimatedTimeToMinutes(task.getEstimatedTime());\r\n\r\n\t\t/** round up the suggested start time to the nearest half hour */\r\n\t\tcur_date = checkMin(roundUpTime(task.getSuggestedStartTime()));\r\n\t\t\r\n\t\t/** round down the suggested end time to the nearest half hour */\r\n\t\tend_date = checkMax(roundDownTime(task.getSuggestedEndTime()));\r\n\t\t\t\t\t\t\r\n\t\t/** iterate, checking for availability in half hour time blocks */\r\n\t\twhile(cur_date.before(end_date)) {\r\n\t\t\t\t\r\n\t\t\t/** if the user is available increase available time block by half hour\r\n\t\t\t * otherwise, reset available time block to 0 */\r\n\t\t\tif (isUserAvailable(user, cur_date)) {\r\n\t\t\t\ttime_block += halfhour_min;\r\n\t\t\t} else {\r\n\t\t\t\ttime_block = 0;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t/** adjust current time by half hour to test next time block */\r\n\t\t\tcur_date.setTime(cur_date.getTime() + halfhour_ms);\r\n\t\t\t\r\n\t\t\t/** if available time block == estimated task length, assign task */\r\n\t\t\tif (time_block == task_len) {\r\n\t\t\t\t\r\n\t\t\t\t/** adjust current time = (current time - task length) */\r\n\t\t\t\tcur_date = resetCurrentTimeByTaskLengh(cur_date, task_len);\r\n\t\t\t\t\r\n\t\t\t\t/** associate the task and user and update database */\r\n\t\t\t\ttask = assignTaskToUser(user, task, cur_date);\r\n\t\t\t\tTaskDao.getInstance().updateTask(task);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public void setTask(TaskDTO task) {\n\t\tthis.task = task;\r\n\t\t\r\n\t\t\r\n\t}", "public User_Task createUser_Task(String usertaskid, long user_task, long task_task, Date lastupdate, int status) {\r\n\t\t\t\tContentValues values = new ContentValues();\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKUSERFID,user_task);\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKTASKFID, task_task);\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKLASTUPDATE, lastupdate.toString());\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKSTATUS, status);\r\n\t\t\t\t\r\n\t\t\t\tString[] str = {usertaskid};\r\n\t\t\t\t\r\n\t\t\t\tint affectedRows = database.update(MySQLHelper.TABLE_USER_TASK,\r\n\t\t\t\t\t\tvalues, MySQLHelper.COLUMN_USERTASKID + \" = ?\",\r\n\t\t\t\t\t\tstr);\r\n\t\t\t\t\r\n\t\t\t\tif (affectedRows == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tCursor cursor = database.query(MySQLHelper.TABLE_USER_TASK,\r\n\t\t\t\t\t allColumns, MySQLHelper.COLUMN_USERTASKID + \" = \" + usertaskid, null,\r\n\t\t\t\t\t null, null, null);\r\n\t\t\t\t\t cursor.moveToFirst();\r\n\t\t\t\t\t User_Task newUser_Task = cursorToUser_Task(cursor);\r\n\t\t\t\t\t cursor.close();\r\n\t\t\t\t\t return newUser_Task;\r\n\t\t\t \r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKID, usertaskid);\r\n\t\t\t\t\tlong insertId = database.insert(MySQLHelper.TABLE_USER_TASK, null,\r\n\t\t\t\t\t values);\r\n\t\t\t\t\t Cursor cursor = database.query(MySQLHelper.TABLE_USER_TASK,\r\n\t\t\t\t\t allColumns, MySQLHelper.COLUMN_USERTASKID + \" = \" + insertId, null,\r\n\t\t\t\t\t null, null, null);\r\n\t\t\t\t\t cursor.moveToFirst();\r\n\t\t\t\t\t User_Task newUser_Task = cursorToUser_Task(cursor);\r\n\t\t\t\t\t cursor.close();\r\n\t\t\t\t\t return newUser_Task;\r\n\t\t\t\t}\r\n\t\t\t}", "public void updateTaskVoteNotification(final Long taskId, final Long voterUserId, final RateDirection direction) {\n\t\ttaskExecutor.execute(new AsyncWebTask(notificationDao.getSessionFactory()) {\n\t\t\tpublic void runInBackground() {\n\t\t\t\tNotificationType previousNotificationType;\n\t\t\t\tNotificationType newNotificationType;\n\n\t\t\t\tTask task = (Task) getSession().get(Task.class, taskId);\n\t\t\t\tUser source = (User) getSession().get(User.class, voterUserId);\n\t\t\t\tUser receiver = task.getOwner();\n\n\t\t\t\tif (direction == RateDirection.UP) {\n\t\t\t\t\tpreviousNotificationType = NotificationType.TASK_DOWNVOTE;\n\t\t\t\t\tnewNotificationType = NotificationType.TASK_UPVOTE;\n\t\t\t\t} else {\n\t\t\t\t\tpreviousNotificationType = NotificationType.TASK_UPVOTE;\n\t\t\t\t\tnewNotificationType = NotificationType.TASK_DOWNVOTE;\n\t\t\t\t}\n\n\t\t\t\tNotification notification = notificationDao.findNotification(getSession(), receiver.getId(), source.getId(), task.getId(), previousNotificationType);\n\n\t\t\t\tif (notification != null) {\n\t\t\t\t\tnotification.setType(newNotificationType);\n\t\t\t\t\tnotificationDao.updateNotification(getSession(), notification);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public String update() {\r\n\t\tuserService.update(userEdit);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"update\";\r\n\t}", "public void updateUser(String name, String group, boolean taskDone, User oldUser) {\n User user = new User(name, Integer.parseInt(group), taskDone);\n userController.updateUser(oldUser, user);\n tableList.updateSelectionRow(user.getName(), user.getGroup().toString(), taskDone);\n }", "ResponseMessage updateUser(final User user);", "public void update(User obj) {\n\t\t\n\t}", "public String updateUser(){\n\t\tusersservice.update(usersId, username, password, department, role, post, positionId);\n\t\treturn \"Success\";\n\t}", "public void onUpdateButtonClick() {\n androidUserService.updateUser(userLoc.getUser().getId())\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe();\n }", "@Override\n public boolean updateUser(User user) {\n return controller.updateUser(user);\n }", "@Override\n\tpublic void updateUser(User user)\n\t{\n\n\t}", "ManageUserResponse updateUser(UserUpdateRequest user, Long userId);", "public void updateTaskModifiedTime(String taskId){\r\n dao = (TaskManagerDao) getDao();\r\n try {\r\n dao.updateTaskModifiedTime(taskId);\r\n } catch (DaoException e) {\r\n Log.getLog(getClass()).error(\"error updating modifiedTime of TaskId: \" + taskId);\r\n }\r\n }", "public Account update(Account user);", "public User update(User updatedInfo);", "@Override\n public Mono<BaseSingleInterface.BaseTask<Task>> updateProjectTask(Long code, String columnName, Task task) {\n Query updateQuery = new Query(where(\"code\").is(code).and(\"columns.name\").is(columnName).and(\"columns.tasks.name\").is(task.getName()));\n Update update = new Update().set(\"columns.$[columnIndex].tasks.$\", task).filterArray(Criteria.where(\"columnIndex.name\").is(columnName));\n return template.updateMulti(updateQuery, update, Project.class)\n .filter(result -> result.getModifiedCount() > 0)\n .flatMap(result -> findByProjectColumnTaskName(code, columnName, task.getName(), Pageable.unpaged()));\n }", "void claimTask(String userId, Long taskId);", "public void completeTask()\n throws NumberFormatException, NullPointerException, IndexOutOfBoundsException {\n System.out.println(LINEBAR);\n try {\n int taskNumber = Integer.parseInt(userIn.split(\" \")[TASK_NUMBER]);\n\n int taskIndex = taskNumber - 1;\n\n tasks.get(taskIndex).markAsDone();\n storage.updateFile(tasks.TaskList);\n System.out.println(\"Bueno! The following task is marked as done: \\n\" + tasks.get(taskIndex));\n } catch (NumberFormatException e) {\n ui.printNumberFormatException();\n } catch (NullPointerException e) {\n ui.printNullPtrException();\n } catch (IndexOutOfBoundsException e) {\n ui.printIndexOOBException();\n }\n System.out.println(LINEBAR);\n }", "public void setTaskInstance(Task taskInstance) {\n\t\tthis.taskInstance = taskInstance;\n\t}", "public String editTask(TasksModel obj)\n\t{\n\t\tString memo=\"\"; \n\t\tif(obj.getMemo()!=null)\n\t\t{\n\t\t\tmemo=obj.getMemo().replaceAll(\"'\",\"`\");\n\t\t}\n\t\tobj.setMemo(memo);\n\t\t\n\t\tString commnets=\"\"; \n\t\tif(obj.getComments()!=null)\n\t\t{\n\t\t\tcommnets=obj.getComments().replaceAll(\"'\",\"`\");\n\t\t}\n\t\tobj.setComments(commnets);\n\t\t\t\n\t\tString stepsToReproduce=\"\"; \n\t\tif(obj.getTaskStep()!=null)\n\t\t{\n\t\t\tstepsToReproduce=obj.getTaskStep().replaceAll(\"'\",\"`\");\n\t\t}\n\t\tobj.setTaskStep(stepsToReproduce);\n\t\tquery=new StringBuffer();\n\t\tquery.append(\"Update tasks set customerType='\"+obj.getClientType()+\"',taskNo='\"+obj.getTaskNumber()+\"',tasktype=\"+obj.getTaskTypeId()+\",expectedDateTofinsh='\"+sdf.format(obj.getExpectedDatetofinish())+\"',reminderDate='\"+sdf.format(obj.getReminderDate())+\"',toBeReminderIn=\"+obj.getRemindIn()+\",taskName='\"+obj.getTaskName()+\"',steps='\"+obj.getTaskStep()+\"',linkid=\"+obj.getPrviousTaskLinkId()+\",customerrefKey=\"+obj.getCustomerRefKey()+\",\");\t\n\t\tquery.append(\"projectrefKey=\"+obj.getProjectKey()+\",servicerefKey=\"+obj.getSreviceId()+\",assignedUser=\"+obj.getEmployeeid()+\",ccemployeeKey=\"+obj.getCcEmployeeKey()+\",priorityrefKey=\"+obj.getPriorityRefKey()+\",estTime=\"+obj.getEstimatatedNumber()+\",memo='\"+obj.getMemo()+\"',actualTime=\"+obj.getActualNumber()+\",status=\"+obj.getStatusKey()+\",usercomments='\"+obj.getComments()+\"',hourOrDays='\"+obj.getHoursOrDays()+\"' where taskID=\"+obj.getTaskid()+\"\");\n\t\tquery.append(\" \");\n\t\treturn query.toString();\n\t}", "@Test\n public void updateCompletedAndGetById() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When the task is updated\n mDatabase.taskDao().updateCompleted(TASK.getId(), false);\n\n // When getting the task by id from the database\n Task loaded = mDatabase.taskDao().getTaskById(\"id\");\n\n // The loaded data contains the expected values\n assertTask(loaded, TASK.getId(), TASK.getTitle(), TASK.getDescription(), false);\n }", "public void update(User u) {\n\r\n\t}", "public void update(User user) {\n repository.update(user);\n }", "public void updateUser(long userID) {\n \t}", "void updateUserById(String username, User userData);", "int updateByPrimaryKey(TbCrmTask record);", "@Override\r\n\tpublic int update(PtHrUserBak t) {\n\t\treturn 0;\r\n\t}", "private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }", "private void showUpdateDialog(final Task task, final int position){\n final Dialog dialog = new Dialog(context);\n dialog.setContentView(R.layout.dialog_update_task);\n dialog.setTitle(\"Update Task\");\n\n final TextView edt_task = (TextView) dialog.findViewById(R.id.edt_task);\n final Spinner spinner_status = (Spinner) dialog.findViewById(R.id.spinner_status);\n\n Button btn_update_task = (Button) dialog.findViewById(R.id.btn_update_task);\n Button btn_cancel = (Button) dialog.findViewById(R.id.btn_cancel);\n\n\n dialog.show();\n\n btn_cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n btn_update_task.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String new_task = edt_task.getText().toString();\n int id = spinner_status.getSelectedItemPosition();\n if(new_task.trim().equalsIgnoreCase(task.getTask().trim())){\n Toast.makeText(context, \"task and status are same.\", Toast.LENGTH_SHORT).show();\n }else if(id == 0){\n Toast.makeText(context, \"Select a valid status.\", Toast.LENGTH_SHORT).show();\n }else {\n dialog.dismiss();\n updateTask(task.getId(), new_task, \"\"+id, position);\n }\n }\n });\n }", "@Override\n\tpublic boolean updateUser(Integer Id, User user) {\n\t\treturn false;\n\t}", "abstract ClusterTask getSessionUpdateTask();", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public TaskDef update(TaskDef taskEntity) {\n return TaskDefIntegrationService.update(taskEntity);\n }", "int updateByPrimaryKeySelective(_task record);", "@EventListener(condition = \"!#event.domainObject.new\")\n\tpublic void onApplicationEventLookForUpdate(DomainObjectStoreEvent<Task> event) {\n\t\tEditeTask editeTask = new EditeTask();\n\t\tediteTask.setId(UUID.randomUUID().toString());\n\t\tTask task = event.getDomainObject();\n\n\t\tfinal Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tfinal CustomUserDetails principal = ((CustomUserDetails) authentication.getPrincipal());\n\t\tUser cs = principal.getUser();\n\t\tif (cs.getIsAdmin()) {\n\t\t\treturn;\n\t\t}\n\n\t\tSet<String> set = task.getDirtyAttributes();\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tIterator iterator1 = set.iterator();\n\t\tList<String> list = new ArrayList<>();\n\t\twhile (iterator1.hasNext()) {\n\t\t\tlist.add((String) iterator1.next());\n\t\t}\n\n\t\tif (list.size() == 1 && list.contains(\"status\")) {\n\t\t\treturn;\n\t\t}\n\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tIterator iterator = set.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tString temp = (String) iterator.next();\n\t\t\tswitch (temp) {\n\t\t\tcase \"description\":\n\t\t\t\tediteTask.setDescription((String) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"deadline\":\n\t\t\t\tediteTask.setDeadline((LocalDateTime) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"type\":\n\t\t\t\tediteTask.setType((TaskType) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"project\":\n\t\t\t\tediteTask.setProject((Project) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"taskPerformer\":\n\t\t\t\tediteTask.setTaskPerformer((User) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tediteTask.setTaskId(task.getId());\n\t\tediteTaskRepository.save(editeTask);\n\t\tif (!cs.getIsAdmin()) {\n\t\t\ttask.setIsCheck(false);\n\t\t\ttask.setStatus(Status.CLOSED);\n\t\t} else {\n\t\t\ttask.setIsCheck(true);\n\t\t}\n\t}", "@Override\n\tpublic void updateUser(user theUser) {\n\t}", "@Override\n\tpublic void updateUser(User pUser) {\n\t\t\n\t}", "UpdateUserResult updateUser(UpdateUserRequest updateUserRequest);", "@Override\n\tpublic int update(Users t) {\n\t\treturn usersDAO.update(t);\n\t}", "@Test(dependsOnMethods = { \"testAssignTaskWithNegativeCase\" },\n description = \"podio {updateTask} integration test with optonal parameters.\")\n public void testUpdateTaskWithOptionalParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:updateTask\");\n \n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_updateTask_optional.json\");\n String taskId = esbRestResponse.getBody().getString(\"task_id\");\n \n String apiEndPoint = apiUrl + \"/task/\" + taskId;\n \n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getBody().getJSONObject(\"created_by\").getString(\"name\"), apiRestResponse\n .getBody().getJSONObject(\"created_by\").getString(\"name\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"text\"), apiRestResponse.getBody().getString(\"text\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"external_id\"),\n apiRestResponse.getBody().getString(\"external_id\"));\n }", "@Override\n\tpublic void updateByid(Teatask ta)\n\t{\n\t\tteataskMapper.updateByid(ta);\n\t}", "int updateByPrimaryKeySelective(Task record);", "@Override\n\tpublic void update(User objetc) {\n\t\tuserDao.update(objetc);\n\t}", "@Override\n public void saveTask(TaskEntity task) {\n this.save(task);\n }", "@Override\r\n\tpublic void update(Usuario t) {\n\t\t\r\n\t}", "public void update(T ob) throws ToDoListException;", "@Override\n public void onEditClick(Tasks tasks) {\n if(tasks!=null){\n taskEditRequest(tasks);\n }\n }", "public void updateTaskViews(){\n for (Task task : taskManager.getTasksList()){\n TextView textToChange = (TextView) root.findViewById(task.getIdInView());\n if (textToChange == null){\n submit(task.getName(), task.getIdInView(), task.getTimeForTask(), task.isFinished());\n } else {\n textToChange.setText(task.getName());\n }\n }\n }", "@Override\r\n\tpublic int update(SpUser t) {\n\t\treturn 0;\r\n\t}", "void updateUser(UserDTO user);", "public void setTask(PickingRequest task) {\n this.task = task;\n }" ]
[ "0.7824837", "0.7614304", "0.72031593", "0.7016346", "0.700975", "0.6766624", "0.6749875", "0.66795", "0.6612796", "0.6520695", "0.64460844", "0.64187795", "0.63728994", "0.6336083", "0.6313445", "0.62361395", "0.62125266", "0.6181676", "0.6125251", "0.6119675", "0.6106351", "0.6095408", "0.6095408", "0.6089423", "0.6088453", "0.6066738", "0.60123354", "0.6009192", "0.5979813", "0.5970739", "0.5958203", "0.5951748", "0.59294206", "0.5910812", "0.5901314", "0.58979803", "0.5896759", "0.58940095", "0.587974", "0.58715177", "0.5867685", "0.58594084", "0.58582157", "0.5781738", "0.57604045", "0.57510245", "0.5750688", "0.57456553", "0.5723988", "0.5690494", "0.5685359", "0.56738114", "0.56704646", "0.5658367", "0.565113", "0.56413376", "0.56331605", "0.5624449", "0.562319", "0.56098753", "0.56026065", "0.5584704", "0.5579154", "0.55769837", "0.5571168", "0.5561886", "0.5548805", "0.5548108", "0.55414075", "0.5530994", "0.55247194", "0.55204946", "0.5518786", "0.5511545", "0.55088717", "0.5504696", "0.5498441", "0.54970205", "0.54944426", "0.54902965", "0.54840946", "0.5478164", "0.5467653", "0.5462922", "0.5457261", "0.5455653", "0.5451115", "0.54390633", "0.543511", "0.54325444", "0.5427034", "0.5411413", "0.5411207", "0.5407219", "0.53870183", "0.53817797", "0.5381432", "0.53797215", "0.53763556", "0.5369218" ]
0.73062205
2
Delete a task for the user.
boolean deleteTask(Task task);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean deleteTask(long userId, String taskId);", "public void deleteTask(Task task) {\n database.delete(SQLiteHelper.TABLE_TASKS,\n SQLiteHelper.COLUMN_ID + \" = \" + task.get_id(), null);\n }", "@Override\n public DeleteFuotaTaskResult deleteFuotaTask(DeleteFuotaTaskRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteFuotaTask(request);\n }", "public void deleteTask(Task task)\n {\n tasks.remove(task);\n }", "public void deleteTask(Task task) {\n tasks.remove(task);\n }", "public void deleteTask(Integer tid);", "public void deleteTask(int userId, int taskId) {\n String query = \"DELETE FROM \" + Constant.TASKS_TABLE + \" WHERE \" + Constant.USERS_USERID + \"=?\" + \" AND \" + Constant.TASKS_TASKID + \"=?\";\n\n try {\n PreparedStatement preparedStatement = getDbConnection().prepareStatement(query);\n preparedStatement.setInt(1,userId);\n preparedStatement.setInt(2,taskId);\n preparedStatement.execute();\n preparedStatement.close();\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void deleteTask(Task task){\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME, KEY_ID + \" = ?\",\n new String[] { String.valueOf(task.getId()) });\n taskIndexReset();\n db.close();\n }", "public void deleteTask() throws NumberFormatException, NullPointerException, IndexOutOfBoundsException {\n System.out.println(LINEBAR);\n\n try {\n int taskNumber = Integer.parseInt(userIn.split(\" \")[TASK_NUMBER]);\n\n int taskIndex = taskNumber - 1;\n\n Task toBeDeleted = tasks.get(taskIndex);\n tasks.remove(taskIndex);\n storage.updateFile(tasks.TaskList);\n System.out.println(\n \"The following task has been deleted!\\n\" + toBeDeleted + \"\\n\");\n } catch (NumberFormatException e) {\n ui.printNumberFormatException();\n } catch (NullPointerException e) {\n ui.printNullPtrException();\n } catch (IndexOutOfBoundsException e) {\n ui.printIndexOOBException();\n }\n\n System.out.println(LINEBAR);\n\n }", "void deleteTask(int id);", "void deleteTask(ReadOnlyTask target) throws UniqueTaskList.TaskNotFoundException;", "public void deleteTask(long task_id) {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_TASKS, KEY_ID + \" = ?\",\n new String[] { String.valueOf(task_id) });\n }", "void deleteTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<Void> callback );", "@Override\r\n public void delete(DiagramTask task)\r\n {\r\n try\r\n {\r\n TASK_DAO.deleteTask(task.getId());\r\n addMessage(\"Success!\", \"Task deleted correctly.\");\r\n\r\n }\r\n catch (HibernateException e)\r\n {\r\n addMessage(\"Error!\", \"Please try again.\");\r\n Logger.getLogger(DiagramTaskBean.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n }", "int deleteByPrimaryKey(String taskid);", "public boolean delete(User user);", "public Result deleteTask(Long id) {\n Task.delete(id);\n return redirect(routes.TasksController.tasks()); \n }", "int deleteByPrimaryKey(Integer taskid);", "@RequestMapping(value = \"/tasks/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteTask(@PathVariable Long id) {\n log.debug(\"REST request to delete Task : {}\", id);\n taskService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"task\", id.toString())).build();\n }", "@Delete\n void delete(Task... task);", "boolean delete(User user);", "public boolean delete(int userId);", "void deleteUser(String userId);", "public void deleteUser(long userId);", "@SuppressWarnings(\"unchecked\")\r\n public UserPlanTask UserPlanTaskDelete(Long taskId) {\r\n session = sf.openSession();\r\n Transaction t = session.beginTransaction();\r\n\r\n UserPlanTask deleteList = (UserPlanTask) session.load(UserPlanTask.class, taskId);\r\n if (null != deleteList) {\r\n session.delete(deleteList);\r\n }\r\n t.commit();\r\n session.close();\r\n sf.close();\r\n return deleteList;\r\n }", "public void deleteTask(String item){\n SQLiteDatabase db = this.getWritableDatabase();\n db.execSQL(\"DELETE FROM ToDo where task='\"+item+\"'\");\n }", "public void deleteTask(long id){\n open(); // open the database\n database.delete(\"tasks\", \"_id=\" + id, null);\n close(); // close the database\n Log.v(TAG, \"deleteTask\");\n }", "public void deleteTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n myTodo.getTodo().remove(task.getHashKey());\r\n playSound(\"click.wav\");\r\n }\r\n todoListGui();\r\n }", "public void deleteUser(User userToDelete) throws Exception;", "void remove(final Task task);", "@Override\r\n\tpublic void deleteByTask(int taskId) {\n\t\tString sql = \"DELETE FROM executetask WHERE et_task_id = ?\";\r\n\t\tupdate(sql,taskId);\r\n\t}", "private CommandResult executeDeleteCommand(Command userCommand) {\n int taskNumber;\n String deletedTask;\n try {\n taskNumber = Integer.parseInt(userCommand.getCommandDescription());\n deletedTask = tasks.get(taskNumber - 1).toString();\n tasks.remove(taskNumber - 1);\n } catch (NumberFormatException | IndexOutOfBoundsException e) {\n return new CommandResult(userCommand, CommandResult.EXECUTION_FAIL, CommandResult.INVALID_NUMBER);\n }\n return new CommandResult(userCommand, CommandResult.EXECUTION_SUCCESS, deletedTask);\n }", "public void deleteTask() {\n\t\tsuper.deleteTask();\n\t\tif (mTaskDetailNavigator != null) {\n\t\t\tmTaskDetailNavigator.onTaskDeleted();\n\t\t}\n\t}", "@Override\n\tpublic void deleteByid(int taskid)\n\t{\n\t\tteataskMapper.deleteByid(taskid);\n\t}", "void deleteUndoneTask(ReadOnlyTask target) throws UniqueTaskList.TaskNotFoundException;", "public void deleteExercise(User user) {\n\n\t}", "void deleteUserById(Integer id);", "boolean delete(int id, int userId);", "public void delete(User usuario);", "void deleteUser(String deleteUserId);", "public void deleteUserById(Long userId);", "void delete(User user);", "void delete(User user);", "@Override\r\n\tpublic void delete(int memberId,int taskId) {\n\t\tString sql = \"DELETE FROM executetask WHERE et_member_id = ? and et_task_id = ?\";\r\n\t\tupdate(sql,memberId,taskId);\r\n\t}", "public void deleteTask(View v) {\n //grab the parent view of the DONE button\n View parent = (View)v.getParent();\n\n //grab the TextView from item_todo.xml\n TextView taskTextView = (TextView)parent.findViewById(R.id.taskTitle);\n String task = String.valueOf(taskTextView.getText());\n\n //a read/write database object will be returned\n SQLiteDatabase db = dbHelper.getWritableDatabase();\n\n //delete the entry in the database that matches the selected task\n db.delete(TaskContract.TaskEntry.TABLE,\n TaskContract.TaskEntry.COL_TASK_TITLE + \" =?\",\n new String[]{task});\n db.close(); //close the database object\n updateUI(); //update the look of the ListView\n }", "void deleteUserById(Long id);", "void deleteDoneTask(ReadOnlyTask floatingTask) throws TaskNotFoundException;", "public Boolean delete(int id) {\n \t\t//get the task for its user id\n \t\tString string = jedisConn.get(PENDING_TASK(String.valueOf(id)));\n \t\tGson gson = new Gson();\n \t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t// remove the task from the db\n \t\tLong del = jedisConn.del(PENDING_TASK(String.valueOf(id)));\n \t\t//remove the task from alltasks\n \t\tjedisConn.srem(ALL_TASKS, String.valueOf(id));\n \t\t//remove the task from users tasks\n\t\tjedisConn.srem(USER_TASKS(String.valueOf(task.getUserId())), String.valueOf(id));\n \t\tif (del == 1) {\n \t\t\treturn true;\n \t\t}\n \t\telse {\n \t\t\treturn false;\n \t\t}\n \t}", "public void delete(User user)throws Exception;", "void deleteUser(int id);", "public void delete(User user) {\n repository.delete(user);\n }", "int deleteByExample(TaskExample example);", "public void removeTask(ToDoTask t) {\n database.removeTask(t);\n Toast.makeText(this, String.format(getResources().getString(R.string.list_remove_toast),\n t.getTask()), Toast.LENGTH_LONG).show();\n }", "@DELETE(\"/task/{title}.json\")\n Call<Task> deleteTask(@Path(\"title\") String title);", "public boolean deleteTask(Task t) {\n return this.tasks.remove(t);\n }", "@Override\n public boolean deleteTask(String id) {\n boolean deleted = false;\n try {\n deleted = dataAccessTosca.deleteHumanTaskInstance(id);\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return deleted;\n }", "public User delete(String user);", "public static void delTask(ArrayList<Task> taskList) {\n // String response; // String variable for the user's input\n String prompt = \"delete\"; // initializing the type of prompt to the user\n int index = promptIndex(taskList, prompt); // prompting, receiving, and error checking the user's input\n if (index != -1) { // if there was not an invalid index value\n taskList.remove(index); // remove the element at this index\n }\n System.out.print(\"\\n\"); // printing a newline for formatting \n pause(); // pausing the screen\n }", "public User delete(User user);", "public boolean deleteUser(User user){\n DeleteUserTask deleteUserTask = new DeleteUserTask();\n deleteUserTask.execute(user);\n return true;\n }", "public static boolean deleteTask(Task task) {\n try{\n String query = \"DELETE FROM TASK WHERE (NAME=? AND COLOUR=? AND DATE=?)\"; // Setup query for task\n PreparedStatement statement = DatabaseHandler.getConnection().prepareStatement(query); // Setup statement for query\n statement.setString(1, task.getName()); // Add task's values to the statement\n statement.setString(2, task.getColor().toString());\n statement.setString(3, task.getDate().toString());\n int result = statement.executeUpdate(); // send out the statement\n getMainController().loadTasks();\n return (result > 0);\n } catch (SQLException e) { // If the task wasn't able to be deleted\n e.printStackTrace(); // Create alert for failing to delete\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setHeaderText(null);\n alert.setContentText(\"Unable to delete task.\");\n alert.showAndWait();\n }\n return false;\n }", "private String deleteTask(int location, TaskList tasks, Storage storage) throws DukeException {\n String response;\n int index = location - 1;\n if (index >= 0 && index < tasks.getLength()) {\n Task task = tasks.deleteTask(index);\n storage.updateFile(tasks);\n response = task + \"\\n\";\n } else {\n throw new DukeException(\"☹ OOPS!!! Input a valid index\");\n }\n return response;\n }", "public void deleteUser(int userid) {\n\t\t\n\t}", "public void deleteUser(String name);", "@Override\n\tpublic void deleteUser(User user)\n\t{\n\n\t}", "@Override\n\tpublic void delete(User entity) {\n\t\tuserlist.remove(String.valueOf(entity.getDni()));\n\t}", "public void deleteTask(int index) throws DukeException {\n this.tasks.remove(index);\n }", "public void deleteTask(int taskNumber) {\n assert taskNumber <= getNumTasks() && taskNumber > 0 : \"Task number should be valid\";\n tasks.remove(taskNumber - 1);\n }", "public static void deletedCommand(Task t) {\n UI.line();\n System.out.println(\"\\tNoted. I've removed this Task:\");\n System.out.println(\"\\t\" + t.toString());\n int count = 0;\n for (Object ignored : Tasks) {\n count++;\n }\n System.out.println(\"\\tNow you have \" + count + \" tasks in the list.\");\n UI.line();\n }", "public void delete(String username);", "@Override\n\tpublic void deleteUser(String userId) {\n\t\t\n\t}", "public void deleteUser(String username);", "@Override\n\tpublic void deleteUser(String id) throws Exception {\n\t\t\n\t}", "public void deleteUser(Integer id) throws BadRequestException;", "@Override\n public void delete(User user) {\n dao.delete(user);\n }", "public void removeTask(String removeTask) {\n \t\n \tSystem.out.println(\"Removing an existing Task\");\n \tint count = 0;\n \tTask deleteTask = null;\n \tfor(Task t : toDoList) {\n \t\tif(t.getTaskName().equals(removeTask)) {\n \t\t\t\n \t\t\tbreak;\n \t\t}\n \t\t\n \t\tcount++;\n \t}\n \tdeleteTask = toDoList.remove(count);\n \t\n \tif(deleteTask != null) {\n \t\tSystem.out.println(\"Task deleted successfully\");\n \t}\n \telse {\n \t\tSystem.out.println(\"Task not found\");\n \t}\n \tdisplay();\n }", "@DeleteMapping(\"/tasks/{id}\")\n public ResponseEntity<Map<String,Boolean>> deleteTask(@PathVariable Long id){\n Task task = taskRepository.findById(id)\n .orElseThrow(() -> new ResourceNotFoundException(\"Task not found with Id of \" + id));\n\n taskRepository.delete(task);\n Map<String,Boolean> response = new HashMap<>();\n response.put(\"deleted\", Boolean.TRUE);\n return ResponseEntity.ok(response);\n }", "@Override\n\tpublic void deleteUser(user theUser) {\n\t\t\n\t}", "@Override\n public boolean deleteUser(User user) {\n return controller.deleteUser(user);\n }", "int delTravelByIdUser(Long id_user);", "public String deleteUser(){\n\t\tusersservice.delete(usersId);\n\t\treturn \"Success\";\n\t}", "public int deleteTrouser(Trouser trouser) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n return db.delete(TrouserEntry.TABLE_NAME, TrouserEntry._ID + \" = ?\",\n new String[]{String.valueOf(trouser.getId())});\n }", "@GetMapping(\"/deleteFriend/{id}\")\n\tpublic String DeleteTask(@PathVariable(\"id\")Long fid) {\n\t\tthis.fServ.delete(fid);\n\t\treturn \"redirect:/tasks\";\n\t}", "@GetMapping(\"/deleteFriend/{id}\")\n\tpublic String DeleteTask(@PathVariable(\"id\")Long fid) {\n\t\tthis.fServ.delete(fid);\n\t\treturn \"redirect:/tasks\";\n\t}", "void deleteTrackerTasks(final Integer id);", "void removeSubTask(AuctionTask task);", "public static RestTask obtainDeleteTask(String url)\n throws IOException {\n HttpURLConnection connection = createDefaultConnection(url);\n attachAuthentication(connection);\n connection.setRequestMethod(\"DELETE\");\n connection.setDoInput(true);\n\n return new RestTask(connection);\n }", "@PreAuthorize(\"hasRole('ADMIN') or hasRole('DBA')\")\n\t@DeleteMapping(value=\"/delete/{taskId}\",produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic StatusDTO deleteTask(@PathVariable(\"taskId\") Integer taskId)\n\t{\n\t\ttaskService.deleteTask(taskId);\n\t\tStatusDTO status = new StatusDTO();\n\t\tstatus.setMessage(\"Task Status deleted successfully\");\n\t\tstatus.setStatus(200);\n\t\treturn status;\n\t}", "public static Task<Void> deleteUser(String userId) {\n Log.d(Const.TAG, \"deleteUser: deleting\");\n return FirebaseFirestore.getInstance()\n .collection(Const.USERS_COLLECTION)\n .document(userId)\n .delete();\n }", "@Override\r\n\tpublic int delete(User user) {\n\t\treturn 0;\r\n\t}", "public String execute(TaskList task, Ui ui, Storage storage) throws NullPointerException, IOException {\n try {\n Task toRemove = task.getList().remove(Integer.parseInt(temp[1]) - 1);\n storage.arrayToFile(task.getList());\n return ui.printRemove(task.getList(), toRemove);\n } catch (NullPointerException e) {\n return ui.printError(\"Please input a valid task number to delete.\");\n } catch (IndexOutOfBoundsException e) {\n return ui.printError(\"Please input a valid task number to delete.\");\n }\n }", "public void delete(User user){\n userRepository.delete(user);\n }", "public void deleteUser(User user) {\n\t\tdelete(user);\r\n\t}", "@Override\r\n\tpublic void delete(User user) {\n\t\tint iRet = dao.delete(user);\r\n\t\tif(iRet != 1){\r\n\t\t\tlogger.error(\"删除失败\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlogger.info(\"删除成功\");\r\n\t}", "public void deletetask(UserDto user);", "@DeleteMapping(\"/vehicle-tasks/{id}\")\n @Timed\n @Secured(AuthoritiesConstants.ADMIN)\n public ResponseEntity<Void> deleteVehicleTask(@PathVariable Long id) {\n log.debug(\"REST request to delete VehicleTask : {}\", id);\n vehicleTaskService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@Override\n\tpublic void delete(String userId) throws Exception {\n\t\tdao.delete(userId);\n\t}", "void deleteUser( String username );", "public void deleteUser(Integer uid);", "public void removeTask(Task task) {\n tasks.remove(task);\n }" ]
[ "0.7903824", "0.7442513", "0.7217369", "0.72128075", "0.7133448", "0.71169466", "0.7078131", "0.70499945", "0.7036107", "0.70330113", "0.688372", "0.68253905", "0.6815354", "0.67753613", "0.67486846", "0.6719363", "0.6685547", "0.66656524", "0.66336644", "0.66329813", "0.6597437", "0.65415096", "0.6537576", "0.6536314", "0.6532591", "0.6531943", "0.65081507", "0.6474529", "0.64659894", "0.6463217", "0.6459366", "0.64550656", "0.64524674", "0.63895756", "0.63790524", "0.6346044", "0.6338913", "0.633847", "0.63383734", "0.6331153", "0.63270223", "0.6326547", "0.6326547", "0.63115984", "0.62838644", "0.6282166", "0.6277226", "0.6266459", "0.62452227", "0.62407887", "0.6235102", "0.62313765", "0.62258065", "0.62183845", "0.62097037", "0.6209495", "0.6198656", "0.6189802", "0.61888504", "0.61598957", "0.6142138", "0.6133083", "0.60985816", "0.60830325", "0.60824174", "0.6080065", "0.60756093", "0.6051355", "0.6048613", "0.6037728", "0.6032519", "0.60264504", "0.6024656", "0.60164064", "0.60075134", "0.599968", "0.59845835", "0.59819806", "0.5980249", "0.5974406", "0.59719384", "0.59712094", "0.5964724", "0.5964724", "0.5963046", "0.5949397", "0.5937614", "0.5930447", "0.59302723", "0.592356", "0.5923242", "0.59215176", "0.59199125", "0.59196615", "0.59116924", "0.5910913", "0.5903331", "0.5885192", "0.587965", "0.58635885" ]
0.7395513
2
Retrieve the active task for the user.
@VisibleForTesting(otherwise = VisibleForTesting.NONE) LiveData<Task> getActiveTask();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ITask getTask() {\n \t\treturn task;\n \t}", "public Task getTask() {\n return task;\n }", "public Task getTask() {\n Long __key = this.TaskId;\n if (task__resolvedKey == null || !task__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n TaskDao targetDao = daoSession.getTaskDao();\n Task taskNew = targetDao.load(__key);\n synchronized (this) {\n task = taskNew;\n \ttask__resolvedKey = __key;\n }\n }\n return task;\n }", "public String getTask() {\n return task;\n }", "public String getTask() {\n return task;\n }", "public Task getTaskInstance() {\n\t\treturn taskInstance;\n\t}", "public Task getTask() { return task; }", "public List<TaskDescription> getActiveTasks();", "@SuppressWarnings(\"unchecked\")\n public List<Item> getActiveTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item where status = 0\").list();\n session.close();\n return list;\n }", "ObservableList<Task> getCurrentUserTaskList();", "public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\n }", "int getTask() {\n return task;\n }", "public Task getTask(Integer tid);", "public Task getClickedTask(int position) {\r\n\t\treturn taskList.get(position);\r\n\t}", "public static List<ITask> findWorkedTaskOfSessionUser() {\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, FINISHED_MODE, null);\r\n }", "Object getTaskId();", "public java.lang.Object getTaskID() {\n return taskID;\n }", "public int getCustTask()\n\t{\n\t\treturn task;\n\t}", "public Optional<PickingRequest> getTask() {\n return Optional.ofNullable(task);\n }", "public Active getActive() {\n return _active;\n }", "public Task getTask(String taskId) throws DaoException, DataObjectNotFoundException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId);\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n if(task!=null) {\r\n //Task task = (Task)col.iterator().next();\r\n //task.setLastModifiedBy(UserUtil.getUser(task.getLastModifiedBy()).getName());\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(dao.selectReassignments(taskId));\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID));\r\n return task;\r\n }\r\n return null;\r\n }", "public String getOrginTaskID() {\n\t\treturn orginTaskID;\n\t}", "public static ITask findTaskUserHasPermissionToSee(final long taskId) {\r\n try {\r\n return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable<ITask>() {\r\n public ITask call() throws Exception {\r\n try {\r\n TaskQuery taskQuery1 = TaskQuery.create().where().taskId().isEqual(taskId);\r\n TaskQuery taskQuery2 = TaskQuery.create().where().currentUserIsInvolved();\r\n IUser user = Ivy.session().getSessionUser();\r\n if (user == null) {\r\n return null;\r\n }\r\n for (IRole role : user.getRoles()) {\r\n taskQuery2 = taskQuery2.where().or().roleIsInvolved(role);\r\n }\r\n return Ivy.wf().getTaskQueryExecutor().getFirstResult(taskQuery1.where().and(taskQuery2));\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }\r\n });\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }", "public Optional<Task> getATask() {\n HttpHeaders headers = new HttpHeaders();\n headers.setAccept(List.of(MediaType.APPLICATION_JSON));\n\n ResponseEntity<Task> responseEntity = restTemplate.exchange(\n queueUrl + \"/getATask\",\n HttpMethod.GET,\n new HttpEntity<>(headers),\n Task.class);\n\n return Optional.ofNullable(responseEntity.getBody());\n }", "public String getTask(){\n\treturn task;\n}", "@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}", "public Task getTask(){\n return punchTask;\n }", "public static Task getCurrentTask(Fiber paramFiber)\n/* 194 */ throws Pausable { return null; }", "public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }", "public static List<ITask> findWorkTaskOfSessionUser() {\r\n\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n }", "ConversationalObject getTaskOwner();", "ITaskView getTaskView();", "String getTaskId();", "public List<Task> getAllTasksForUser(long userId);", "@RequestMapping(value = \"/get-task/{taskName}\", method = RequestMethod.GET)\r\n\tpublic Task getTask(@PathVariable(\"taskName\") String taskName) {\r\n\t\tTask dumyTask = new Task();\r\n\t\tdumyTask.setTaskName(taskName);\r\n\t\treturn dumyTask;\r\n\t}", "boolean updateActiveTask(Task task);", "protected String getAppTaskID() {\r\n\t\treturn appTaskID;\r\n\t}", "public TaskDetails getSpecificTask (int position){\n return taskList.get(position);\n }", "public String getTaskName() {\n return taskName;\n }", "public String getTaskName() {\n return taskName;\n }", "public String getTaskName() {\n return taskName;\n }", "public String getTaskName() {\n return taskName;\n }", "public boolean isActiveUser() {\r\n if (currentProcessInstance == null)\r\n return false;\r\n \r\n String[] states = currentProcessInstance.getActiveStates();\r\n if (states == null)\r\n return false;\r\n \r\n Actor[] users;\r\n for (int i = 0; i < states.length; i++) {\r\n try {\r\n users = currentProcessInstance.getWorkingUsers(states[i]);\r\n for (int j = 0; j < users.length; j++) {\r\n if (getUserId().equals(users[j].getUser().getUserId()))\r\n return true;\r\n }\r\n } catch (WorkflowException ignored) {\r\n // ignore unknown state\r\n continue;\r\n }\r\n }\r\n \r\n return false;\r\n }", "public Task task()\n {\n return _link.first;\n }", "WorkingTask getWorkingTask();", "public List<Task> getTaskForToday() {\n\t\tDate currentDate = DateUtils.truncate(new Date(), Calendar.DATE);\n\n\t\tgetCesarTasksExpiringToday();\n\t\tgetHomeTasksExpiringToday();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.HOUR, -2);\n\t\tList<Task> tasksPermanentTasks = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndCompletionDateAfterOrCompletionDateIsNullOrderByDoneAsc(false,\n\t\t\t\t\t\tcalendar.getTime());\n\t\tList<Task> tasksTemp = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndDateAndCompletionDateAfterOrderByDoneAsc(true, currentDate,\n\t\t\t\t\t\tcalendar.getTime());\n\t\ttasksPermanentTasks.addAll(tasksTemp);\n\t\treturn tasksPermanentTasks;\n\t}", "public String taskName() {\n return this.taskName;\n }", "int activeTasks();", "public java.lang.Boolean getActive() {\n return active;\n }", "DispatchTask getTask()\n {\n synchronized (m_lock)\n {\n return m_runnable;\n }\n }", "public static Task fetchByPrimaryKey(long taskId) {\n\t\treturn getPersistence().fetchByPrimaryKey(taskId);\n\t}", "public Boolean getActive() {\n return this.active;\n }", "public Boolean getActive() {\n return this.active;\n }", "public TaskState getTaskState() {\n return this.taskState;\n }", "public Integer getTaskId() {\n return taskId;\n }", "public Integer getTaskId() {\n return taskId;\n }", "public int getTaskId() {\n return taskId;\n }", "@Override\n public GetFuotaTaskResult getFuotaTask(GetFuotaTaskRequest request) {\n request = beforeClientExecution(request);\n return executeGetFuotaTask(request);\n }", "public int getTaskID() {\n\t\treturn taskID;\n\t}", "public Task getTask(final int id) {\n return tasks.get(id);\n }", "public static profile getActive(){\n return active;\n }", "public Task getTaskById(Long id ) {\n\t\treturn taskRepo.getOne(id);\n\t}", "public TaskType getTaskType() {\n return taskType;\n }", "public static List<Task> findByUser(String userID){\n return null;\n }", "@Override\r\n\tpublic Optional<Task> findTask(Integer taskId) {\n\t\treturn taskRepository.findById(taskId);\r\n\t}", "public ViewTaskOption getViewTaskOption() {\n return (ViewTaskOption) commandData.get(CommandProperties.TASKS_VIEW_OPTION);\n }", "public Task get(int taskIndex) {\n return tasks.get(taskIndex);\n }", "public Task get(int taskIndex) {\n return tasks.get(taskIndex);\n }", "public String getTask(int position) {\n HashMap<String, String> map = list.get(position);\n return map.get(TASK_COLUMN);\n }", "public boolean getActive()\n {\n return this.active;\n }", "public Task getTask(int i) {\n return this.tasks.get(i);\n }", "@GET(\"pomodorotasks/activity\")\n Call<List<PomodoroTask>> pomodorotasksActivityGet(\n @Query(\"user\") String user\n );", "public TaskName getTaskName() {\n return this.taskName;\n }", "public String getTaskId() {\n return taskId;\n }", "public String getTaskId() {\n return taskId;\n }", "public static SharedPreferences getActiveUserSharedPreferences(\r\n\t\t\tContext context) {\r\n\t\tSharedPreferences result = null;\r\n\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\tif (prefs != null) {\r\n\t\t\tString activeUserId = prefs.getString(PreferenceKeys.ActiveUserId,\r\n\t\t\t\t\t\"\");\r\n\t\t\tif (!TextUtils.isEmpty(activeUserId)) {\r\n\t\t\t\tString userConfigFileName = getUserConfigFileName(context,\r\n\t\t\t\t\t\tactiveUserId);\r\n\t\t\t\tresult = context.getSharedPreferences(userConfigFileName,\r\n\t\t\t\t\t\tContext.MODE_PRIVATE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "@Accessor(qualifier = \"active\", type = Accessor.Type.GETTER)\n\tpublic Boolean getActive()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(ACTIVE);\n\t}", "public String getTaskId() {\n return this.taskId;\n }", "public String getTaskName(){\r\n\t\treturn this.taskName;\r\n\t}", "public ArrayList<Task> getTaskList() {\n return taskList;\n }", "@GetMapping(\"/users/{name}/tasks\")\n public List<Task> getTaskByAssignee(@PathVariable String name){\n List<Task> allTask = taskRepository.findByAssignee(name);\n return allTask;\n }", "public String getTaskName();", "public Task getTask(Long row_num) {\n List<Task> taskList = new ArrayList<Task>();\n Task result = new Task();\n Integer r = row_num.intValue();\n taskList = getAllTasks();\n result = taskList.get(r);\n return result;\n }", "public TaskProvider getTaskProvider();", "public abstract SystemTask getTask(Project project);", "public java.lang.String getTaskId() {\n return taskId;\n }", "public java.lang.String getTaskId() {\n return taskId;\n }", "public AUndertaking getSelectedTask()\n {\n String errorMsg;\n Iterator<AUndertaking> taskIt = getSelectedTaskIterator();\n\n if (taskIt.hasNext()) {\n AUndertaking selectedTask = taskIt.next();\n\n if (! taskIt.hasNext()) {\n return selectedTask;\n }\n\n errorMsg = \"Selection is multiple\";\n }\n else {\n errorMsg = \"Nothing is selected\";\n }\n\n throw new IllegalStateException(errorMsg);\n }", "public TaskSummary getTask(Long taskId){\n TaskServiceSession taskSession = null;\n try {\n taskSession = jtaTaskService.createSession();\n Task taskObj = taskSession.getTask(taskId);\n TaskSummary tSummary = new TaskSummary();\n tSummary.setActivationTime(taskObj.getTaskData().getExpirationTime());\n tSummary.setActualOwner(taskObj.getTaskData().getActualOwner());\n tSummary.setCreatedBy(taskObj.getTaskData().getCreatedBy());\n tSummary.setCreatedOn(taskObj.getTaskData().getCreatedOn());\n tSummary.setDescription(taskObj.getDescriptions().get(0).getText());\n tSummary.setExpirationTime(taskObj.getTaskData().getExpirationTime());\n tSummary.setId(taskObj.getId());\n tSummary.setName(taskObj.getNames().get(0).getText());\n tSummary.setPriority(taskObj.getPriority());\n tSummary.setProcessId(taskObj.getTaskData().getProcessId());\n tSummary.setProcessInstanceId(taskObj.getTaskData().getProcessInstanceId());\n tSummary.setStatus(taskObj.getTaskData().getStatus());\n tSummary.setSubject(taskObj.getSubjects().get(0).getText());\n return tSummary;\n }catch(RuntimeException x) {\n throw x;\n }finally {\n if(taskSession != null)\n taskSession.dispose();\n }\n }", "@Nullable\n public Task getTask(int id) {\n Task output = null;\n\n // get a readable instance of the database\n SQLiteDatabase db = getReadableDatabase();\n if (db == null) return null;\n\n // run the query to get the matching task\n Cursor rawTask = db.rawQuery(\"SELECT * FROM Tasks WHERE id = ? ORDER BY due_date ASC;\", new String[]{String.valueOf(id)});\n\n // move the cursor to the first result, if one exists\n if (rawTask.moveToFirst()) {\n // convert the cursor to a task and assign it to our output\n output = new Task(rawTask);\n }\n\n // we're done with the cursor and database, so we can close them here\n rawTask.close();\n db.close();\n\n // return the (possibly null) output\n return output;\n }", "public static ITask findWorkOnTaskById(long taskId) {\r\n Ivy ivy = Ivy.getInstance();\r\n IPropertyFilter<TaskProperty> taskFilter =\r\n ivy.session.getWorkflowContext().createTaskPropertyFilter(TaskProperty.ID, RelationalOperator.EQUAL, taskId);\r\n IQueryResult<ITask> queryResult =\r\n ivy.session.findWorkTasks(taskFilter, null, 0, 1, true,\r\n EnumSet.of(TaskState.SUSPENDED, TaskState.RESUMED, TaskState.PARKED));\r\n List<ITask> tasks = queryResult.getResultList();\r\n if (tasks != null && tasks.size() > 0) {\r\n return tasks.get(0);\r\n }\r\n return null;\r\n }", "public java.lang.String getTaskId() {\n return taskId;\n }", "public java.lang.String getTaskId() {\n return taskId;\n }", "public Task getTask(String stateName) throws ProcessManagerException {\r\n Task[] tasks = getTasks();\r\n for (int i = 0; i < tasks.length; i++) {\r\n if (tasks[i].getState().getName().equals(stateName)) {\r\n return tasks[i];\r\n }\r\n }\r\n return null;\r\n }", "public Boolean getActive() {\n\t\treturn this.Active;\n\t}", "public Task getTask(int index)\n {\n return tasks.get(index);\n }", "@Override\n public TaskForceState getState() {\n return TaskForceState.ACTIVE;\n }", "@Action(value = \"user_active\", results = {@Result(name = \"active\", location = \"/WEB-INF/jsp/msg.jsp\")})\n public String active() {\n\n User exsitUser = userService.active(user.getCode());\n\n if (exsitUser == null) {\n\n this.addActionMessage(\"激活失败,验证码无效!\");\n\n } else {\n\n exsitUser.setState(1);\n exsitUser.setCode(null);\n userService.updateState(exsitUser);\n this.addActionMessage(\"激活成功,请登录!\");\n }\n\n return \"active\";\n }", "protected String getTaskId() {\n\t\tDisplay.debug(\"getTaskId() devuelve %s\", taskId);\n\t\treturn taskId;\n\t}", "public Cursor fetchUserTaskByUserIdTaskId(long taskid,long userid) throws SQLException {\r\n\r\n\t\t Cursor mCursor =\r\n\r\n\t\t database.query(true,MySQLHelper.TABLE_USER_TASK , allColumns, MySQLHelper.COLUMN_USERTASKTASKFID + \"=\" + taskid\r\n\t\t \t\t+ \" AND \" + MySQLHelper.COLUMN_USERTASKUSERFID + \"=\" + userid , null,\r\n\t\t null, null, null, null);\r\n\t\t if (mCursor != null) {\r\n\t\t mCursor.moveToFirst();\r\n\t\t }\r\n\t\t return mCursor;\r\n\r\n\t\t }" ]
[ "0.65479124", "0.64630437", "0.63725096", "0.63679975", "0.63679975", "0.6284689", "0.62527615", "0.61946416", "0.6159881", "0.6139986", "0.6105664", "0.6091256", "0.6051691", "0.60484344", "0.6039934", "0.6039533", "0.6028488", "0.60246766", "0.59711385", "0.59560674", "0.5911005", "0.5902476", "0.5891257", "0.5867916", "0.5863146", "0.58365214", "0.58362055", "0.582522", "0.57666487", "0.5753696", "0.57437325", "0.5736637", "0.57063365", "0.56545657", "0.5649464", "0.5635845", "0.56355786", "0.56208676", "0.5593237", "0.5593237", "0.5593237", "0.5593237", "0.5590126", "0.55865693", "0.55850655", "0.55827606", "0.55740786", "0.5571343", "0.55643535", "0.5545802", "0.5544585", "0.553723", "0.553723", "0.55299747", "0.5511066", "0.5511066", "0.55101144", "0.55092067", "0.55069137", "0.55067", "0.5506", "0.5488961", "0.5488038", "0.54758483", "0.54700446", "0.54669946", "0.5461157", "0.5461157", "0.54554194", "0.54458666", "0.54430306", "0.54395276", "0.5438941", "0.54294175", "0.54294175", "0.5428623", "0.542716", "0.5420604", "0.54200196", "0.5416643", "0.54010594", "0.5399172", "0.5397717", "0.536406", "0.53639424", "0.53577775", "0.53577775", "0.53521144", "0.5350659", "0.53501886", "0.5346764", "0.5341094", "0.5341094", "0.53280914", "0.532747", "0.5323864", "0.53230083", "0.5319878", "0.5313866", "0.53120345" ]
0.744851
0
Update the active task for the user.
boolean updateActiveTask(Task task);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n todoTaskGui(\"Update\", task);\r\n }\r\n }", "void updateTask(UserDto user);", "public void updateTask() {}", "boolean updateTask(Task updatedTask);", "public void setActiveTask(boolean active)\r\n\t{\r\n\t\tif (active)\r\n\t\t{\r\n\t\t\tif (this.getPeriod() != null)\r\n\t\t\t{\r\n\t\t\t\t// Support without at load\r\n\t\t\t\tMassivePlugin plugin = this.getPlugin();\r\n\t\t\t\tif (plugin.isEnabled())\r\n\t\t\t\t{\r\n\t\t\t\t\tif (this.isSync())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthis.task = Bukkit.getScheduler().runTaskTimer(this.getPlugin(), this, this.getDelay(), this.getPeriod());\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\tthis.task = Bukkit.getScheduler().runTaskTimerAsynchronously(this.getPlugin(), this, this.getDelay(), this.getPeriod());\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\telse\r\n\t\t{\r\n\t\t\tif (this.task != null)\r\n\t\t\t{\r\n\t\t\t\tthis.task.cancel();\r\n\t\t\t\tthis.task = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void updateTask(int tid,String title,String detail,int money,String type,int total_num,int current_num,Timestamp start_time,Timestamp end_time,String state);", "@Override\n public void onItemToggled(boolean active, int position) {\n Uri currentTaskUri = ContentUris.withAppendedId(TaskContract.CONTENT_URI, mAdapter.getItemId(position));\n\n ContentValues values = new ContentValues();\n values.put(TaskContract.TaskColumns.IS_COMPLETE, 1);\n\n int rowsAffected = getContentResolver().update(currentTaskUri, values, null, null);\n\n if (rowsAffected == 0) {\n\n Toast.makeText(this, getString(R.string.task_completed_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n\n Toast.makeText(this, getString(R.string.task_completed),\n Toast.LENGTH_SHORT).show();\n }\n\n }", "TaskResponse updateTask(TaskRequest taskRequest, Long taskId);", "public Task update(Task item) {\n\t\t// set the user id (not sure this is where we should be doing this)\n\t\titem.setUserId(getUserId());\n\t\titem.setEmailAddress(getUserEmail());\n\t\tif (item.getDueDate() == null) {\n\t\t\tCalendar c = Calendar.getInstance();\n\t\t\tc.set(2011, 5, 11);\n\t\t\titem.setDueDate(c.getTime());\n\t\t}\n\t\tPersistenceManager pm = PMF.get().getPersistenceManager();\n\t\ttry {\n\t\t\tpm.makePersistent(item);\n\t\t\treturn item;\n\t\t} finally {\n\t\t\tpm.close();\n\t\t}\n\t}", "private void updateAction(String taskId) {\n setupPrioritySpinner();\n try {\n QueryBuilder<Task, String> queryBuilder = taskDao.queryBuilder();\n taskForUpdate = taskDao.queryForFirst(queryBuilder.where().eq(Task.TASK_ID, taskId).prepare());\n mTitle.setText(taskForUpdate.getTitle());\n mDescription.setText(taskForUpdate.getDescription());\n mDate.setDate(taskForUpdate.getDate().getTime());\n mPriority.setSelection(taskForUpdate.getPriority());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n public UpdateFuotaTaskResult updateFuotaTask(UpdateFuotaTaskRequest request) {\n request = beforeClientExecution(request);\n return executeUpdateFuotaTask(request);\n }", "@Modifying \n\t@Transactional\n\t@Query(value = \"UPDATE item_user SET active=?2 WHERE item_id=?1\", nativeQuery = true)\n\tvoid updateActiveByIdItem(Long itemId, Boolean active);", "private void updateTask(ICompositeCheatSheetTask task) {\n \t\tif (task==null || task != selectedTask) return;\n \t\tif ( task instanceof EditableTask) {\n \t\t\tEditableTask editable = (EditableTask)task;\n \t\t\tif (editable.getState() == ICompositeCheatSheetTask.IN_PROGRESS) {\n \t\t\t\tshowEditor(editable);\n \t\t\t\treturn;\n \t\t\t} else if (editable.isUnderReview()) {\n \t\t\t\tif (editable.getState() == ICompositeCheatSheetTask.COMPLETED) {\n \t\t\t\t\tshowEditor(editable);\n \t\t\t\t} else {\n \t\t\t\t\tendReview(editable);\n \t\t\t\t}\n \t\t\t\treturn;\n \t\t\t}\n \t\t} \n \t\tshowDescription(task);\n \t}", "@SuppressWarnings(\"unchecked\")\r\n public UserPlanTask UserPlanTaskUpdate(long taskId, String TTitle, String TDescription, String TDate, Integer status) {\r\n session = sf.openSession();\r\n Transaction t = session.beginTransaction();\r\n UserPlanTask UpdateTaskList = (UserPlanTask) session.load(UserPlanTask.class, taskId);\r\n UpdateTaskList.setTTitle(TTitle);\r\n UpdateTaskList.setTDescription(TDescription);\r\n UpdateTaskList.setTDate(TDate);\r\n UpdateTaskList.setStatus(status);\r\n if (null != UpdateTaskList) {\r\n session.update(UpdateTaskList);\r\n }\r\n t.commit();\r\n session.close();\r\n sf.close();\r\n return UpdateTaskList;\r\n }", "void updateUserActivateStatus(User user, int newStatus);", "boolean setTask(UUID uuid, IAnimeTask task);", "public void onClick(View v) {\n Task task = new Task();\n task.setTask_id(key); // Use the generated key from the database as id.\n task.setMessage(editText.getText().toString());\n String rating = spinner.getSelectedItem().toString();\n task.setPriority(rating);\n\n // we need to convert our model into a Hashmap since Firebase cannot save custom classes.\n // String/ArrayList/Integer and Hashmap are the only supported types.\n Map<String, Object> childUpdates = new HashMap<>();\n childUpdates.put( key, task.toFirebaseObject());\n\n database.child(\"users\").child(currentUserID).child(\"taskList\").updateChildren(childUpdates, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError == null) {\n // Return to previous activity\n finish();\n }\n }\n });\n }", "public static void setActiveUser(Context context, String userId) {\r\n\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\tif (prefs != null) {\r\n\t\t\tEditor editor = prefs.edit();\r\n\t\t\tif (editor != null) {\r\n\t\t\t\teditor.putString(PreferenceKeys.ActiveUserId, userId);\r\n\t\t\t}\r\n\r\n\t\t\teditor.commit();\r\n\t\t}\r\n\t}", "public Boolean assignTask(Task task, User user) {\r\n\t\t\r\n\t\tint time_block = 0;\r\n\t\tDate cur_date = new Date();\r\n\t\tDate end_date = new Date();\r\n\t\t\t\r\n\t\t/** rounds the estimated time to the nearest half hour */\r\n\t\tdouble task_len = roundEstimatedTimeToMinutes(task.getEstimatedTime());\r\n\r\n\t\t/** round up the suggested start time to the nearest half hour */\r\n\t\tcur_date = checkMin(roundUpTime(task.getSuggestedStartTime()));\r\n\t\t\r\n\t\t/** round down the suggested end time to the nearest half hour */\r\n\t\tend_date = checkMax(roundDownTime(task.getSuggestedEndTime()));\r\n\t\t\t\t\t\t\r\n\t\t/** iterate, checking for availability in half hour time blocks */\r\n\t\twhile(cur_date.before(end_date)) {\r\n\t\t\t\t\r\n\t\t\t/** if the user is available increase available time block by half hour\r\n\t\t\t * otherwise, reset available time block to 0 */\r\n\t\t\tif (isUserAvailable(user, cur_date)) {\r\n\t\t\t\ttime_block += halfhour_min;\r\n\t\t\t} else {\r\n\t\t\t\ttime_block = 0;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t/** adjust current time by half hour to test next time block */\r\n\t\t\tcur_date.setTime(cur_date.getTime() + halfhour_ms);\r\n\t\t\t\r\n\t\t\t/** if available time block == estimated task length, assign task */\r\n\t\t\tif (time_block == task_len) {\r\n\t\t\t\t\r\n\t\t\t\t/** adjust current time = (current time - task length) */\r\n\t\t\t\tcur_date = resetCurrentTimeByTaskLengh(cur_date, task_len);\r\n\t\t\t\t\r\n\t\t\t\t/** associate the task and user and update database */\r\n\t\t\t\ttask = assignTaskToUser(user, task, cur_date);\r\n\t\t\t\tTaskDao.getInstance().updateTask(task);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "@Override\n public void activateTask(@NonNull String taskId) {\n }", "public void updateTaskStatus(CaptureTask task, String status, String description) {\n\t\t\r\n\t}", "public int updateTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_TASKNAME, task.getTaskName());\n values.put(KEY_STATUS, task.getStatus());\n values.put(KEY_DATE,task.getDateAt());\n\n // updating row\n return db.update(TABLE_TASKS, values, KEY_ID + \" = ?\",\n new String[] { String.valueOf(task.getId()) });\n }", "void refreshTaskInformation();", "@Test\n\tpublic void updateTask() {\n\t\tfinal Date dueDate = new Date();\n\t\tfinal Template template = new Template(\"Template 1\");\n\t\ttemplate.addStep(new TemplateStep(\"Step 1\", 1.0));\n\t\tfinal Assignment asgn = new Assignment(\"Assignment 1\", dueDate, template);\n\t\tfinal Task task = new Task(\"Task 1\", 1, 1, asgn.getID());\n\t\tasgn.addTask(task);\n\t\t\n\t\tfinal String asgnId = asgn.getID();\n\t\t\n\t\ttry {\n\t\t\tStorageService.addTemplate(template);\n\t\t\tStorageService.addAssignment(asgn);\n\t\t} catch (final StorageServiceException e) {\n\t\t\tfail(e.getMessage());\n\t\t}\n\t\t\n\t\ttask.setPercentComplete(0.174);\n\t\tStorageService.updateTask(task);\n\t\t\n\t\tfinal Assignment afterAsgn = StorageService.getAssignment(asgnId);\n\t\tassertEquals(asgn.fullString(), afterAsgn.fullString());\n\t}", "public void setTaskInstance(Task taskInstance) {\n\t\tthis.taskInstance = taskInstance;\n\t}", "@Action(value = \"user_active\", results = {@Result(name = \"active\", location = \"/WEB-INF/jsp/msg.jsp\")})\n public String active() {\n\n User exsitUser = userService.active(user.getCode());\n\n if (exsitUser == null) {\n\n this.addActionMessage(\"激活失败,验证码无效!\");\n\n } else {\n\n exsitUser.setState(1);\n exsitUser.setCode(null);\n userService.updateState(exsitUser);\n this.addActionMessage(\"激活成功,请登录!\");\n }\n\n return \"active\";\n }", "public void editTask(String newTask) {\n task = newTask;\n }", "public void setTask(Task inTask){\n punchTask = inTask;\n }", "void updateActiveTime(int T);", "@Override\n\tpublic void setActive(Todo todo) {\n\n\t}", "public void updateTask(Task task){//needs to depend on row num\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID,task.getId());\n values.put(KEY_LABEL,task.getLabel());\n values.put(KEY_TIME, task.getTime());\n db.update(TABLE_NAME, values, KEY_ID+\" = ?\",\n new String[] { String.valueOf(task.getId()) });\n }", "public static boolean toggleComplete(Task task) {\n Boolean complete = task.getCompleted(); // Get the current value\n\n // TOGGLE COMPLETE\n if (complete) // store the opposite of the current value\n complete = false;\n else\n complete = true;\n try{\n String query = \"UPDATE TASK SET ISCOMPLETE = ? WHERE (NAME = ? AND COLOUR = ? AND DATE = ?)\"; // Setup query for task\n PreparedStatement statement = DatabaseHandler.getConnection().prepareStatement(query); // Setup statement for query\n statement.setString(1, complete.toString()); // Store new isCompleted value\n statement.setString(2, task.getName()); // store values of task\n statement.setString(3, task.getColor().toString());\n statement.setString(4, Calendar.selectedDay.getDate().toString());\n int result = statement.executeUpdate(); // send out the statement\n if (result > 0){ // If swapped successfully, re-load the tasks\n getMainController().loadTasks(); // Reload the task list to update the graphics.\n }\n return (result > 0);\n } catch (SQLException e) {\n e.printStackTrace(); // If task was unable to be edited\n e.printStackTrace(); // Create alert for failing to edit\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setHeaderText(null);\n alert.setContentText(\"Unable to edit task.\");\n alert.showAndWait();\n }\n return false;\n }", "public void setTask(Task task) {\n this.task = task;\n }", "public void updateTasks(List<Task> listOfTasks);", "@Override\n public boolean statusUpdate(TaskAttemptID taskId, TaskStatus taskStatus)\n throws IOException, InterruptedException {\n superStepCount = taskStatus.getSuperstepCount();\n return true;\n }", "protected void startProcessAndCompleteUserTask() {\n runtimeService.startProcessInstanceByKey(\"HistoryLevelTest\");\n Task task = taskService.createTaskQuery().singleResult();\n taskService.complete(task.getId());\n }", "@Override\r\n\tpublic void update(ExecuteTask executeTask) {\n\t\tString sql = \"UPDATE executetask SET et_comments = ? WHERE et_id = ?\";\r\n\t\tupdate(sql,executeTask.getComments(),executeTask.getId());\r\n\t}", "public void updateTaskDetailsInDB(UniverseDefinitionTaskParams taskParams) {\n getRunnableTask().setTaskDetails(RedactingService.filterSecretFields(Json.toJson(taskParams)));\n }", "@PutMapping(value = { \"/accounts/{accountId}\" })\n\tpublic void setAccountActiveState(ModelMap model, @PathVariable(\"accountId\") String accountId,HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\n\t\tlog.info(CLASS_NAME + \"Activate has been requested for gerrit user\"+accountId);\n\t\tRestTemplate restTemplate = CustomRestTemplate.restTemplate(gerritUrl, 443, userName, password);\n\t\tResponseEntity<String> gerritresponse = restTemplate.exchange(gerritUrl + \"/a/accounts/\" + accountId + \"/active\",\n\t\t\t\tHttpMethod.PUT, null, String.class);\n\t\t\n\t\t\n\t\tHttpSession session = request.getSession(false);\n\t\tUserObject user = (UserObject) session.getAttribute(Constant.SESSION.USER);\n\t\t\n\t\tAuditEvent event = new AuditEvent();\n\t\tevent.setAction(EventAction.GERRIT_USER_ACTIVATED);\n\t\tevent.setFromUser(user.getName());\n\t\tevent.setUserId(user.getId().toString());\n\t\tevent.setDescription(user.getName() + \" Activated gerrit user - \"+ accountId);\n\t\thistoryService.logEvent(event);\n\t\tlog.debug(gerritresponse.getBody());\n\n\t}", "public void onUpdateButtonClick() {\n androidUserService.updateUser(userLoc.getUser().getId())\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe();\n }", "boolean updateUserActivityInDB(UserActivity userActivity);", "void setStatus(TaskStatus status);", "void editTask(ReadOnlyTask taskToEdit, Name taskName, Date startDate, Date endDate, Priority priority,\n\t\t\tRecurrenceRate recurrenceRate);", "@PostMapping(value=\"/update\",consumes={MediaType.APPLICATION_JSON_VALUE},produces={MediaType.APPLICATION_JSON_VALUE})\n\t public StatusDTO updateTask(@RequestBody TaskDTO task){\n\t\t taskService.updateTask(task);\n\t\t StatusDTO status = new StatusDTO();\n\t status.setMessage(\"Task details updated successfully\");\n\t status.setStatus(200);\n\t return status;\n\t }", "public void updateCurrentTrempitUser() {\n\n // create the trempituser object\n TrempitUser currentUser = new TrempitUser();\n currentUser.setFullName(Profile.getCurrentProfile().getName());\n currentUser.setId(Long.valueOf(Profile.getCurrentProfile().getId()));\n\n // update the global variable so all activities can access the user\n globalState.setCurrentUser(currentUser);\n\n // insert the user to the server\n insertTrempitUserToServer(currentUser);\n\n Toast.makeText(this, \"logged in to facebook:\" + globalState.getCurrentUser().getFullName(), Toast.LENGTH_LONG).show();\n }", "public void updateTaskVoteNotification(final Long taskId, final Long voterUserId, final RateDirection direction) {\n\t\ttaskExecutor.execute(new AsyncWebTask(notificationDao.getSessionFactory()) {\n\t\t\tpublic void runInBackground() {\n\t\t\t\tNotificationType previousNotificationType;\n\t\t\t\tNotificationType newNotificationType;\n\n\t\t\t\tTask task = (Task) getSession().get(Task.class, taskId);\n\t\t\t\tUser source = (User) getSession().get(User.class, voterUserId);\n\t\t\t\tUser receiver = task.getOwner();\n\n\t\t\t\tif (direction == RateDirection.UP) {\n\t\t\t\t\tpreviousNotificationType = NotificationType.TASK_DOWNVOTE;\n\t\t\t\t\tnewNotificationType = NotificationType.TASK_UPVOTE;\n\t\t\t\t} else {\n\t\t\t\t\tpreviousNotificationType = NotificationType.TASK_UPVOTE;\n\t\t\t\t\tnewNotificationType = NotificationType.TASK_DOWNVOTE;\n\t\t\t\t}\n\n\t\t\t\tNotification notification = notificationDao.findNotification(getSession(), receiver.getId(), source.getId(), task.getId(), previousNotificationType);\n\n\t\t\t\tif (notification != null) {\n\t\t\t\t\tnotification.setType(newNotificationType);\n\t\t\t\t\tnotificationDao.updateNotification(getSession(), notification);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void setActive(boolean active) {\n _isActive = active;\n }", "private void updateVote(Identity identity, boolean active) {\n\t\tlong diff = active ? 1L : -1L;\n\t\tlong result = votes.get(identity).addAndGet(diff);\n\t\tif (result == 0) {\n\t\t\tnodeMap.remove(identity);\n\t\t\tvotes.remove(identity);\n\t\t\tfor (NodeMappingListener listener : listeners)\n\t\t\t\tlistener.mappingRemoved(identity, null);\n\t\t}\n\t}", "public void updateItem(String jobNumber, String description, int totalSeconds, boolean active){\n this.setJobNumber(Integer.parseInt(jobNumber));\n this.setDescription(description);\n // if updating inactive to active set the start time and activate\n if (this.active != active && active) {\n this.setStartTime(Calendar.getInstance());\n this.active=true;\n setActiveItemNo(this.getItemNo());\n \n // if updating from active to inactive update total time\n } else if (this.active != active && !active) {\n this.stop();\n // if not switching between active/inactive, and currently inactive, then update time \n } else if (!this.active) {\n this.setTotalSeconds(totalSeconds);\n }\n }", "private void updateTask(String task_id, final String task, final String status, final int position){\n if(!preference.getAPI_KEY().isEmpty()){\n Call call = service.updateTask(preference.getAPI_KEY(), task_id, task, status);\n connection.request(call, new ResponseListener() {\n @Override\n public void onSuccess(String response) {\n Log.e(TAG, \"\"+response);\n list_task.get(position).setTask(task);\n list_task.get(position).setStatus(status);\n notifyDataSetChanged();\n }\n\n @Override\n public void onError(String error) {\n Log.e(TAG, \"\"+error);\n }\n });\n }else {\n Toast.makeText(context, \"please login to check data\", Toast.LENGTH_SHORT).show();\n }\n\n }", "@VisibleForTesting(otherwise = VisibleForTesting.NONE)\r\n LiveData<Task> getActiveTask();", "public void setActive(boolean isActive) {\r\n\t\tthis.isActive = isActive;\r\n\t}", "@Override\n public boolean updateUser(User user) {\n return controller.updateUser(user);\n }", "protected void updateTaskEmailsManually() {\n List<Object> arguments = new ArrayList<Object>();\n String emailToReplace = \"[email protected]\";\n arguments.add(emailToReplace);\n List<Task> results = BeanHelper.getWorkflowDbService().searchTasksAllStores(\"(wfc_owner_email=? )\", arguments, -1).getFirst();\n Map<QName, Serializable> changedProps = new HashMap<QName, Serializable>();\n for (Task task : results) {\n changedProps.clear();\n try {\n String ownerId = task.getOwnerId();\n String newTaskOwnerEmail = BeanHelper.getUserService().getUserEmail(ownerId);\n if (StringUtils.isBlank(newTaskOwnerEmail)) {\n LOG.warn(\"The e-mail of following task was not updated because no user e-mail address was found:\\n\" + task);\n continue;\n }\n changedProps.put(WorkflowCommonModel.Props.OWNER_EMAIL, newTaskOwnerEmail);\n BeanHelper.getWorkflowDbService().updateTaskEntryIgnoringParent(task, changedProps);\n LOG.info(\"Updated task [nodeRef=\" + task.getNodeRef() + \"] e-mail manually: \" + emailToReplace + \" -> \" + newTaskOwnerEmail);\n } catch (Exception e) {\n LOG.error(e);\n continue;\n }\n }\n }", "@Override\n\tpublic void activeAccount(String email) {\n\n\t\tUserModel userModel = findByEmail(email);\n\t\tuserModel.setActiveSwitch(\"Y\");\n\t\tsaveDtls(userModel);\n\n\t}", "public void update(JTable tblUser)\n {\n int i = tblUser.getSelectedRow();\n \n if(i != -1)\n {\n usersDto = users[i];\n \n CUpdateUser update;\n \n if(usersDto.getState() == 1)\n {\n update = new CUpdateUser(usersDto.getUserId());\n window.dispose();\n \n } else { JOptionPane.showMessageDialog(null, \"Solo se permite modificar registros activos\", \"ERROR\", JOptionPane.ERROR_MESSAGE); }\n \n } else { JOptionPane.showMessageDialog(null, \"Seleccione un registro a modificar\", \"ERROR\", JOptionPane.ERROR_MESSAGE); }\n }", "public void update(User user);", "public void completeTask()\n throws NumberFormatException, NullPointerException, IndexOutOfBoundsException {\n System.out.println(LINEBAR);\n try {\n int taskNumber = Integer.parseInt(userIn.split(\" \")[TASK_NUMBER]);\n\n int taskIndex = taskNumber - 1;\n\n tasks.get(taskIndex).markAsDone();\n storage.updateFile(tasks.TaskList);\n System.out.println(\"Bueno! The following task is marked as done: \\n\" + tasks.get(taskIndex));\n } catch (NumberFormatException e) {\n ui.printNumberFormatException();\n } catch (NullPointerException e) {\n ui.printNullPtrException();\n } catch (IndexOutOfBoundsException e) {\n ui.printIndexOOBException();\n }\n System.out.println(LINEBAR);\n }", "public void setActive(boolean value) {\n this.active = value;\n }", "public void updateTaskViews(){\n for (Task task : taskManager.getTasksList()){\n TextView textToChange = (TextView) root.findViewById(task.getIdInView());\n if (textToChange == null){\n submit(task.getName(), task.getIdInView(), task.getTimeForTask(), task.isFinished());\n } else {\n textToChange.setText(task.getName());\n }\n }\n }", "abstract ClusterTask getSessionUpdateTask();", "public void setActive(boolean active)\r\n\t{\r\n\t\tif (this.active != active)\r\n\t\t{\r\n\t\t\tthis.active = active;\r\n\t\t\tapply();\r\n\t\t}\r\n\t}", "public void setTaskCompleted(TaskAttemptID taskID) {\n taskStatuses.get(taskID).setState(TaskStatus.SUCCEEDED);\n successfulTaskID = taskID;\n activeTasks.remove(taskID);\n }", "public void setActive(Boolean active) {\n Boolean oldValue = this.active;\n this.active = active;\n forecast.updateForecastFromYr();\n firePropertyChange(\"active\", oldValue, active);\n }", "public void updateToDone(int _id) {\n\n ContentValues values = new ContentValues();\n String date = DateFormat.getDateInstance().format(new Date());\n\n values.put(\"dateDone\", date);\n values.put(\"done\", 1);\n\n getWritableDatabase().update(\"tasks\", values, \"_id = '\"+_id+\"'\", null);\n }", "public void setCurrentTaskName(String name);", "public void updateUser(User user) {\n\t\t\r\n\t}", "public void updateItem(String jobNumber, String description, int totalHours, int totalMinutes, int totalSecs, boolean active){\n this.updateItem(jobNumber, description, (totalHours*3600 + totalMinutes*60 + totalSecs), active);\n }", "void claimTask(String userId, Long taskId);", "void updateTaskDueDate(int id, LocalDateTime dueDate);", "public void active(boolean value) {\n\t\tactive = value;\n\t}", "protected void activeActivity() {\n\t\tLog.i(STARTUP, \"active activity\");\n\t\tcheckActiveActivity();\n\t}", "public void setActiveUser(String email, boolean active) {\n\t\tUser user = repo.getUserByEmail(email, true);\n\t\t\n\t\tif(user == null) {\n\t\t\tthrow new ResponseStatusException(HttpStatus.NOT_FOUND, \"El mail ingresado no corresponde con ningún usuario resgistrado.\");\n\t\t}\n\t\t\n\t\tuser.setActive(active);\n\t\trepo.updateUser(user);\n\t}", "@EventListener(condition = \"!#event.domainObject.new\")\n\tpublic void onApplicationEventLookForUpdate(DomainObjectStoreEvent<Task> event) {\n\t\tEditeTask editeTask = new EditeTask();\n\t\tediteTask.setId(UUID.randomUUID().toString());\n\t\tTask task = event.getDomainObject();\n\n\t\tfinal Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tfinal CustomUserDetails principal = ((CustomUserDetails) authentication.getPrincipal());\n\t\tUser cs = principal.getUser();\n\t\tif (cs.getIsAdmin()) {\n\t\t\treturn;\n\t\t}\n\n\t\tSet<String> set = task.getDirtyAttributes();\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tIterator iterator1 = set.iterator();\n\t\tList<String> list = new ArrayList<>();\n\t\twhile (iterator1.hasNext()) {\n\t\t\tlist.add((String) iterator1.next());\n\t\t}\n\n\t\tif (list.size() == 1 && list.contains(\"status\")) {\n\t\t\treturn;\n\t\t}\n\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tIterator iterator = set.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tString temp = (String) iterator.next();\n\t\t\tswitch (temp) {\n\t\t\tcase \"description\":\n\t\t\t\tediteTask.setDescription((String) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"deadline\":\n\t\t\t\tediteTask.setDeadline((LocalDateTime) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"type\":\n\t\t\t\tediteTask.setType((TaskType) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"project\":\n\t\t\t\tediteTask.setProject((Project) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"taskPerformer\":\n\t\t\t\tediteTask.setTaskPerformer((User) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tediteTask.setTaskId(task.getId());\n\t\tediteTaskRepository.save(editeTask);\n\t\tif (!cs.getIsAdmin()) {\n\t\t\ttask.setIsCheck(false);\n\t\t\ttask.setStatus(Status.CLOSED);\n\t\t} else {\n\t\t\ttask.setIsCheck(true);\n\t\t}\n\t}", "public User_Task createUser_Task(String usertaskid, long user_task, long task_task, Date lastupdate, int status) {\r\n\t\t\t\tContentValues values = new ContentValues();\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKUSERFID,user_task);\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKTASKFID, task_task);\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKLASTUPDATE, lastupdate.toString());\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKSTATUS, status);\r\n\t\t\t\t\r\n\t\t\t\tString[] str = {usertaskid};\r\n\t\t\t\t\r\n\t\t\t\tint affectedRows = database.update(MySQLHelper.TABLE_USER_TASK,\r\n\t\t\t\t\t\tvalues, MySQLHelper.COLUMN_USERTASKID + \" = ?\",\r\n\t\t\t\t\t\tstr);\r\n\t\t\t\t\r\n\t\t\t\tif (affectedRows == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tCursor cursor = database.query(MySQLHelper.TABLE_USER_TASK,\r\n\t\t\t\t\t allColumns, MySQLHelper.COLUMN_USERTASKID + \" = \" + usertaskid, null,\r\n\t\t\t\t\t null, null, null);\r\n\t\t\t\t\t cursor.moveToFirst();\r\n\t\t\t\t\t User_Task newUser_Task = cursorToUser_Task(cursor);\r\n\t\t\t\t\t cursor.close();\r\n\t\t\t\t\t return newUser_Task;\r\n\t\t\t \r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKID, usertaskid);\r\n\t\t\t\t\tlong insertId = database.insert(MySQLHelper.TABLE_USER_TASK, null,\r\n\t\t\t\t\t values);\r\n\t\t\t\t\t Cursor cursor = database.query(MySQLHelper.TABLE_USER_TASK,\r\n\t\t\t\t\t allColumns, MySQLHelper.COLUMN_USERTASKID + \" = \" + insertId, null,\r\n\t\t\t\t\t null, null, null);\r\n\t\t\t\t\t cursor.moveToFirst();\r\n\t\t\t\t\t User_Task newUser_Task = cursorToUser_Task(cursor);\r\n\t\t\t\t\t cursor.close();\r\n\t\t\t\t\t return newUser_Task;\r\n\t\t\t\t}\r\n\t\t\t}", "public void completeTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n myTodo.getTodo().get(task.getHashKey()).setComplete(true);\r\n showCompleted = true;\r\n playSound(\"c1.wav\");\r\n }\r\n todoListGui();\r\n }", "void update(User user);", "void update(User user);", "public void setActive(Boolean active) {\n this.active = active;\n }", "@Override\r\n\tpublic int update(PtHrUserBak t) {\n\t\treturn 0;\r\n\t}", "public void updateUser(Person user) {\n\t\t\n\t}", "@Test\n\tpublic void testUpdateTask() {\n\t}", "public void setActive(boolean active) {\r\n this.active = active;\r\n }", "@Override\r\n\tpublic void updateUser(TUsers tuser) {\n\t\tdao.updateUser(tuser);\r\n\t}", "@Override\r\n\tpublic int updatestate(int taskid, int corpid, String userid, int state, String operationuserid,\r\n\t\t\tDate operationtime) {\n\t\treturn mapper.updatestate(taskid, corpid, userid, state, operationuserid, operationtime);\r\n\t}", "public void setTask(TaskDTO task) {\n\t\tthis.task = task;\r\n\t\t\r\n\t\t\r\n\t}", "public void updateTimedTasks() {\n if (TimedEventQueue.validTask(this)) {\n String action = TimedEventQueue.getTask().getAction();\n if (action.equals(\"gravityCancelOver\")) {\n this.gravityCancel = false;\n this.yVel = 0;\n } else if (action.equals(\"dodgeCoolDownOver\")) {\n this.dodgeCoolDown = false;\n } else if (action.equals(\"breakSpecialState\")) {\n this.breakSpecialState();\n } else if (action.equals(\"activeAttackState\")) {\n this.activeAttackState = true;\n } else if (action.equals(\"activeAttackStateOver\")) {\n this.activeAttackState = false;\n } else if (action.equals(\"heavySideSpeedUp\")) {\n this.setxTargetSpeed(Util.scaleX(25));\n } else if (action.equals(\"resetXMovement\")) {\n this.resetXMovement();\n }\n } \n }", "@Override\n public boolean updateTask(String id,String name, String[] taskTypeNames, String state, HashMap inputParameter, HashMap outputParameter, String title, String subject, String description, String priority, String claimed) {\n boolean response = false;\n try {\n response = dataAccessTosca.updateTask(id, name, taskTypeNames, state, inputParameter ,outputParameter, title, subject, description, priority, claimed);\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return response;\n }", "public void setActive(boolean active) {\r\n this.active = active;\r\n }", "int updateByPrimaryKeySelective(_task record);", "@Test\n public void updateCompletedAndGetById() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When the task is updated\n mDatabase.taskDao().updateCompleted(TASK.getId(), false);\n\n // When getting the task by id from the database\n Task loaded = mDatabase.taskDao().getTaskById(\"id\");\n\n // The loaded data contains the expected values\n assertTask(loaded, TASK.getId(), TASK.getTitle(), TASK.getDescription(), false);\n }", "void setTaskOwner(ConversationalObject taskOwner);", "public void updateUserConfiguration() {\n synchronized (this.mService) {\n try {\n ActivityManagerService.boostPriorityForLockedSection();\n this.mService.updateUserConfigurationLocked();\n } catch (Throwable th) {\n while (true) {\n ActivityManagerService.resetPriorityAfterLockedSection();\n throw th;\n }\n }\n }\n ActivityManagerService.resetPriorityAfterLockedSection();\n }", "public String update() {\r\n\t\tuserService.update(userEdit);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"update\";\r\n\t}", "void put(TaskEntity userEntity);", "public void setActive(boolean active)\n {\n this.active = active;\n }", "@Override\n public TaskForceState getState() {\n return TaskForceState.ACTIVE;\n }", "public void setActive(boolean active) {\n this.active = active;\n }", "public void setActive(boolean active) {\n this.active = active;\n }", "public void setActive(boolean active) {\n this.active = active;\n }" ]
[ "0.66543984", "0.6642256", "0.65703017", "0.6453264", "0.6355405", "0.62362635", "0.6167439", "0.6159313", "0.60901636", "0.6085098", "0.6060658", "0.60360575", "0.5983064", "0.59760976", "0.58707094", "0.579244", "0.5788639", "0.57385075", "0.57124174", "0.5679936", "0.5675739", "0.5640627", "0.5636031", "0.5583023", "0.5580491", "0.5569796", "0.5556425", "0.55446887", "0.55258304", "0.5494854", "0.5492949", "0.5466906", "0.541634", "0.5409121", "0.5407372", "0.5403048", "0.53988016", "0.5397842", "0.53903687", "0.53759944", "0.5369206", "0.53610975", "0.5360077", "0.53584313", "0.5357227", "0.53525", "0.5345167", "0.5342455", "0.53151286", "0.53147876", "0.5307716", "0.5295729", "0.5293098", "0.52908003", "0.5282397", "0.5274883", "0.52709115", "0.5269065", "0.5264431", "0.5244881", "0.5240012", "0.52339697", "0.5233275", "0.52165484", "0.5211099", "0.52074456", "0.5201958", "0.51965266", "0.5194093", "0.5192323", "0.5187126", "0.5179157", "0.5164171", "0.5162779", "0.51550514", "0.5154129", "0.51526994", "0.51526994", "0.51450086", "0.51427335", "0.5140733", "0.51364225", "0.5132467", "0.51308143", "0.5129546", "0.5118551", "0.51170754", "0.5113628", "0.5113255", "0.5112799", "0.5109972", "0.51070005", "0.51015246", "0.51005495", "0.50964665", "0.5096232", "0.50896335", "0.5088238", "0.5088238", "0.5088238" ]
0.79227203
0
Perform cleanup for this instance.
void onDestroy();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cleanup() {\r\n }", "public void cleanup() {\n }", "public void cleanup();", "@Override\n public void cleanup() {\n \n }", "@Override\n public void cleanup() {\n \n }", "public void cleanup() {\n\t}", "@Override\r\n\tpublic void cleanup() {\n\t\t\r\n\t}", "protected abstract void cleanup();", "@Override\n public void cleanup() {\n }", "@Override\r\n public void cleanup() {\n }", "@Override\n protected void performCleanup() {\n }", "@Override\n\tpublic void cleanup() {\n\n\t}", "@Override\n\tpublic void cleanup() {\n\n\t}", "public void cleanup() {\n if (cleaned) {\n return;\n }\n for (val cleanup : cleanups) {\n cleanup.accept(this);\n }\n clear(true);\n cleanups.clear();\n attributes.clear();\n if (parent != null) {\n parent.remove(this);\n }\n cleaned = true;\n }", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "public void cleanUp();", "public void cleanUp();", "public void cleanUp(){\n //Clean up the parent class, i.e. close pipes.\n super.cleanUp();\n }", "protected void cleaningUp() {\n\t}", "@Override\n public void cleanUp() {\n }", "public void cleanUp() {\r\n\t\tsuper.cleanUp() ;\r\n\t}", "private void cleanup() {\n if (mPosterBytes != null) {\n try {\n mPosterBytes.close();\n } catch (IOException ignored) {\n // Ignored.\n } finally {\n mPosterBytes = null;\n }\n }\n }", "public static void cleanUp() {\n\t\tHashDecay.stopAll();\n\t\tSystem.gc();\n\t}", "public void cleanup() {\n\t\tref.removeEventListener(listener);\n\t\tmodels.clear();\n\t\tmodelNames.clear();\n\t\tmodelNamesMapping.clear();\n\t}", "@Override\n public void destroy() {\n // destroy any persistent resources\n // such as thread pools or persistent connections\n }", "@Override\n public void destroy() {\n // clean up any resources created by initialize\n }", "@After\n\tpublic void cleanUp() {\n\t\tif (model != null) {\n\t\t\tmodel.release(true);\n\t\t\tloader.unloadAll();\n\t\t}\n\t}", "public void destroy() {\n this.bfc.cleanUp();\n }", "public void cleanup()\n {\n \tsuper.cleanup();\n _channelHandler.cleanup();\n }", "@AfterClass(alwaysRun = true)\n\tpublic void destroy() throws Exception {\n\t\tsuper.cleanup();\n\t}", "@VisibleForTesting\n public void cleanup() {\n cleanupNative();\n }", "public void cleanup()\n {\n CogTool.delayedWorkMgr.doDelayedWork(true);\n }", "@Override\n\tpublic void cleanUp() {\n\t\tofferingStrategy = null;\n\t\tacceptConditions = null;\n\t\topponentModel = null;\n\t\tnegotiationSession = null;\n\t\tutilitySpace = null;\n\t\tdagent = null;\n\t}", "public abstract void cleanUp();", "protected void cleanup() {\n try {\n if (_in != null) {\n _in.close();\n _in = null;\n }\n if (_out != null) {\n _out.close();\n _out = null;\n }\n if (_socket != null) {\n _socket.close();\n _socket = null;\n }\n } catch (java.io.IOException e) {\n }\n }", "public final void destroy()\n {\n processDestroy();\n super.destroy();\n }", "public void cleanup() {\n try {\n resManager.stopVirtualNodes();\n } catch (Exception e) {\n logger.error(ITConstants.TS + \": \" + DEL_VM_ERR, e);\n }\n logger.info(\"Cleanup done\");\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tCleanup();\r\n\t}", "void cleanUp();", "void cleanUp();", "void cleanUp();", "public void cleanUp() {\r\n\t\temfactory.close();\r\n\t}", "void cleanup();", "void cleanup();", "void cleanup();", "public void shutdown() {\n\t\tInput.cleanUp();\n\t\tVAO.cleanUp();\n\t\tTexture2D.cleanUp();\n\t\tResourceLoader.cleanUp();\n\t}", "protected abstract void cleanup() throws Throwable;", "@After\r\n\tpublic void cleanup() {\n\t}", "public void destroy() {\n \t\n }", "private void cleanUp() {\n\t\tVisualizerView mVisualizerView = MusicApplication.getInstance()\n\t\t\t\t.getVisualizerView();\n\t\tif (mVisualizerView != null) {\n\t\t\tmVisualizerView.updateVisualizer(new byte[] {});\n\t\t}\n\t\t//\t\tif (mCurrentMediaPlayer != null) {\n\t\t//\t\t\tmCurrentMediaPlayer.reset();\n\t\t//\t\t\t//\t\t\tmCurrentMediaPlayer = null;\n\t\t//\t\t\tsetState(IDLE);\n\t\t//\t\t\tcom.dj.util.Log.i(this.getClass().getSimpleName(),\n\t\t//\t\t\t\t\t\" 歌曲停止,释放资源。mCurrentMediaPlayer: \" + mCurrentMediaPlayer);\n\t\t//\t\t\t//\t\t\tcleanEQ();\n\t\t//\t\t}\n\t}", "public void cleanup() throws ResourceException {\n checkIfDestroyed();\n\n logger.fine(\" 8.- (\" + myId + \") ManagedConnection::cleanup called\");\n\n invalidateJavaMailConnections();\n }", "public final void cleanUp() {\n\t\tmgdmfunctions = null;\n\t\tmgdmlabels = null;\n\t\theap.finalize();\n\t\theap = null;\n\t\tSystem.gc();\n\t}", "public void cleanup() {\n endtracking();\n\n //sends data to UI\n MainActivity.trackingservicerunning = false;\n MainActivity.servicestopped();\n\n //stops\n stopSelf();\n }", "public void toss() {\n\t\t\tif (pool != null) {\n\t\t\t\tpool.creator.destroy(content);\n\t\t\t}\n\t\t\t// Don't allow finalize to put it back in.\n\t\t\tpool = null;\n\t\t}", "@Override\n public void cleanup() {\n if (this.cleanedUp) {\n throw new IllegalStateException(\"Tried cleanup already cleared swapchain!\");\n }\n\n if (this.swapchain != VK_NULL_HANDLE) {\n for (final var imageView : this.imageViews) {\n imageView.close();\n }\n\n vkDestroySwapchainKHR(this.deviceContext.getDeviceHandle(), this.swapchain, null);\n }\n this.cleanedUp = true;\n }", "public void destroy() {\n destroyIn(0);\n }", "@Override\n public void destroy() {\n }", "@Override\r\n\tpublic void destroy() {\n\t\tsuper.destroy();\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\tsuper.destroy();\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\tsuper.destroy();\r\n\t}", "public void cleanupData() {\n\t}", "public void cleanup() {\n this.close();\n this.delete(this.backingFileBasename + RECORDING_OUTPUT_STREAM_SUFFIX);\n this.delete(this.backingFileBasename + RECORDING_INPUT_STREAM_SUFFIX);\n }", "protected void cleanupOnClose() {\n\t}", "protected void handleCleanup() {\r\n\t\t// Implement in subclass\r\n\t}", "@Override\n public void cleanup() {\n if (this.inputStream != null) {\n try {\n this.inputStream.close();\n }\n catch (IOException var1_1) {}\n }\n this.defaultFetcher.cleanup();\n }", "private void cleanUp(){\n\t\tSSHUtil sSHUtil=(SSHUtil) SpringUtil.getBean(\"sSHUtil\");\n\t\ttry {\n\t\t\tsSHUtil.disconnect();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n protected void cleanup() {\n bundle.setParameter(BundleParameter.NODE_BUNDLE_ELAPSED_PARAM, accumulatedElapsed.get());\n this.dataProvider = null;\n usedClassLoader.dispose();\n usedClassLoader = null;\n //taskNotificationDispatcher.setBundle(this.bundle = null);\n this.taskList = null;\n this.uuidList = null;\n setJobCancelled(false);\n this.taskWrapperList = null;\n timeoutHandler.clear();\n }", "@Override\n public void destroy() {\n super.destroy();\n logger.log(Level.INFO, \"destory() Invoked\");\n }", "public void cleanup() {\r\n\t\tsuper.cleanup();\r\n\t\tfor (int i = 0; i < _composites.size(); i++) {\r\n\t\t\t_composites.get(i).cleanup();\t\r\n\t\t}\r\n\t}", "public void cleanUp() {\r\n\t\tscalerStore.cleanUp();\r\n\t\tv2Store.cleanUp();\r\n\t\tv3Store.cleanUp();\r\n\t\tv4Store.cleanUp();\r\n\t\tvnStore.cleanUp();\r\n\t\tm22Store.cleanUp();\r\n\t\tm23Store.cleanUp();\r\n\t\tm24Store.cleanUp();\r\n\t\tm32Store.cleanUp();\r\n\t\tm33Store.cleanUp();\r\n\t\tm34Store.cleanUp();\r\n\t\tm42Store.cleanUp();\r\n\t\tm43Store.cleanUp();\r\n\t\tm44Store.cleanUp();\r\n\t\tmnnStore.cleanUp();\r\n\t}", "@Override\n protected void cleanUp() throws AbortException {\n }", "public void cleanup() {\n sendBuffer(baos);\n shutdown();\n }", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "private void cleanup() {\n\t\tif (myListener!=null)\n\t\t\t_prb.removeListener(myListener);\n\t}", "final void cleanUp() {\r\n\t\t\tfor (Variable var : varRefs.keySet()) {\r\n\t\t\t\tvar.deleteObserver(this);\r\n\t\t\t}\r\n\t\t\tvarRefs.clear();\r\n\t\t}", "public void cleanup() {\n this.index = new TreeMap<String, PostingsList>();\n this.count = 0;\n }", "public static void clean() {\n kryoThreadLocalContext.remove();\n }", "@After\r\n public void tearDown() throws Exception {\r\n super.tearDown();\r\n TestHelper.cleanupEnvironment();\r\n instance = null;\r\n }", "@After\n\tpublic void cleanUp() {\n\t\tsuper.unload();\n\n\t\t// shutdown the database\n\t\tif (db != null) {\n\t\t\tdb.shutDownDb();\n\t\t}\n\t\tassertTrue(Files.deleteDir(tmpDir));\n\t}", "@Override\n\tpublic void closeAndCleanupAllData() throws Exception {\n\t\tclose();\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "void onCleanup() {\n\t\tdimensionMap.forEachValue(e -> {\n\t\t\te.releaseAllChunkData();\n\t\t\treturn true;\n\t\t});\n\t\tdimensionMap.clear();\n\t\tconnectedPlayers.clear();\n\t}", "public void cleanUp(){\n\t\tSystem.out.println(\"Destroying beans cleanUp method() for triangle\");\n\t}", "public void destroy()\r\n\t{\r\n\t\tlog.fine(\"destroy\");\r\n\t}", "@Override\r\n public void onCleanup() {\n }", "public void destroy() {\n\t\ttermMap = null;\n\t\tdoc = null;\n\t}", "@Destroy\r\n\tpublic void destroy() {\r\n\t\t// Component disposal code.\r\n\t\t// All properties are disposed.\r\n\t\temailConfiguration=null;\r\n\t}", "public void destroy() {\n\t\tsuper.destroy(); \n\t\t// Put your code here\n\t}" ]
[ "0.824533", "0.8171136", "0.81621045", "0.8136613", "0.8136613", "0.8072509", "0.7971351", "0.791371", "0.7872966", "0.78704363", "0.782507", "0.7726498", "0.7726498", "0.77184165", "0.7701825", "0.7701825", "0.7701825", "0.76770884", "0.76770884", "0.76354355", "0.76231796", "0.76175505", "0.76047224", "0.75427866", "0.7531632", "0.75310826", "0.75280213", "0.74973464", "0.7472196", "0.74644595", "0.74324447", "0.742327", "0.73942316", "0.73701876", "0.7357545", "0.73542446", "0.7335506", "0.7305167", "0.7296138", "0.72861075", "0.7271905", "0.7271905", "0.7271905", "0.72716606", "0.724973", "0.724973", "0.724973", "0.7245648", "0.7209519", "0.72060376", "0.71856314", "0.71672004", "0.71644586", "0.7162528", "0.7160612", "0.7154292", "0.71467614", "0.7125363", "0.7086911", "0.7083785", "0.7083785", "0.7083785", "0.70746636", "0.7073541", "0.7066641", "0.70440125", "0.70417047", "0.7038695", "0.7036794", "0.70357186", "0.7028388", "0.7020197", "0.70194477", "0.70148504", "0.70127904", "0.70127904", "0.70127904", "0.70127904", "0.70127904", "0.70127904", "0.70127904", "0.70127904", "0.70127904", "0.7003013", "0.7000844", "0.6999357", "0.699923", "0.698363", "0.6975431", "0.696456", "0.6959873", "0.6959873", "0.6959873", "0.6959873", "0.695752", "0.6938674", "0.69361585", "0.6929774", "0.69263065", "0.69044685", "0.690381" ]
0.0
-1
A native ad loaded successfully, check if the ad loader has finished loading and if so, insert the ads into the list.
@Override public void onUnifiedNativeAdLoaded(UnifiedNativeAd unifiedNativeAd) { mNativeAds.add(unifiedNativeAd); if (!adLoader.isLoading()) { insertAdsInMenuItems(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\r\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded(Ad ad) {\n }", "@Override\n public void onAdLoaded(Ad ad) {\n }", "@Override\n public void onAdLoaded(BannerAd ad) {\n Log.d(TAG, \"Banner successfully loaded\");\n\n }", "public void load() {\n a.G().a(this.context, this, getPlacementID(), new d.a() {\n public final <T> void a(T t) {\n AppnextAd appnextAd;\n try {\n appnextAd = a.G().a(Interstitial.this.context, (ArrayList<AppnextAd>) (ArrayList) t, Interstitial.this.getCreative(), (Ad) Interstitial.this);\n } catch (Throwable unused) {\n if (Interstitial.this.getOnAdErrorCallback() != null) {\n Interstitial.this.getOnAdErrorCallback().adError(AppnextError.NO_ADS);\n }\n appnextAd = null;\n }\n if (appnextAd != null) {\n if (Interstitial.this.getOnAdLoadedCallback() != null) {\n Interstitial.this.getOnAdLoadedCallback().adLoaded(appnextAd.getBannerID(), appnextAd.getCreativeType());\n }\n } else if (Interstitial.this.getOnAdErrorCallback() != null) {\n Interstitial.this.getOnAdErrorCallback().adError(AppnextError.NO_ADS);\n }\n }\n\n public final void error(String str) {\n if (Interstitial.this.getOnAdErrorCallback() != null) {\n Interstitial.this.getOnAdErrorCallback().adError(str);\n }\n }\n }, getCreative());\n }", "@Override\n public void onAdLoaded() {\n Log.d(\"TAG\",\"Ad loaded\");\n }", "@Override\n public void onAdLoaded() {\n Log.i(\"Ads\", \"onAdLoaded\");\n }", "@Override\n public void onAdLoaded() {\n Log.i(\"Ads\", \"onAdLoaded\");\n }", "@Override\n public void onAdLoaded() {\n Log.i(\"Ads\", \"onAdLoaded\");\n }", "private void loadBannerAds() {\n // Load the first banner ad in the items list (subsequent ads will be loaded automatically\n // in sequence).\n loadBannerAd(0);\n }", "@Override\n public void onAdLoaded(Ad ad) {\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.e(\"MainActivity\", \"The previous native ad failed to load. Attempting to\"\n + \" load another.\");\n if (!adLoader.isLoading()) {\n insertAdsInMenuItems();\n }\n }", "@Override\n public void onAdLoaded(Ad ad) {\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n // Show the ad\n\n }", "@Override\n public void onAdLoaded(AppOpenAd ad) {\n Log.d(TAG, \"Ad was loaded.\");\n appOpenAd = ad;\n isLoadingAd = false;\n\n setAppOpenEvents();\n\n KrollDict sCallback = new KrollDict();\n\n if (hasListeners(AdmobModule.AD_LOADED)) {\n fireEvent(AdmobModule.AD_LOADED, sCallback);\n }\n\n // DEPRECATED\n if (hasListeners(AdmobModule.AD_RECEIVED)) {\n org.appcelerator.kroll.common.Log.w(TAG, \"AD_RECEIVED has been deprecated and should be replaced by AD_LOADED\");\n fireEvent(AdmobModule.AD_RECEIVED, sCallback);\n }\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "private void LoadAdd() {\n\t\tAdRequest adRequest = new AdRequest.Builder().build();\n\t\tmInterstitialAd.loadAd(adRequest);\n\t\t// Toast.makeText(MainActivity.this, \"loading\",\n\t\t// Toast.LENGTH_SHORT).show();\n\t}", "public void loadAds(){\n\t\tAdRequest adRequest = new AdRequest.Builder()\n\t .build();\n\t\t\n\t adView.loadAd(adRequest);\n\t}", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdLoaded() {\n Log.i(\"Ads\", \"xxx WelcomeAd onAdLoaded\");\n }", "@Override\n public void onAdLoaded() {\n sponsoredLinearLayout.setVisibility(View.VISIBLE);\n adView.setVisibility(View.VISIBLE);\n adProgressBar.setVisibility(View.GONE);\n adFailedLinearLayout.setVisibility(View.GONE);\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\r\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdLoaded(Ad ad) {\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n // Show the ad\n// interstitialAd.show();\n }", "@Override\n\tpublic void adLoadingCompleted(SASAdElement adElement) {\n\t\tMoPubExtension.log(\"SAS interstitial loaded and displayed.\");\n\t\tif(interstitial != null) {\n\t\t\tinterstitial.setOnClickListener(this);\n\t\t\tinterstitial.executeOnUIThread(new Runnable() {\n\t\t\t\t@Override public void run() {\n\t\t\t\t\tif(listener != null)\n\t\t\t\t\t\tlistener.onInterstitialShown();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "@Override\n public void onAdLoaded() {\n if (mInterstitialAd.isLoaded()) {\n mInterstitialAd.show();\n } else {\n Log.d(\"TAG\", \"The interstitial wasn't loaded yet.\");\n }\n }", "@Override\n public void onMediaDownloaded(Ad ad) {\n Log.e(TAG, \"Native ad finished downloading all assets.\");\n }", "@Override\r\n public void onAdLoaded()//When interstitial is ready to be shoved\r\n {\r\n mInterstitial.showAd();\r\n }", "private void displayAd() {\n\t\tif (mInterstitialAd != null && mInterstitialAd.isLoaded()) {\n\t\t\tmInterstitialAd.show();\n\t\t} else {\n\t\t\t// Toast.makeText(MainActivity.this, \"Ad did not load\",\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t// LoadAdd();\n\t\t\t/*\n\t\t\t * if (!mInterstitialAd.isLoaded()) { Toast.makeText(mcq.this,\n\t\t\t * \"not load\", Toast.LENGTH_SHORT).show(); } else {\n\t\t\t * Toast.makeText(mcq.this, \" not \", Toast.LENGTH_SHORT) .show(); }\n\t\t\t */\n\t\t}\n\t}", "@Override\n public void onAdLoaded(Ad ad) {\n if (nativeAdfb == null || nativeAdfb != ad) {\n return;\n }\n // Inflate Native Ad into Container\n }", "@Override\n public void onAdFailedToLoad(LoadAdError loadAdError) {\n String error =\n String.format(\n \"domain: %s, code: %d, message: %s\",\n loadAdError.getDomain(), loadAdError.getCode(), loadAdError.getMessage());\n Log.e(\n \"MainActivity\",\n \"The previous banner ad failed to load with error: \"\n + error\n + \". Attempting to\"\n + \" load the next banner ad in the items list.\");\n loadBannerAd(index + ITEMS_PER_AD);\n }", "@VisibleForTesting\n public void handleAdsAvailable() {\n if (this.mHasPlacedAds) {\n notifyNeedsPlacement();\n return;\n }\n if (this.mHasReceivedPositions) {\n placeInitialAds(this.mPendingPlacementData);\n }\n this.mHasReceivedAds = true;\n }", "@Override\n public void onAdLoaded(Ad ad) {\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n // Show the ad\n //pd.cancel();\n interstitialAd.show();\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.d(\"TAG\",\"Ad failed to load\");\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n Log.i(TAG, \"onAdLoaded\");\n }", "private void HandleLoadingAds(){\n\n\n recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(RecyclerView recyclerView, int newState) {\n super.onScrollStateChanged(recyclerView, newState);\n\n if(newState== AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL){\n isScrolling=true;\n }\n }\n\n @Override\n public void onScrolled(RecyclerView recyclerView, int dx, int dy) {\n super.onScrolled(recyclerView, dx, dy);\n\n totalItems=layoutManager.getItemCount();\n currentItems=layoutManager.getChildCount();\n scrolledOutItems=layoutManager.findFirstVisibleItemPosition();\n\n if(isScrolling==true&&totalItems==(currentItems+scrolledOutItems)){\n\n isScrolling=false;\n\n loadMoreData();\n }\n }\n });\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n Log.i(TAG, \"onAdLoaded\");\n }", "@Override\n public void onAdLoaded() {\n mButton.setEnabled(true);\n if (mAd.isLoaded()){\n mAd.show();\n }\n\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n Log.d(TAG, \"onAdLoaded\" + mInterstitialAd);\n showAdsInterstitial();\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n Log.i(\"TAG\", \"onAdLoaded\");\n }", "@Override\n public void onAdFailedToLoad(LoadAdError loadAdError) {\n org.appcelerator.kroll.common.Log.d(TAG, \"onAdFailedToLoad\");\n Log.d(TAG, loadAdError.getMessage());\n isLoadingAd = false;\n\n KrollDict errorCallback = new KrollDict();\n errorCallback.put(\"cause\", loadAdError.getCause());\n errorCallback.put(\"code\", loadAdError.getCode());\n errorCallback.put(\"reason\", AdmobModule.getErrorReason(loadAdError.getCode()));\n errorCallback.put(\"message\", loadAdError.getMessage());\n\n if (hasListeners(AdmobModule.AD_FAILED_TO_LOAD)) {\n fireEvent(AdmobModule.AD_FAILED_TO_LOAD, errorCallback);\n }\n\n //DEPRECATED\n if (hasListeners(AdmobModule.AD_NOT_RECEIVED)) {\n org.appcelerator.kroll.common.Log.w(TAG, \"AD_NOT_RECEIVED has been deprecated and should be replaced by AD_FAILED_TO_LOAD\");\n fireEvent(AdmobModule.AD_NOT_RECEIVED, errorCallback);\n }\n }", "public void onSuccessCallback(List<DocumentSnapshot> dataList) {\r\n List<PantAd> adList =PantAdList.getinstance();\r\n adList.clear();\r\n for (DocumentSnapshot document : dataList) {\r\n Log.d(\"firestore manager\", document.getId() + \" => \" + document.getData());\r\n PantAd ad = new PantAd();\r\n ad.setId(document.getId());\r\n ad.setLatitude((double)document.get(\"latitude\"));\r\n ad.setLongitude((double)document.get(\"longitude\"));\r\n ad.setPhoneNr((String) document.get(\"phoneNr\"));\r\n String nrCans = Long.toString((Long) document.get(\"nrOfCans\"));\r\n ad.setNrOfCans(nrCans);\r\n adList.add(ad);\r\n FirebaseCloudStorageManager.getImageById(document.getId(), this);\r\n }\r\n callbackInterface.onSuccessfulReadCallback();\r\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.i(\"Ads\", \"onAdFailedToLoad\");\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.e(\"MainActivity\", \"The previous ad failed to load. Attempting to\"\n + \" load the next ad in the items list at position \" + index);\n loadNativeExpressAd(index + ITEMS_PER_AD);\n }", "void onInterstitialAdFinished();", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.i(\"Ads\", \"onAdFailedToLoad\");\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.i(\"Ads\", \"onAdFailedToLoad\");\n }", "@Override\n public void run() {\n if (mInterstitialAd.isLoaded()) {\n mInterstitialAd.show();\n }\n }", "@Override\n public void onAdFailedToLoad(int i) {\n Log.w(TAG, \"onAdFailedToLoad:\" + i);\n }", "@Override\n\t\t\t\tpublic void onComplete(ArrayList<GoodsItem> mGoodsItems) {\n\t\t\t\t\tmHandler.postDelayed(new Runnable() {\n\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tonLoadFinished();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}, 1000);\n\t\t\t\t\tmLoadSuccess = true;\n\t\t\t\t}", "@Override\n public void onAdFailedToLoad(int errorCode) {\n sponsoredLinearLayout.setVisibility(View.GONE);\n adView.setVisibility(View.GONE);\n adProgressBar.setVisibility(View.GONE);\n adFailedLinearLayout.setVisibility(View.VISIBLE);\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n logger.logError(TAG, \"ad failed to load: error code: \" + errorCode);\n }", "private void loadBannerAd(final int index) {\n\n if (index >= recyclerViewItems.size()) {\n return;\n }\n\n Object item = recyclerViewItems.get(index);\n if (!(item instanceof AdView)) {\n throw new ClassCastException(\"Expected item at index \" + index + \" to be a banner ad\"\n + \" ad.\");\n }\n\n final AdView adView = (AdView) item;\n\n // Set an AdListener on the AdView to wait for the previous banner ad\n // to finish loading before loading the next ad in the items list.\n adView.setAdListener(\n new AdListener() {\n @Override\n public void onAdLoaded() {\n super.onAdLoaded();\n // The previous banner ad loaded successfully, call this method again to\n // load the next ad in the items list.\n loadBannerAd(index + ITEMS_PER_AD);\n }\n\n @Override\n public void onAdFailedToLoad(LoadAdError loadAdError) {\n // The previous banner ad failed to load. Call this method again to load\n // the next ad in the items list.\n String error =\n String.format(\n \"domain: %s, code: %d, message: %s\",\n loadAdError.getDomain(), loadAdError.getCode(), loadAdError.getMessage());\n Log.e(\n \"MainActivity\",\n \"The previous banner ad failed to load with error: \"\n + error\n + \". Attempting to\"\n + \" load the next banner ad in the items list.\");\n loadBannerAd(index + ITEMS_PER_AD);\n }\n });\n\n // Load the banner ad.\n adView.loadAd(new AdRequest.Builder().build());\n }", "@Override\n public void onError(Ad ad, AdError adError) {\n Log.e(TAG, \"Native ad failed to load: \" + adError.getErrorMessage());\n }", "@Override\n public void onAdLoaded() {\n mAdView.setVisibility(View.VISIBLE);\n }", "@Override\n public void onAdLoaded() {\n adContainerView.setVisibility(View.VISIBLE);\n }", "private void bannerAds() {\n Log.d(TAG, \"bannerAds invoked\");\n BannerAdView bannerAdView = new BannerAdView(MainActivity.this);\n bannerAdView.loadOnAttach();\n FrameLayout bannerPlaceholder = findViewById(R.id.banner_placeholder);\n bannerPlaceholder.addView(bannerAdView);\n bannerAdView = new BannerAdView(this)\n .withListener(new BannerAdListener() {\n @Override\n public void onAdError(BannerAd ad, String error) {\n // Called when the banner triggered an error\n Log.d(TAG, \"Something went wrong with the request: \" + error);\n }\n\n @Override\n public void onAdLoaded(BannerAd ad) {\n // Called when the banner has been successfully loaded\n Log.d(TAG, \"Banner successfully loaded\");\n\n }\n\n @Override\n public void onAdClicked(BannerAd ad) {\n // Called when the banner was clicked\n Log.d(TAG, \"User clicked on banner\");\n }\n\n @Override\n public void onAdLeftApplication(BannerAd ad) {\n // Called when the banner interaction causes an external application to be open\n Log.d(TAG, \"User directed out of app by banner\");\n }\n });\n }", "@Override\n public void onAdLoaded(Ad ad) {\n interstitialAd.show();\n enableButton();\n }", "@Override\n public void onAdLoaded() {\n Log.i(\"Ads\", \"xxx Banner onAdLoaded; isShow==\" + view.isShown());\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n interstitialAd.show(context);\n\n }", "private boolean isAdAvailable() {\n return appOpenAd != null;\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.i(\"Ads\", \"xxx Banner onAdFailedToLoad: \" + errorCode);\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\n public void onAdOpened() {\n }", "@Override\r\n public void onAdOpened() {\n }", "@Override\n public void onRewardedAdFailedToLoad(LoadAdError adError) {\n }", "@Override\n public void onRewardedAdFailedToLoad(LoadAdError adError) {\n }", "@Override\n public void onAdOpened() {\n }" ]
[ "0.687776", "0.68411815", "0.68411815", "0.68411815", "0.68411815", "0.68411815", "0.68411815", "0.68411815", "0.68411815", "0.6812601", "0.6600043", "0.65520954", "0.65236604", "0.651985", "0.6449565", "0.64147395", "0.64147395", "0.6399776", "0.63694054", "0.6326331", "0.628462", "0.6197523", "0.6170221", "0.6121552", "0.6100128", "0.6077173", "0.6066435", "0.6066435", "0.6043199", "0.6042884", "0.60246444", "0.60246444", "0.60246444", "0.60246444", "0.60246444", "0.60246444", "0.60246444", "0.60246444", "0.60246444", "0.60246444", "0.60246444", "0.60201925", "0.60063684", "0.59842443", "0.59676135", "0.5944957", "0.59438914", "0.59426683", "0.59283465", "0.59203744", "0.59145206", "0.5880601", "0.58578515", "0.58525914", "0.5819026", "0.5807987", "0.5805486", "0.5788684", "0.5780966", "0.57670665", "0.57543623", "0.5732615", "0.571673", "0.5688164", "0.5642352", "0.5642352", "0.5598571", "0.5586803", "0.55718505", "0.55350184", "0.5533667", "0.5522295", "0.5496845", "0.5495758", "0.5473506", "0.5460616", "0.5439616", "0.5404278", "0.53565544", "0.53465956", "0.5346002", "0.5338881", "0.5338881", "0.5338881", "0.533668", "0.533668", "0.533668", "0.533668", "0.533668", "0.533668", "0.533668", "0.533668", "0.533668", "0.533668", "0.533668", "0.533668", "0.53140503", "0.5308664", "0.5308664", "0.5307953" ]
0.68247813
9
A native ad failed to load, check if the ad loader has finished loading and if so, insert the ads into the list.
@Override public void onAdFailedToLoad(int errorCode) { Log.e("MainActivity", "The previous native ad failed to load. Attempting to" + " load another."); if (!adLoader.isLoading()) { insertAdsInMenuItems(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onAdFailedToLoad(LoadAdError loadAdError) {\n String error =\n String.format(\n \"domain: %s, code: %d, message: %s\",\n loadAdError.getDomain(), loadAdError.getCode(), loadAdError.getMessage());\n Log.e(\n \"MainActivity\",\n \"The previous banner ad failed to load with error: \"\n + error\n + \". Attempting to\"\n + \" load the next banner ad in the items list.\");\n loadBannerAd(index + ITEMS_PER_AD);\n }", "private void loadBannerAds() {\n // Load the first banner ad in the items list (subsequent ads will be loaded automatically\n // in sequence).\n loadBannerAd(0);\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n }", "@Override\r\n public void onAdFailedToLoad(int errorCode) {\n }", "public void load() {\n a.G().a(this.context, this, getPlacementID(), new d.a() {\n public final <T> void a(T t) {\n AppnextAd appnextAd;\n try {\n appnextAd = a.G().a(Interstitial.this.context, (ArrayList<AppnextAd>) (ArrayList) t, Interstitial.this.getCreative(), (Ad) Interstitial.this);\n } catch (Throwable unused) {\n if (Interstitial.this.getOnAdErrorCallback() != null) {\n Interstitial.this.getOnAdErrorCallback().adError(AppnextError.NO_ADS);\n }\n appnextAd = null;\n }\n if (appnextAd != null) {\n if (Interstitial.this.getOnAdLoadedCallback() != null) {\n Interstitial.this.getOnAdLoadedCallback().adLoaded(appnextAd.getBannerID(), appnextAd.getCreativeType());\n }\n } else if (Interstitial.this.getOnAdErrorCallback() != null) {\n Interstitial.this.getOnAdErrorCallback().adError(AppnextError.NO_ADS);\n }\n }\n\n public final void error(String str) {\n if (Interstitial.this.getOnAdErrorCallback() != null) {\n Interstitial.this.getOnAdErrorCallback().adError(str);\n }\n }\n }, getCreative());\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.e(\"MainActivity\", \"The previous ad failed to load. Attempting to\"\n + \" load the next ad in the items list at position \" + index);\n loadNativeExpressAd(index + ITEMS_PER_AD);\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\r\n public void onAdLoaded() {\n }", "@Override\n public void onUnifiedNativeAdLoaded(UnifiedNativeAd unifiedNativeAd) {\n mNativeAds.add(unifiedNativeAd);\n if (!adLoader.isLoading()) {\n insertAdsInMenuItems();\n }\n }", "@Override\n public void onAdFailedToLoad(LoadAdError loadAdError) {\n org.appcelerator.kroll.common.Log.d(TAG, \"onAdFailedToLoad\");\n Log.d(TAG, loadAdError.getMessage());\n isLoadingAd = false;\n\n KrollDict errorCallback = new KrollDict();\n errorCallback.put(\"cause\", loadAdError.getCause());\n errorCallback.put(\"code\", loadAdError.getCode());\n errorCallback.put(\"reason\", AdmobModule.getErrorReason(loadAdError.getCode()));\n errorCallback.put(\"message\", loadAdError.getMessage());\n\n if (hasListeners(AdmobModule.AD_FAILED_TO_LOAD)) {\n fireEvent(AdmobModule.AD_FAILED_TO_LOAD, errorCallback);\n }\n\n //DEPRECATED\n if (hasListeners(AdmobModule.AD_NOT_RECEIVED)) {\n org.appcelerator.kroll.common.Log.w(TAG, \"AD_NOT_RECEIVED has been deprecated and should be replaced by AD_FAILED_TO_LOAD\");\n fireEvent(AdmobModule.AD_NOT_RECEIVED, errorCallback);\n }\n }", "public void loadAds(){\n\t\tAdRequest adRequest = new AdRequest.Builder()\n\t .build();\n\t\t\n\t adView.loadAd(adRequest);\n\t}", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.d(\"TAG\",\"Ad failed to load\");\n }", "@Override\n public void onAdFailedToLoad(int i) {\n Log.w(TAG, \"onAdFailedToLoad:\" + i);\n }", "@Override\n public void onAdLoaded(Ad ad) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.i(\"Ads\", \"onAdFailedToLoad\");\n }", "private void LoadAdd() {\n\t\tAdRequest adRequest = new AdRequest.Builder().build();\n\t\tmInterstitialAd.loadAd(adRequest);\n\t\t// Toast.makeText(MainActivity.this, \"loading\",\n\t\t// Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void onAdLoaded(Ad ad) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.i(\"Ads\", \"onAdFailedToLoad\");\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.i(\"Ads\", \"onAdFailedToLoad\");\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n logger.logError(TAG, \"ad failed to load: error code: \" + errorCode);\n }", "@Override\n public void onAdLoaded() {\n Log.d(\"TAG\",\"Ad loaded\");\n }", "@Override\n public void onError(Ad ad, AdError adError) {\n Log.e(TAG, \"Native ad failed to load: \" + adError.getErrorMessage());\n }", "@Override\n public void onAdLoaded() {\n Log.i(\"Ads\", \"onAdLoaded\");\n }", "@Override\n public void onAdLoaded() {\n Log.i(\"Ads\", \"onAdLoaded\");\n }", "@Override\n public void onAdLoaded() {\n Log.i(\"Ads\", \"onAdLoaded\");\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n sponsoredLinearLayout.setVisibility(View.GONE);\n adView.setVisibility(View.GONE);\n adProgressBar.setVisibility(View.GONE);\n adFailedLinearLayout.setVisibility(View.VISIBLE);\n }", "@Override\n public void onAdLoaded(BannerAd ad) {\n Log.d(TAG, \"Banner successfully loaded\");\n\n }", "@Override\n public void onRewardedAdFailedToLoad(LoadAdError adError) {\n }", "@Override\n public void onRewardedAdFailedToLoad(LoadAdError adError) {\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.i(\"Ads\", \"xxx Banner onAdFailedToLoad: \" + errorCode);\n }", "private void HandleLoadingAds(){\n\n\n recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(RecyclerView recyclerView, int newState) {\n super.onScrollStateChanged(recyclerView, newState);\n\n if(newState== AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL){\n isScrolling=true;\n }\n }\n\n @Override\n public void onScrolled(RecyclerView recyclerView, int dx, int dy) {\n super.onScrolled(recyclerView, dx, dy);\n\n totalItems=layoutManager.getItemCount();\n currentItems=layoutManager.getChildCount();\n scrolledOutItems=layoutManager.findFirstVisibleItemPosition();\n\n if(isScrolling==true&&totalItems==(currentItems+scrolledOutItems)){\n\n isScrolling=false;\n\n loadMoreData();\n }\n }\n });\n }", "@Override\n public void onAdFailedToLoad(LoadAdError adError) {\n Log.d(\"ADMOB_ERROR_CODE\", \"admob error code: \" + adError);\n }", "private void loadBannerAd(final int index) {\n\n if (index >= recyclerViewItems.size()) {\n return;\n }\n\n Object item = recyclerViewItems.get(index);\n if (!(item instanceof AdView)) {\n throw new ClassCastException(\"Expected item at index \" + index + \" to be a banner ad\"\n + \" ad.\");\n }\n\n final AdView adView = (AdView) item;\n\n // Set an AdListener on the AdView to wait for the previous banner ad\n // to finish loading before loading the next ad in the items list.\n adView.setAdListener(\n new AdListener() {\n @Override\n public void onAdLoaded() {\n super.onAdLoaded();\n // The previous banner ad loaded successfully, call this method again to\n // load the next ad in the items list.\n loadBannerAd(index + ITEMS_PER_AD);\n }\n\n @Override\n public void onAdFailedToLoad(LoadAdError loadAdError) {\n // The previous banner ad failed to load. Call this method again to load\n // the next ad in the items list.\n String error =\n String.format(\n \"domain: %s, code: %d, message: %s\",\n loadAdError.getDomain(), loadAdError.getCode(), loadAdError.getMessage());\n Log.e(\n \"MainActivity\",\n \"The previous banner ad failed to load with error: \"\n + error\n + \". Attempting to\"\n + \" load the next banner ad in the items list.\");\n loadBannerAd(index + ITEMS_PER_AD);\n }\n });\n\n // Load the banner ad.\n adView.loadAd(new AdRequest.Builder().build());\n }", "@Override\n public void onAdLoaded(Ad ad) {\n if (nativeAdfb == null || nativeAdfb != ad) {\n return;\n }\n // Inflate Native Ad into Container\n }", "@Override\n public void onAdLoaded(Ad ad) {\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n\n }", "@Override\n public void onAdLoaded() {\n sponsoredLinearLayout.setVisibility(View.VISIBLE);\n adView.setVisibility(View.VISIBLE);\n adProgressBar.setVisibility(View.GONE);\n adFailedLinearLayout.setVisibility(View.GONE);\n }", "@Override\n public void onAdFailedToLoad(LoadAdError adError) {\n adContainerView.setVisibility(View.GONE);\n }", "@Override\n public void onAdFailedToLoad(int errorCode) {\n Log.i(\"Ads\", \"xxx WelcomeAd onAdFailedToLoad: \" + errorCode);\n }", "@Override\n public void onAdLoaded(Ad ad) {\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n // Show the ad\n\n }", "@VisibleForTesting\n public void handleAdsAvailable() {\n if (this.mHasPlacedAds) {\n notifyNeedsPlacement();\n return;\n }\n if (this.mHasReceivedPositions) {\n placeInitialAds(this.mPendingPlacementData);\n }\n this.mHasReceivedAds = true;\n }", "@Override\n public void onRewardedVideoAdFailedToLoad(int i) {\n }", "@Override\n public void onAdLoaded() {\n Log.i(\"Ads\", \"xxx WelcomeAd onAdLoaded\");\n }", "@Override\n public void onAdLoaded() {\n if (mInterstitialAd.isLoaded()) {\n mInterstitialAd.show();\n } else {\n Log.d(\"TAG\", \"The interstitial wasn't loaded yet.\");\n }\n }", "@Override\n public void onAdLoaded(Ad ad) {\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n // Show the ad\n //pd.cancel();\n interstitialAd.show();\n }", "private void displayAd() {\n\t\tif (mInterstitialAd != null && mInterstitialAd.isLoaded()) {\n\t\t\tmInterstitialAd.show();\n\t\t} else {\n\t\t\t// Toast.makeText(MainActivity.this, \"Ad did not load\",\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t// LoadAdd();\n\t\t\t/*\n\t\t\t * if (!mInterstitialAd.isLoaded()) { Toast.makeText(mcq.this,\n\t\t\t * \"not load\", Toast.LENGTH_SHORT).show(); } else {\n\t\t\t * Toast.makeText(mcq.this, \" not \", Toast.LENGTH_SHORT) .show(); }\n\t\t\t */\n\t\t}\n\t}", "@Override\n public void onAdLoaded(AppOpenAd ad) {\n Log.d(TAG, \"Ad was loaded.\");\n appOpenAd = ad;\n isLoadingAd = false;\n\n setAppOpenEvents();\n\n KrollDict sCallback = new KrollDict();\n\n if (hasListeners(AdmobModule.AD_LOADED)) {\n fireEvent(AdmobModule.AD_LOADED, sCallback);\n }\n\n // DEPRECATED\n if (hasListeners(AdmobModule.AD_RECEIVED)) {\n org.appcelerator.kroll.common.Log.w(TAG, \"AD_RECEIVED has been deprecated and should be replaced by AD_LOADED\");\n fireEvent(AdmobModule.AD_RECEIVED, sCallback);\n }\n }", "@Override\n public void onMediaDownloaded(Ad ad) {\n Log.e(TAG, \"Native ad finished downloading all assets.\");\n }", "@Override\n public void onAdLoaded(Ad ad) {\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n // Show the ad\n// interstitialAd.show();\n }", "@Override\r\n public void onAdLoaded()//When interstitial is ready to be shoved\r\n {\r\n mInterstitial.showAd();\r\n }", "@Override\r\n\tpublic void onFailedToReceiveAd(Ad arg0, ErrorCode arg1) {\n\t\tLog.d(\"AdMob\", \"失敗\");\r\n\t arg0.stopLoading();\r\n\t arg0.loadAd(new AdRequest());\r\n\t}", "private void addBannerAds() {\n // Loop through the items array and place a new banner ad in every ith position in\n // the items List.\n for (int i = 0; i <= recyclerViewItems.size(); i += ITEMS_PER_AD) {\n final AdView adView = new AdView(MainActivity.this);\n adView.setAdSize(AdSize.BANNER);\n adView.setAdUnitId(AD_UNIT_ID);\n recyclerViewItems.add(i, adView);\n }\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n Log.i(TAG, \"onAdLoaded\");\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n Log.i(TAG, \"onAdLoaded\");\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n Log.d(TAG, \"onAdLoaded\" + mInterstitialAd);\n showAdsInterstitial();\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n Log.i(\"TAG\", \"onAdLoaded\");\n }", "private void bannerAds() {\n Log.d(TAG, \"bannerAds invoked\");\n BannerAdView bannerAdView = new BannerAdView(MainActivity.this);\n bannerAdView.loadOnAttach();\n FrameLayout bannerPlaceholder = findViewById(R.id.banner_placeholder);\n bannerPlaceholder.addView(bannerAdView);\n bannerAdView = new BannerAdView(this)\n .withListener(new BannerAdListener() {\n @Override\n public void onAdError(BannerAd ad, String error) {\n // Called when the banner triggered an error\n Log.d(TAG, \"Something went wrong with the request: \" + error);\n }\n\n @Override\n public void onAdLoaded(BannerAd ad) {\n // Called when the banner has been successfully loaded\n Log.d(TAG, \"Banner successfully loaded\");\n\n }\n\n @Override\n public void onAdClicked(BannerAd ad) {\n // Called when the banner was clicked\n Log.d(TAG, \"User clicked on banner\");\n }\n\n @Override\n public void onAdLeftApplication(BannerAd ad) {\n // Called when the banner interaction causes an external application to be open\n Log.d(TAG, \"User directed out of app by banner\");\n }\n });\n }", "@Override\n public void run() {\n if (mInterstitialAd.isLoaded()) {\n mInterstitialAd.show();\n }\n }", "@Override\n public void onAdLoaded() {\n mButton.setEnabled(true);\n if (mAd.isLoaded()){\n mAd.show();\n }\n\n }", "@Override\n public void onAdClosed() {\n mAdView.loadAd(adRequest);\n }", "private void loadInterstitial(AdRequest adRequest) {\n mInterstitialAd.loadAd(adRequest);\n }", "@Override\n public void onAdUnavailable(final String target) {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n String event = \"javascript:cordova.fireDocumentEvent('onAdUnavailable', {'zone':'\"+target+\"'})\";\n webView.loadUrl(event);\n }\n });\n\n }", "private void loadInterstitial() {\n AdRequest adRequest = new AdRequest.Builder()\n .setRequestAgent(\"android_studio:ad_template\").build();\n mInterstitialAd.loadAd(adRequest);\n }", "@Override\n\tpublic void adLoadingCompleted(SASAdElement adElement) {\n\t\tMoPubExtension.log(\"SAS interstitial loaded and displayed.\");\n\t\tif(interstitial != null) {\n\t\t\tinterstitial.setOnClickListener(this);\n\t\t\tinterstitial.executeOnUIThread(new Runnable() {\n\t\t\t\t@Override public void run() {\n\t\t\t\t\tif(listener != null)\n\t\t\t\t\t\tlistener.onInterstitialShown();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "private void loadMoreData(){\n\n //just for tesing\n\n progressBar.setVisibility(View.VISIBLE);\n\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n\n adsList.add(new AdvertismentClass(1,\"Shoe\",1000,800,\"10/8/2018\",\"30/10/2018\",false,\"Adidas\"));\n adsList.add(new AdvertismentClass(1,\"Shoe\",1000,800,\"10/8/2018\",\"30/10/2018\",true,\"Adidas\"));\n adsList.add(new AdvertismentClass(1,\"Shoe\",1000,800,\"10/8/2018\",\"30/10/2018\",true,\"Adidas\"));\n adsList.add(new AdvertismentClass(1,\"Shoe\",1000,800,\"10/8/2018\",\"30/10/2018\",false,\"Adidas\"));\n\n progressBar.setVisibility(View.GONE);\n\n adapter.notifyDataSetChanged();\n }\n },3000);\n\n }", "private void loadInterstitial() {\n AdRequest adRequest = new AdRequest.Builder()\n .setRequestAgent(\"android_studio:ad_template\").build();\n mInterstitialAd.loadAd(adRequest);\n }", "private void loading(){\n mDbHelper = new DbHelper(getActivity());\n if(!(mDbHelper.getPlanCount() == 0)){\n plan_list.addAll(mDbHelper.getAllPlan());\n }\n refreshList();\n }", "private void requestNewBanner(){\n AdView mAdView = (AdView) findViewById(R.id.adView);\n AdRequest adRequest = new AdRequest.Builder().build();\n mAdView.loadAd(adRequest);\n }", "public final /* synthetic */ void d() {\n this.f8097d.onAdFailedToLoad(1);\n }", "public void onSuccessCallback(List<DocumentSnapshot> dataList) {\r\n List<PantAd> adList =PantAdList.getinstance();\r\n adList.clear();\r\n for (DocumentSnapshot document : dataList) {\r\n Log.d(\"firestore manager\", document.getId() + \" => \" + document.getData());\r\n PantAd ad = new PantAd();\r\n ad.setId(document.getId());\r\n ad.setLatitude((double)document.get(\"latitude\"));\r\n ad.setLongitude((double)document.get(\"longitude\"));\r\n ad.setPhoneNr((String) document.get(\"phoneNr\"));\r\n String nrCans = Long.toString((Long) document.get(\"nrOfCans\"));\r\n ad.setNrOfCans(nrCans);\r\n adList.add(ad);\r\n FirebaseCloudStorageManager.getImageById(document.getId(), this);\r\n }\r\n callbackInterface.onSuccessfulReadCallback();\r\n }", "@Override\n public void onAdLoaded(Ad ad) {\n interstitialAd.show();\n enableButton();\n }", "@Override\n\t\t\tpublic void onAdClosed() {\n\t\t\t\tmInterstitialAd.loadAd(adRequest);\n\t\t\t}", "@Override\n public void onAdClosed() {\n vInterstitialAdEntertainingFactActivity.loadAd(new AdRequest.Builder().build());\n }", "void onInterstitialAdFinished();", "@Override\n public void onAdLoaded() {\n mAdView.setVisibility(View.VISIBLE);\n }", "@Override\n public void onInterstitialDisplayed(Ad ad) {\n }", "@Override\n public void onInterstitialDisplayed(Ad ad) {\n }", "@Override\n public void onAdLoaded() {\n adContainerView.setVisibility(View.VISIBLE);\n }", "@Override\n public void onAdError(BannerAd ad, String error) {\n Log.d(TAG, \"Something went wrong with the request: \" + error);\n }", "public void onLoadingFailure() {\n AppSession.showDataLoadError(\"post\");\n onLoadingComplete();\n }" ]
[ "0.6773519", "0.6654509", "0.6586618", "0.6552209", "0.6552209", "0.6514985", "0.6514985", "0.6514985", "0.6514985", "0.6514985", "0.6514985", "0.6514985", "0.6514985", "0.6514985", "0.6514985", "0.6514985", "0.6510663", "0.65062165", "0.6483152", "0.6472204", "0.6466612", "0.6466612", "0.6466612", "0.6466612", "0.6466612", "0.6466612", "0.6466612", "0.6466612", "0.6455784", "0.6437427", "0.6379473", "0.6353293", "0.63392144", "0.6309073", "0.62761754", "0.6255411", "0.6254753", "0.62459993", "0.61754555", "0.61754555", "0.60997754", "0.6070418", "0.6030051", "0.60077417", "0.60077417", "0.6002328", "0.5969932", "0.5951813", "0.59505725", "0.59505725", "0.58664066", "0.5854904", "0.58371395", "0.5826436", "0.5820059", "0.57978004", "0.5743671", "0.5725679", "0.5724755", "0.56580585", "0.56462026", "0.56242096", "0.5621943", "0.56104213", "0.5609812", "0.56045413", "0.5580735", "0.5544755", "0.55265844", "0.548633", "0.5432735", "0.5431062", "0.53989816", "0.53894526", "0.533687", "0.53271496", "0.53121364", "0.52981097", "0.5294741", "0.5241898", "0.52345854", "0.5217724", "0.5215293", "0.52079135", "0.5189125", "0.5188014", "0.51852185", "0.51750875", "0.51517385", "0.5140573", "0.5125361", "0.5114294", "0.51046276", "0.5087805", "0.5059725", "0.5057835", "0.5057835", "0.50558543", "0.50407374", "0.5034466" ]
0.68046755
0
TODO Autogenerated method stub
public static void main(String[] args) { Scanner scan = new Scanner(System.in); int A = scan.nextInt(); int B = scan.nextInt(); long x = scan.nextInt(); long y = scan.nextInt(); long z = scan.nextInt(); long requiredA = x * 2 + y; long requiredB = y + z * 3; long neededA = Math.max(0, requiredA - A); long neededB = Math.max(0, requiredB - B); System.out.print(neededA + neededB); }
{ "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
implementations for extended InterpreterValue >> numberoperations This function gets executed when the operator '+' is used on the double
@Override public InterpreterValue add(InterpreterValue v) { // If the given value is a IntegerValue create a new DoubleValue from // the addition-result if(v instanceof IntegerValue) return new DoubleValue(getValue() + ((IntegerValue) v).getValue()); // If the given value is a DoubleValue create a new DoubleValue from // the addition-result if(v instanceof DoubleValue) return new DoubleValue(getValue() + ((DoubleValue) v).getValue()); // In other case just throw an error throw new Error("Operator '+' is not defined for type double and " + v.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add()\r\n {\r\n resultDoubles = Operations.addition(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "protected abstract double operation(double val);", "BaseNumber add(BaseNumber operand);", "public void enfoncerPlus() {\n\t\ttry {\n\t\t\tthis.op = new Plus();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "void add(double val) {\r\n\t\tresult = result + val;\r\n\t}", "@Override\n\tpublic void visit(Addition arg0) {\n\t\t\n\t}", "@Override\n public void addNumbers() {\n calculator.add(2, 2);\n }", "@Override\n public void outPlusExp(PlusExp node)\n {\n Type lexpType = this.mCurrentST.getExpType(node.getLExp());\n Type rexpType = this.mCurrentST.getExpType(node.getRExp());\n mPrintWriter.println(\"#Addddddddddddding\");\n Label l1 = new Label();\n Label l0 = new Label();\n Label l2 = new Label();\n Label l3 = new Label();\n //# Load constant int 1\n if(lexpType == Type.BYTE && rexpType == Type.INT){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Load constant int 0\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //mPrintWriter.println(# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //mPrintWriter.println(# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n\n // mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.BYTE && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt \" + l2);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l3);\n mPrintWriter.println(l2 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l3 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.INT && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //mPrintWriter.println(# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Casting int to byte by popping);\n //mPrintWriter.println(# 2 bytes off stack and only pushing low order bits);\n //mPrintWriter.println(# back on. Low order bits are on top of stack.);\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Load constant int 0);\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a two byte expression off stack);\n mPrintWriter.println(\"pop r18\");\n //mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt\" + l0);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l1 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else{\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n }", "@Override\n\tpublic void visit(AdditionNode node) {\n\t\t/**\n\t\t * verificam intai sintaxa: in cazde eroare nu mergem mai departe in\n\t\t * evaluare\n\t\t */\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * verificare pentru assert failed\n\t\t */\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam fiii nodului\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\t\tInteger i, j;\n\t\t/**\n\t\t * Salvam valorile calculate in urma evaluarii copiilor in 2 variabile\n\t\t * Integer. Daca unul dintre fii este de tip Variable ii luam valoarea\n\t\t * din HashMap-ul din Evaluator. Altfel, valoarea e reprezentata de\n\t\t * numele nodului.\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\t/**\n\t\t * realizam suna celor doua valori si updatam numele nodului curent cu\n\t\t * valoarea calculata\n\t\t */\n\t\tInteger n = i + j;\n\n\t\tnode.setName(n.toString());\n\n\t}", "@Override\r\n\tpublic double add() {\r\n\t\tdouble outcome = firstVariable + secondVariable;\r\n\t\treturn outcome;\r\n\t\r\n\t}", "private void processNumericModifier() {\n\n Token token = tokens.get(currentTokenPointer);\n\n if (currentVersionComponent == 3) {\n\n raiseParseProblem(\"cannot specify a numerical +/- value for the qualifier, found '\" + string(token) + \"' at position \" + token.start,\n\n token.start);\n\n }\n\n String tokenString = string(token);\n\n try {\n\n Integer value = null;\n\n if (token.kind == TokenKind.PLUSNUMBER) {\n\n value = Integer.parseInt(tokenString.substring(1));\n\n } else {\n\n value = Integer.parseInt(tokenString);\n\n }\n\n pushIt(new SumTransformer(value));\n\n } catch (NumberFormatException nfe) {\n\n raiseParseProblem(\"cannot parse numerical value '\" + tokenString + \"' at position \" + token.start, token.start);\n\n }\n\n }", "@Override\n\tpublic void visit(Addition arg0) {\n\n\t}", "void visit(ArithmeticValue value);", "@Override\n\tpublic int evaluate(){\n\t\treturn term.evaluate() + exp.evaluate();\n\t}", "void visit(PlusExpression expression);", "private double parseExpression() {\n\t\tdouble value = parseTerm();\n\t\twhile (true) {\n\t\t\tif (token.getType().equals(Token.Type.PLUS)) { // addition\n\t\t\t\ttoken=lexer.getNextToken();\n\t\t\t\tvalue += parseTerm();\n\t\t\t} else if (token.getType().equals(Token.Type.MINUS)) { // subtraction\n\t\t\t\ttoken = lexer.getNextToken();\n\t\t\t\tvalue -= parseTerm();\n\t\t\t} else {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t}", "Double add(Double a, Double b);", "public void add(String operand, Integer value) throws Exception {\n if (operand.equals(\"=\")){\n Integer accVal = dataMemory.getData(0);\n dataMemory.setData(0, accVal + value);\n }else if (operand.equals(\" \")){\n Integer regVal = dataMemory.getData(value);\n Integer accVal = dataMemory.getData(0);\n dataMemory.setData(0, accVal + regVal);\n }else if (operand.equals(\"*\")){\n Integer newDirection = dataMemory.getData(value);\n Integer regVal = dataMemory.getData(newDirection);\n Integer accVal = dataMemory.getData(0);\n dataMemory.setData(0, accVal + regVal);\n }else{\n throw new IllegalArgumentException(\"No valid operand\");\n }\n }", "public SymbolicElement<T> getAddition();", "public void arithmeticAddition(Operator operatorType, Operator clickedOperator) {\n switch (operatorType) {\n case ADDITION, SUBTRACT -> {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n case MULTIPLY, DIVIDE -> {\n if (numberStored[1] != 0) {\n double subResult = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), operatorType);\n numberStored[0] = basicCalculation(numberStored[0], subResult, operatorAssigned);\n numberStored[1] = 0;\n operatorAssigned = Operator.NON;\n mainLabel.setText(Double.toString(numberStored[0]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n }\n case POW -> {\n double exp = Double.parseDouble(mainLabel.getText());\n double result = Math.pow(numberStored[2], exp);\n numberStored[2] = 0;\n\n if (numberStored[1] != 0) {\n // This code below should be finalized.\n double subResult = basicCalculation(numberStored[1], result, operatorBfPow);\n numberStored[0] = basicCalculation(numberStored[0], subResult, operatorAssigned);\n numberStored[1] = 0;\n operatorAssigned = Operator.NON;\n mainLabel.setText(Double.toString(numberStored[0]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], result, operatorBfPow);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n operatorBfPow = Operator.NON;\n }\n default -> numberStored[0] = Double.parseDouble(mainLabel.getText());\n }\n }", "private double processExpression() throws ParsingException {\n double result = processTerm();\n\n while (true) {\n if (tryCaptureChar('+')) {\n result += processTerm();\n } else if (tryCaptureChar('-')) {\n result -= processTerm();\n } else {\n break;\n }\n }\n return result;\n }", "@Override\n\tpublic double add(double a, double b) {\n\t\treturn (a+b);\n\t}", "@Override\n\tpublic void VisitUnaryNode(UnaryOperatorNode Node) {\n\n\t}", "@Override\n\tpublic Object visit(ASTArithmetic node, Object data)\n\t{\n\t\treturn visitOperatorNode(node, data);\n\t}", "private void addition()\n\t{\n\t\tFun = Function.ADD;\t//Function set to determine what action should be taken later. \n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "void setPendingBinaryOperation(DoubleBinaryOperator op);", "void visit(NumericalValue expression);", "@Override\n\tpublic void visit(DoubleType n) {\n\t\t\n\t}", "double parseExpression() {\n double x = parseTerm();\n for (;;) {\n if (eat('+')) x += parseTerm(); // addition\n else if (eat('-')) x -= parseTerm(); // subtraction\n else return x;\n }\n }", "double parseExpression() {\n double x = parseTerm();\n for (;;) {\n if (eat('+')) x += parseTerm(); // addition\n else if (eat('-')) x -= parseTerm(); // subtraction\n else return x;\n }\n }", "public abstract double getValue();", "@Override\n public InterpreterValue pow(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the power-result\n if(v instanceof IntegerValue) return new DoubleValue(Math.pow(getValue(), ((IntegerValue) v).getValue()));\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the power-result\n if(v instanceof DoubleValue) return new DoubleValue(Math.pow(getValue(), ((DoubleValue) v).getValue()));\n\n // In other case just throw an error\n throw new Error(\"Operator '**' is not defined for type double and \" + v.getName());\n\n }", "T visit(Addition node);", "@Override\n\tpublic void\n\tscalarAdd( double value )\n\t{\n\t\tdata[0] += value;\n\t\tdata[1] += value;\n\t\tdata[2] += value;\n\t}", "@Override\n\tpublic double add(double in1, double in2) {\n\t\treturn 0;\n\t}", "private void operator() {\n reduce();\n shift();\n getDispenser().advance();\n if(getDispenser().tokenIsNumber()) setState(State.NUMBER);\n else if (getDispenser().tokenIsLeftParen()) setState(State.LEFT_PAREN);\n else syntaxError(NUM);\n \n }", "public void add(MyDouble val) {\n this.setValue(this.getValue() + val.getValue());\n }", "public String visit(PlusExpression n, LLVMRedux argu) throws Exception {\n\n String arg1 = n.f0.accept(this, argu);\n String arg2 = n.f2.accept(this, argu);\n u.println(u.getReg()+\" = add i32 \"+arg1+\", \"+arg2);\n return u.getLastReg();\n }", "@Override\n public Double evaluate() {\n return left.evaluate() + right.evaluate();\n }", "default DiscreteDoubleMap2D plus(double value) {\r\n\t\treturn pushForward(d -> d + value);\r\n\t}", "public Object visitUnaryPlusExpression(GNode n) {\n nonboolean = true;\n \n return dispatch(n.getGeneric(0));\n }", "public void addop() {\n if (lexer.token != Symbol.PLUS && lexer.token != Symbol.MINUS) {\n error.signal(\"Wrong operator for addop. Using not a plus or not a minus.\");\n }\n lexer.nextToken();\n }", "double getActiveOperand();", "public MvtPlus() {\r\n\t\tsuper('+');\r\n\t}", "Expression addExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = multExpression();\r\n\t\twhile(isKind(OP_PLUS, OP_MINUS)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = multExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "@Override\n public InterpreterValue sub(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the subtraction-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() - ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the subtraction-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() - ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '-' is not defined for type double and \" + v.getName());\n\n }", "void visitOperandNumber(OperandNumber operand);", "Double executeOperation(List<Double> operands);", "@Override\n public String getNotation() {\n return \"+\";\n }", "@Override\n public InterpreterValue mul(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '*' is not defined for type double and \" + v.getName());\n\n }", "public void visitDADD(DADD o){\n\t\tif (stack().peek() != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'double', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t\tif (stack().peek(1) != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack next-to-top is not of type 'double', but of type '\"+stack().peek(1)+\"'.\");\n\t\t}\n\t}", "@Override\r\n\tpublic double calculate() {\n\r\n\t\treturn n1 + n2;\r\n\t}", "public Double eval(Double... operands);", "@Override\npublic double executar(double a, double b) {\n\treturn a + b;\n}", "@Override\n public void step(final EvaluationContext theContext)\n {\n // pop the top 2 values and add them\n // and push the result onto the value stack\n //\n final Double theSecondOperand = theContext.popValue();\n final Double theFirstOperand = theContext.popValue();\n theContext.pushValue(theFirstOperand + theSecondOperand);\n }", "SEIntegerVariable getOperand2();", "@Override\n public void onClick(View v) {\n if(operator_inserted==true && !curr.substring(curr.length()-1,curr.length()).equals(\" \")){\n\n\n String [] tokens = curr.split(\" \");\n switch(tokens[1].charAt(0)){\n\n case '+':\n res = Double.toString(Double.parseDouble(tokens[0]) + Double.parseDouble(tokens[2]));\n break;\n case '-':\n res = Double.toString(Double.parseDouble(tokens[0]) - Double.parseDouble(tokens[2]));\n break;\n case '/':\n res = Double.toString(Double.parseDouble(tokens[0]) / Double.parseDouble(tokens[2]));\n break;\n case '*':\n res = Double.toString(Double.parseDouble(tokens[0]) * Double.parseDouble(tokens[2]));\n break;\n\n }\n resNum();\n }\n }", "DoubleBinaryOperator getPendingBinaryOperation();", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\t\t\n\t}", "SEIntegerVariable getOperand1();", "@Override\n public Float plus(Float lhs, Float rhs) {\n\t\n\tfloat res = lhs + rhs;\n\treturn res;\t\n }", "@Override\n public void visit(CalcExpr node) {\n }", "protected abstract double doubleOp(double d1, double d2);", "Double getValue();", "private double operation(char operand, double num1, double num2){\r\n\t\t\tdouble result;\r\n\t\t\tCalculatorImpl ci = new CalculatorImpl();\r\n\t\t\tswitch(operand){\r\n\t\t\tcase PLUS : result = ci.getAddition(num1, num2);break;\r\n\t\t\tcase MINUS : result = ci.getSubtraction(num1, num2);break;\r\n\t\t\tcase MULTI : result = ci.getMultification(num1, num2);break;\r\n\t\t\tcase DIVIDE : result = ci.getDivision(num1, num2);break;\r\n\t\t\tdefault : result=0.0;break;\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}", "public void add(Double addedAmount) {\n }", "private Double check_mathOperator(Double result) {\n \r\n switch(mathOperator){\r\n case '/':\r\n result =totalFirst/totalLast;\r\n break;\r\n case 'x':\r\n result =totalFirst*totalLast;\r\n break;\r\n case '-':\r\n result =totalFirst-totalLast;\r\n break;\r\n case '+':\r\n result =totalFirst+totalLast;\r\n break;\r\n \r\n }\r\n return result;\r\n }", "public Snippet visit(CoercionToDoubleExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t _ret.returnTemp = \"(\" + \"double\" + \")\" + _ret.returnTemp;\n\t\t\t_ret.expType = new X10Double();\n\t return _ret;\n\t }", "private static Number operate(Number value1, Number value2, DoubleBinaryOperator operatorDouble,\n\t\t\tIntBinaryOperator operatorInteger) {\n\t\tif (value1 instanceof Double || value2 instanceof Double) {\n\t\t\treturn Double.valueOf(operatorDouble.applyAsDouble(\n\t\t\t\t\t(value1).doubleValue(),\n\t\t\t\t\t(value2).doubleValue()\n\t\t\t));\n\t\t}\n\n\t\tif (!(value1 instanceof Integer && value2 instanceof Integer)) {\n\t\t\tthrow new IllegalArgumentException(\"values must be Integer or Double\");\n\t\t}\n\t\treturn Integer.valueOf(operatorInteger.applyAsInt(\n\t\t\t\t((Integer)value1).intValue(),\n\t\t\t\t((Integer)value2).intValue()\n\t\t));\n\t}", "@Override\n\tpublic void visit(DoubleLiteral n) {\n\t\t\n\t}", "public T plus( double b ) {\n T ret = createLike();\n ops.plus(mat, b, ret.mat);\n return ret;\n }", "@Override\r\n\tpublic double eval() {\r\n\t\tresult = op.apply(arg.eval());\r\n\t\treturn result;\r\n\t}", "private void processNumeric() {\n\n Token token = tokens.get(currentTokenPointer);\n\n String tokenString = string(token);\n\n pushIt(new ReplacementTransformer(tokenString));\n\n }", "public String visit(PlusExpression n, Object argu) \n\t{\n\t\tString _ret=null;\n\t String e0 = n.f0.accept(this, argu);\n\t String e1 = n.f2.accept(this, argu);\n\t \n\t if (e0.equals(\"int\") && e1.equals(\"int\"))\n\t {\n\t \t_ret = \"int\";\n\t }\n\t return _ret;\n\t}", "private void number() {\n shift();\n getDispenser().advance();\n if (getDispenser().tokenIsEOF()) setState(State.END);\n else if (getDispenser().tokenIsOperator()) setState(State.OPERATOR);\n else if (getDispenser().tokenIsRightParen()) setState(State.RIGHT_PAREN);\n else syntaxError(OP_OR_END);\n }", "private String calculate (double num1, double num2, String operator){\r\n \r\n double value;\r\n switch(operator){\r\n case \"+\":\r\n value = num1 + num2;\r\n break;\r\n case \"-\":\r\n value = num1 - num2;\r\n break;\r\n case \"*\":\r\n value = num1 * num2;\r\n break;\r\n case \"/\":\r\n value = num1/num2;\r\n break;\r\n default:\r\n throw new IllegalArgumentException();\r\n \r\n }\r\n String result = value + \"\";\r\n return result;\r\n }", "@Override\n public double nextDouble() {\n return super.nextDouble();\n }", "private Object eval(SimpleExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"+\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res + (Double) res2;\n } else if (res instanceof Double && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof Boolean && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Double) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Boolean) {\n res = \"\" + res + res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else if (\"-\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res - (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "@Override\n public double value(double x) {\n myParser.addVariable(variable, x);\n double eval = myParser.getValue();\n return eval;\n }", "public int operation(int number1,int number2,String operator)", "public Double visit (NumberArgument aArg)\n {\n return aArg.getValue ();\n }", "@Override\r\n\t\tvoid calculate() {\r\n\t\t\tnum3=num1+num2;\r\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\n\t}", "@Override\n\tpublic void visit(NumberListNode node) {\n\t\tresult = node.getData();\n\t\tstackDouble.push(result);\n\t\tif(!stackPair.isEmpty()) {\n\t\t\tpair = stackPair.peek();\n\t\t\tpair.setSecond(pair.getSecond()-1);\n\n\t\t\twhile(!stackPair.isEmpty() && stackPair.peek().getSecond()==0){\n\t\t\t\tpair = stackPair.pop();\n\t\t\t\tString s = pair.getFirst();\n\t\t\t\tswitch(s){\n\t\t\t\tcase \"+\": \n\t\t\t\t\tright = stackDouble.pop();\n\t\t\t\t\tleft = stackDouble.pop();\n\t\t\t\t\tresult = left + right;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\": \n\t\t\t\t\tright = stackDouble.pop();\n\t\t\t\t\tleft = stackDouble.pop();\n\t\t\t\t\tresult = left - right;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\": \n\t\t\t\t\tright = stackDouble.pop();\n\t\t\t\t\tleft = stackDouble.pop();\n\t\t\t\t\tresult = left * right;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\": \n\t\t\t\t\tright = stackDouble.pop();\n\t\t\t\t\tleft = stackDouble.pop();\n\t\t\t\t\tresult = left / right;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"~\": \n\t\t\t\t\tresult = - stackDouble.pop();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstackDouble.push(result);\n\t\t\t\tif(!stackPair.isEmpty()){\n\t\t\t\t\tpair = stackPair.peek();\n\t\t\t\t\tpair.setSecond(pair.getSecond()-1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(node.getNext()!=null) {\n\t\t\tnode.getNext().accept(this);\n\t\t}\n\t}", "double getValue();", "double getValue();", "double getValue();", "public <V extends Number> FluentExp<V> plus (SQLExpression<V> expr)\n {\n return new Add<V>(this, expr);\n }", "@Override\n public void step(final EvaluationContext theContext)\n {\n // pop the value, negate, push the value\n //\n final Double theOperand = theContext.popValue();\n theContext.pushValue(-theOperand);\n }", "public <V extends Number> FluentExp<V> plus (V value)\n {\n return new Add<V>(this, value);\n }", "double eval();", "private void addOperands() {\n\n\t\tif (text_Operand3.getText().isEmpty()) {\n\t\t\ttext_Operand3.setText(\"5\");\n\t\t}\n\t\tif (text_Operand4.getText().isEmpty()) {\n\t\t\ttext_Operand4.setText(\"5\");\n\t\t}\n\n\t\t/*\n\t\t * It will pass the value to the bussiness logic so trhat the further logics can\n\t\t * be performed on them.\n\t\t */\n\n\t\tif (conversionIsRequired(comboBox1.getSelectionModel().getSelectedItem(),\n\t\t\t\tcomboBox2.getSelectionModel().getSelectedItem())) {\n\t\t\tdouble op1 = Double.parseDouble(text_Operand1.getText());\n\t\t\tdouble op1et = Double.parseDouble(text_Operand3.getText());\n\t\t\tperform.setOperand1(String.valueOf(op1 * theFactor));\n\t\t\tperform.setOperand3(String.valueOf(op1et * theFactor));\n\t\t} else {\n\t\t\tAlert a = new Alert(AlertType.WARNING);\n\t\t\ta.setContentText(\"Addition Not Possible\");\n\t\t\ta.show();\n\t\t\treturn;\n\t\t}\n\n\t\tcomboBoxRes.getSelectionModel().select(comboBox2.getSelectionModel().getSelectedItem());\n\t\t// Check to see if both operands are defined and valid\n\t\tif (binaryOperandIssues()) // If there are issues with the operands, return\n\t\t\treturn; // without doing the computation\n\n\t\t// If the operands are defined and valid, request the business logic method to\n\t\t// do the addition and return the\n\t\t// result as a String. If there is a problem with the actual computation, an\n\t\t// empty string is returned\n\t\tString theAnswer = perform.addition(); // Call the business logic add method\n\t\tlabel_errResult.setText(\"\"); // Reset any result error messages from before\n\t\tString theAnswer1 = perform.addition1(); // Call the business logic add method\n\t\tlabel_errResulterr.setText(\"\"); // Reset any result error messages from before\n\t\tif (theAnswer.length() > 0 || theAnswer1.length() > 0) { // Check the returned String to see if it is okay\n\t\t\ttext_Result.setText(theAnswer); // If okay, display it in the result field and\n\t\t\tlabel_Result.setText(\"Sum\"); // change the title of the field to \"Sum\".\n\t\t\ttext_Resulterr.setText(theAnswer1); // If okay, display it in the result field.\n\t\t\tlabel_Result.setLayoutX(100);\n\t\t\tlabel_Result.setLayoutY(345);\n\t\t} else { // Some error occurred while doing the addition.\n\t\t\ttext_Result.setText(\"\"); // Do not display a result if there is an error.\n\t\t\tlabel_Result.setText(\"Result\"); // Reset the result label if there is an error.\n\t\t\tlabel_errResult.setText(perform.getResultErrorMessage()); // Display the error message.\n\t\t\ttext_Resulterr.setText(\"\"); // Do not display a result if there is an error.\n\t\t\tlabel_errResulterr.setText(perform.getResulterrErrorMessage()); // Display the error message.\n\t\t}\n\t}", "public void add(double i)\n\t{\n\t\tthis.i += i;\n\t}", "@Override\r\n public Double evaluate(double number) {\r\n double result = this.reduce(0.0, t -> {\r\n Term term = (Term) t;\r\n return term.evaluate(number);\r\n });\r\n return result;\r\n }", "public void add(int add) {\r\n value += add;\r\n }", "public abstract double evaluate(double value);", "double getDoubleValue1();", "protected void operation(String operator){\n if (this.tail<2){\n this.arr[tail++] = this.value;\n this.arr[tail++] = operator;\n } else{\n if (this.peek() != \")\"){\n this.arr[this.tail++] = this.value;\n }\n this.arr[this.tail++] = operator;\n }\n this.value=\"\"; // reset tracking variables\n this.decimalUsed = false;\n }", "void add(double p1, double p2){\n this.p1 += p1;\n this.p2 += p2;\n }", "public static NodeValue unaryPlus(NodeValue nv) {\n NumericType opType = classifyNumeric(\"unaryPlus\", nv) ;\n return nv ;\n }" ]
[ "0.6926353", "0.675019", "0.6450218", "0.6387068", "0.6319312", "0.6288133", "0.6273867", "0.62700236", "0.6259034", "0.6247541", "0.6205975", "0.619259", "0.6181131", "0.61777943", "0.6175855", "0.6166907", "0.6150326", "0.6147178", "0.61457014", "0.61131024", "0.6108964", "0.61066955", "0.606571", "0.60590035", "0.60424185", "0.6039937", "0.6020062", "0.60188985", "0.60147077", "0.60147077", "0.60053134", "0.598394", "0.5948315", "0.5941821", "0.59360343", "0.59146917", "0.5906583", "0.5905328", "0.59033877", "0.5901445", "0.5899296", "0.5898081", "0.58977586", "0.5883062", "0.58780813", "0.58714014", "0.58580315", "0.58454937", "0.5842756", "0.5842727", "0.5827715", "0.582679", "0.5824242", "0.5814414", "0.5814161", "0.580794", "0.5795514", "0.57915103", "0.57895833", "0.57853544", "0.57765913", "0.5773544", "0.5770409", "0.576816", "0.57662517", "0.5751431", "0.57503706", "0.57406884", "0.5739696", "0.57346815", "0.5733685", "0.5733674", "0.57321393", "0.5722939", "0.5712237", "0.57109934", "0.57064044", "0.5705698", "0.5685985", "0.5684881", "0.5683141", "0.5663906", "0.5663801", "0.56614804", "0.56584823", "0.56584823", "0.56584823", "0.56538314", "0.5646229", "0.56237257", "0.5615659", "0.5613334", "0.5610795", "0.5587607", "0.55753523", "0.557514", "0.55703473", "0.55629694", "0.55591", "0.55548334" ]
0.73276514
0
This function gets executed when the operator '' is used on the double
@Override public InterpreterValue sub(InterpreterValue v) { // If the given value is a IntegerValue create a new DoubleValue from // the subtraction-result if(v instanceof IntegerValue) return new DoubleValue(getValue() - ((IntegerValue) v).getValue()); // If the given value is a DoubleValue create a new DoubleValue from // the subtraction-result if(v instanceof DoubleValue) return new DoubleValue(getValue() - ((DoubleValue) v).getValue()); // In other case just throw an error throw new Error("Operator '-' is not defined for type double and " + v.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print(double someDouble) {\r\n print(someDouble + \"\");\r\n }", "@Override\n public String visit(DoubleLiteralExpr n, Object arg) {\n return null;\n }", "@Override\n\tpublic void visit(DoubleLiteral n) {\n\t\t\n\t}", "public Snippet visit(CoercionToDoubleExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t _ret.returnTemp = \"(\" + \"double\" + \")\" + _ret.returnTemp;\n\t\t\t_ret.expType = new X10Double();\n\t return _ret;\n\t }", "@Override\n public void onChanged(Double aDouble) {\n if (aDouble*1000 < 1) {\n etOutputValue.setText(\"0.0\");\n } else {\n DecimalFormat decimalFormat = new DecimalFormat(\"#,##0.###\");\n etOutputValue.setText(decimalFormat.format(aDouble));\n }\n }", "public abstract double fromBasicUnit(double valueJTextInsert);", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\t\t\t\tdflt=0;\r\n\r\n\t\t\t\toperator='*';\r\n\t\t\t\ttf2.setText(\"X\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "private void E()\n\t{\t\n\t\tString E = \"\";\t\t\t//Holds double which is approximated to the value of e\n\t\tString fieldText = \"\";\t//Holds the text currently in \"entry\". Used when leftValue is full.\n\t\tdouble e = Math.E;\t\t//Decimal approximation of e.\n\t\tE += e;\t\t\t\t\t//Decimal approximation of e inserted into a String\n\t\t\n\t\tif(Fun == null && calc.getLeftValue ( ) == 0.0)\n\t\t{\n\t\t\tentry.setText (E);\n\t\t\tsetLeftValue();\n\t\t}\n\t\telse if (calc.getLeftValue ( ) != 0.0 && calc.getRightValue ( ) == 0.0)\n\t\t{\n\t\t\tfieldText = entry.getText();\n\t\t\tfieldText += \" \" + E;\n\t\t\tentry.setText(fieldText);\n\t\t\tsetRightValue();\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='/';\r\n\t\t\t\ttf2.setText(\"/\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "public Operand(Double value) {\n if (value == null) throw new IllegalArgumentException(\"String with a value can't be empty\");\n this.value = value;\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='-';\r\n\t\t\t\ttf2.setText(\"-\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tansStri=\"\"+ans;\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='+';\r\n\t\t\t\ttf2.setText(\"+\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "private Double check_mathOperator(Double result) {\n \r\n switch(mathOperator){\r\n case '/':\r\n result =totalFirst/totalLast;\r\n break;\r\n case 'x':\r\n result =totalFirst*totalLast;\r\n break;\r\n case '-':\r\n result =totalFirst-totalLast;\r\n break;\r\n case '+':\r\n result =totalFirst+totalLast;\r\n break;\r\n \r\n }\r\n return result;\r\n }", "static String double2String (Double a){\n String s = \"\"+a;\n String[] arr = s.split(\"\\\\.\");\n if (arr[1].length()==1) s+=\"0\";\n return s;\n }", "public boolean isDouble() {\n return false;\n }", "@Override\n\tpublic void visit(DoubleType n) {\n\t\t\n\t}", "public boolean isDouble();", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\t\t\n\t}", "public DoubleField(double value) {\n\t\tthis(\"\" + value, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);\n\t}", "@Override\n public void onClick(View v) {\n if(operator_inserted==true && !curr.substring(curr.length()-1,curr.length()).equals(\" \")){\n\n\n String [] tokens = curr.split(\" \");\n switch(tokens[1].charAt(0)){\n\n case '+':\n res = Double.toString(Double.parseDouble(tokens[0]) + Double.parseDouble(tokens[2]));\n break;\n case '-':\n res = Double.toString(Double.parseDouble(tokens[0]) - Double.parseDouble(tokens[2]));\n break;\n case '/':\n res = Double.toString(Double.parseDouble(tokens[0]) / Double.parseDouble(tokens[2]));\n break;\n case '*':\n res = Double.toString(Double.parseDouble(tokens[0]) * Double.parseDouble(tokens[2]));\n break;\n\n }\n resNum();\n }\n }", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\n\t}", "@Override\n public void afterTextChanged(Editable arg0) {\n if(arg0.length()>0)\n arrTemp[holder.ref] = Double.parseDouble(arg0.toString()); //Bug here : in case we erase entire double value 0.0\n }", "String doubleRead();", "public DoubleField() {\n\t\tthis(\"\", Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);\n\t}", "public double getDouble(String name)\n/* */ {\n/* 1015 */ return getDouble(name, 0.0D);\n/* */ }", "String doubleWrite();", "public abstract void setDoubleImpl(String str, double d, Resolver<Void> resolver);", "private String calculate (double num1, double num2, String operator){\r\n \r\n double value;\r\n switch(operator){\r\n case \"+\":\r\n value = num1 + num2;\r\n break;\r\n case \"-\":\r\n value = num1 - num2;\r\n break;\r\n case \"*\":\r\n value = num1 * num2;\r\n break;\r\n case \"/\":\r\n value = num1/num2;\r\n break;\r\n default:\r\n throw new IllegalArgumentException();\r\n \r\n }\r\n String result = value + \"\";\r\n return result;\r\n }", "public T caseExpression_Double(Expression_Double object)\r\n {\r\n return null;\r\n }", "private void berechneNeuenWert () {\r\n try {\r\n double ergebnis = 0d;\r\n for (JTextComponent wert : this.wertOperator.keySet()) {\r\n if (this.ignoriereWhitespaceEingabefelder && wert.getText().trim().length() == 0) {\r\n continue;\r\n }\r\n final char operator = this.wertOperator.get(wert);\r\n final double operand = Double.parseDouble(wert.getDocument().getText(0, wert.getDocument().getLength()).trim());\r\n switch (operator) {\r\n case '*':\r\n ergebnis *= operand;\r\n break;\r\n case '/':\r\n ergebnis /= operand;\r\n break;\r\n case '-':\r\n ergebnis -= operand;\r\n break;\r\n case '+':\r\n ergebnis += operand;\r\n break;\r\n case '=':\r\n ergebnis = operand;\r\n break;\r\n }\r\n }\r\n String text = Double.toString(ergebnis);\r\n if (this.anzahlDerNachkommastellen <= 0 && text.indexOf('.') != -1) {\r\n text = text.substring(0,text.indexOf('.'));\r\n }\r\n else {\r\n // Kommastellen hinzufügen\r\n if (text.indexOf('.') == -1) {\r\n text += '.';\r\n }\r\n // ggf. mit Nullen hinten auffüllen\r\n while (text.indexOf('.') + anzahlDerNachkommastellen > text.length() -1) {\r\n text += '0';\r\n }\r\n // Abschneiden zuviel vorhandener Stellen\r\n if (text.length() - 1 > text.indexOf('.') +anzahlDerNachkommastellen) {\r\n text = text.substring(0,text.indexOf('.')+anzahlDerNachkommastellen+1);\r\n }\r\n }\r\n this.setText(text);\r\n }\r\n catch (final Exception berechnungsProblem) {\r\n this.setText(this.zeigeFehlerAn ? \"#WERT!\" : \"\");\r\n }\r\n }", "public double getDouble();", "private void outputBasedOnText(Editable s) {\n String stringValue = s.toString();\n if (stringValue.length() > 1 && stringValue.substring(stringValue.length() - 1).equals(\".\")) { // If the last char in string is \".\"\n convertInput(Double.parseDouble(stringValue.substring(0, stringValue.length() - 1)));\n } else if (!stringValue.matches(\"[-+]?\\\\d*\\\\.?\\\\d+\")) { // Check if stringValue is numeric\n convertInput(0);\n } else {\n convertInput(Double.parseDouble(stringValue));\n }\n }", "public void printer(double x);", "private double convertDouble()\n\t{\n\t\tString val = tokens[10];\n\t\tdouble value = 0.0;\n\t\ttry {\n\t\t\tvalue = Double.parseDouble(tokens[10]);\n\t\t}\n\t\tcatch(NumberFormatException e) {\n\t\t\tSystem.err.print(\"\");\n\t\t}\n\t\treturn value;\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n int t=0;\n String s=e.getActionCommand();\n if(s.equals(\"+\")||s.equals(\"-\")||s.equals(\"*\")||s.equals(\"/\")) {\n input+=\" \"+s+\" \"; //如果碰到运算符,就在运算符前后分别加一个空格,\n //为后面的分解字符串做准备\n\n }else if(s.equals(\"清零\")) {\n input=\"\";\n }else if(s.equals(\"退格\")) {\n if((input.charAt(input.length()-1))==' ') { //检测字符串的最后一个字符是否为空格,\n input=input.substring(0,input.length()-3);//如果是则删除末尾3个字符,否则删除\n //1个字符\n }else {\n input=input.substring(0,input.length()-1);\n }\n }\n else if(s.equals(\"=\")) {\n input=compute(input);\n jt.setText(input);\n input=\"\";\n t=1;\n }\n else\n input += s;\n if(t==0) {\n jt.setText(input);\n }\n }", "double getDoubleValue2();", "protected abstract double operation(double val);", "String getFloat_lit();", "private Object eval(SimpleExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"+\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res + (Double) res2;\n } else if (res instanceof Double && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof Boolean && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Double) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Boolean) {\n res = \"\" + res + res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else if (\"-\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res - (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "public Operand(String value) {\n if (value == null) throw new IllegalArgumentException(\"String with a value can't be empty\");\n this.value = Double.parseDouble(value);\n }", "public static void singleValue(String name, double value) {\n singleValue(name,value,null);\n }", "Double getDoubleValue();", "private static Double stod(String string) {\n\t\tDouble result = 2.0; // should handle this error: \"cannnot convert string to Double\"\n\t\tif (string == null || string.equals(\"\") || string.equals(\"null\") || string.equals(\"I\")) {\n\t\t\tresult = 0.0;\n\t\t} else if (string.equals(\"E\")) {\n\t\t\tresult = 1.0;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tresult = Double.parseDouble(string);\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "boolean hasDouble();", "@Override\n\tpublic void calcul() {\n\t\tif(this.operateur.equals(\"\"))\n\t\t\tthis.result = Double.parseDouble(this.operande);\n\t\telse {\n\t\t\tif(!this.operande.equals(\"\")) {\n\t\t\t\tif(this.operateur.equals(\"+\")) {\n\t\t\t\t\tthis.result += Double.parseDouble(this.operande);\n\t\t\t\t}\n\t\t\t\tif(this.operande.equals(\"-\")) {\n\t\t\t\t\tthis.result -= Double.parseDouble(this.operande);\n\t\t\t\t}\n\t\t\t\tif(this.operateur.equals(\"*\"))\n\t\t\t\t\tthis.result *= Double.parseDouble(this.operande); \n\t\t\t\tif(this.operateur.equals(\"/\")){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tthis.result /= Double.parseDouble(this.operande);\n\t\t\t\t\t}catch(ArithmeticException e){\n\t\t\t\t\t\tthis.result = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.operande = \"\";\n\t\tnotifyObserver(String.valueOf(this.result));\n\t}", "double getDoubleValue1();", "public double evaluateAsDouble();", "public abstract void getDoubleImpl(String str, double d, Resolver<Double> resolver);", "public String fullCellText() {\n\t\tString value = getDoubleValue() + \"\";\n\t\t\tif(getValue().equals(\"0\")) {\t// it equals to 0, we can just return \n\t\t\t\treturn getValue();\n\t\t\t}\n\t\t\telse if (!value.contains(\"%\") && value.contains(\".0\") \t//check if value contains no percent sign or \".0\"\n\t\t\t\t\t&& isDecimalEqualToZero(value)\t\t\t\t\t//make sure it is a whole number\n\t\t\t\t\t&& value.replace(\"-\", \"\").length() > 3) {\t\n\t\t\t\treturn value.substring(0, value.indexOf(\".\"));\n\t\t\t}\n\t\t\telse if (!value.contains(\"%\") && !value.contains(\".\")) {\t//if value contains percent sign and no contain dot\n\t\t\t\tvalue += \".0\";\t\t\t\t\t\t\t\t\t\t\t//just add \".0\" at the end\n\t\t\t}\n\t\treturn value;\n\t}", "private String literal(Number num) {\n int i = num.intValue();\n double d = num.doubleValue();\n \n if (i == d) {\n return String.valueOf(i);\n } else {\n // TODO: proper number formatting should be used\n return num.toString();\n }\n }", "public static double leerDouble() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "default T handleNumber(double val) {\n throw new UnsupportedOperationException();\n }", "public double evaluate(String exp) throws NumberFormatException, ArithmeticException {\r\n isConstant=true;\r\n return _evaluate(exp);\r\n }", "public BasicDouble(double value) {\r\n\t\tsuper.value = this.value = value;\r\n\t}", "public double doubleValue();", "protected abstract double doubleOp(double d1, double d2);", "private void m2248a(double d, String str) {\n this.f2954c = d;\n this.f2955d = (long) d;\n this.f2953b = str;\n this.f2952a = ValueType.doubleValue;\n }", "public MutableDouble() {\n\t\tsuper();\n mDouble = 0;\n\t}", "public abstract double read_double();", "public DataPrimitive(double value) {\n\t\tsuper();\n\t\tthis.value = Double.toString(value);\n\t}", "public double utility();", "public static double toDouble(java.lang.Object o)\n {\n if(o == null)\n {\n return 0;\n }\n else if(o.toString().equals(\"\"))\n {\n return 0;\n }\n else\n {\n return Double.parseDouble(o.toString());\n }\n }", "private double formatDouble(double number){\r\n return Double.parseDouble(String.format(\"%.2f\", number));\r\n }", "private double getDoubleValue(Element element, String tagName)\n {\n try\n {\n return Double.parseDouble(getValue(element,tagName));\n }\n catch (NumberFormatException exception)\n {\n return 0.0;\n }\n }", "private static String toPsString(double d) {\n return \"(\" + d + \")\";\n }", "private boolean isValidDouble(String text) {\r\n \ttry {\r\n \t\tDouble value = Double.valueOf(text);\r\n \t} catch (NumberFormatException e) {\r\n \t\treturn false;\r\n \t}\r\n \treturn true;\r\n }", "public double toDouble() {\n/* */ try {\n/* 813 */ return Double.valueOf(this.m_str).doubleValue();\n/* */ }\n/* 815 */ catch (NumberFormatException nfe) {\n/* */ \n/* 817 */ return Double.NaN;\n/* */ } \n/* */ }", "private void operation(char operator){\n if(initialised == false){\n calc.setNum1(Double.parseDouble(txtBox.getText()));\n operatorPressed = true;\n } else { \n calc.setNum2(Double.parseDouble(txtBox.getText()));\n Decimal();\n calc.setNum1(calc.getAnswer());\n txtBox.setText(Double.toString(calc.getAnswer()));\n }\n \n calc.setOperator(operator);\n\n operatorPressed = true;\n initialised = true;\n \n }", "public\n double getProperty_double(String key)\n {\n if (key == null)\n return 0.0;\n\n String val = getProperty(key);\n\n if (val == null)\n return 0.0;\n\n double ret_double = 0.0;\n try\n {\n Double workdouble = new Double(val);\n ret_double = workdouble.doubleValue();\n }\n catch(NumberFormatException e)\n {\n ret_double = 0.0;\n }\n\n return ret_double;\n }", "protected void operation(String operator){\n if (this.tail<2){\n this.arr[tail++] = this.value;\n this.arr[tail++] = operator;\n } else{\n if (this.peek() != \")\"){\n this.arr[this.tail++] = this.value;\n }\n this.arr[this.tail++] = operator;\n }\n this.value=\"\"; // reset tracking variables\n this.decimalUsed = false;\n }", "double getEDouble();", "double getDoubleValue3();", "private double getDoubleAttribute(Element element, String attributeName)\n {\n try\n {\n return Double.parseDouble(getAttribute(element,attributeName));\n }\n catch (NumberFormatException exception)\n {\n return 0.0;\n }\n }", "private Double parseNumber(String num) {\r\n\t\tDouble tempnum = (double) 0;\r\n\t\tint opos; //operator position\r\n\t\tif ((num == null) || (num.length() < 1) ) {\r\n\t\t\treturn tempnum;\r\n\t\t}\r\n\r\n\t\t//replace constants with their value\r\n\t\twhile (num.indexOf(\"P\") >= 0) { //PI constant\r\n\t\t\tString[] numparts = StringUtil.splitData(num, 'P', 2);\r\n\t\t\tnum = numparts[0]+String.valueOf(Math.PI)+numparts[1];\r\n\t\t}\r\n\t\twhile (num.indexOf(\"X\") >= 0) { //e constant\r\n\t\t\tString[] numparts = StringUtil.splitData(num, 'X', 2);\r\n\t\t\tnum = numparts[0]+String.valueOf(Math.E)+numparts[1];\r\n\t\t}\r\n\r\n\t\tif (num.indexOf(\"^\") >= 0) { //allows to specify powers (e.g.: 2^10)\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '^', 2);\r\n\t\t\ttempnum = Math.pow(parseNumber(numparts[0]), parseNumber(numparts[1]));\r\n\t\t}\r\n\t\telse if ( ((opos = num.indexOf(\"-\")) > 0) && (num.charAt(opos-1) != 'E') && (num.charAt(opos-1) != '^')) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '-', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) - parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if ( ((opos = num.indexOf(\"+\")) > 0) && (num.charAt(opos-1) != 'E') && (num.charAt(opos-1) != '^')) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '+', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) + parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if (num.indexOf(\"/\") >= 0) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '/', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) / parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if (num.indexOf(\"*\") >= 0) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '*', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) * parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttempnum = Double.valueOf(num);\r\n\t\t}\r\n\r\n\t\treturn tempnum;\r\n\t}", "private String normalizeDouble(Double value) {\n\n String valueSign = (value < 0) ? \"-\" : \"0\";\n String expSign = \"0\";\n Integer finalExp = 0;\n\n DecimalFormat df = new DecimalFormat(DECIMAL_FORMAT);\n String[] splits = df.format(value).split(\"E\");\n\n // if there's an exponent, complement it\n if(splits.length > 1) {\n\n String exponent = splits[1];\n\n if(exponent.startsWith(\"-\")) {\n\n expSign = \"-\";\n exponent = exponent.replace(\"-\", \"\");\n finalExp = 999 - Integer.parseInt(exponent);\n }\n\n else {\n finalExp = Integer.parseInt(exponent);\n }\n }\n\n return String.format(\"%s%s%03d %s\", valueSign, expSign, finalExp, splits[0]);\n }", "private double _evaluate(String exp) throws NumberFormatException, ArithmeticException {\r\n return _evaluate(exp,0,(exp.length()-1));\r\n }", "public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition ignore)\n/* */ {\n/* 1101 */ toAppendTo.append(format(number, this.defaultRuleSet));\n/* 1102 */ return toAppendTo;\n/* */ }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( input_symbol == '+' || input_symbol == '-' || input_symbol == '*' || input_symbol == '/'){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// get result(String)\n\t\t\t\t\t\t\t\tget_result = txt_showresult.getText();\n\t\t\t\t\t\t\t\tresult = Double.parseDouble(get_result);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcalculate_equal();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "Double getValue();", "void writeDouble(double value);", "public MyDouble() {\n this.setValue(0);\n }", "private String modifyValue(String value) {\n double d = Double.parseDouble(value);\n int v = round(d);\n return String.valueOf(v);\n }", "@Test\n public void testEditDistEmptyOtherString() throws Exception{\n assertEquals(4, Esercizio2.edit_distance_dyn(s3, s1));\n }", "double defendre();", "public String toString() {\n\t\treturn String.valueOf(mDouble);\n\t}", "public static String DoubleToString(double DoubleValue){\n Double doublee = new Double(DoubleValue);\n return doublee.toString(); \n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString str = e.getActionCommand();\n\t\tString ans = resultField.getText();\n\t\tString ans2 = resultField2.getText();\n\t\tdouble result;\n\t\t\n\t\tif(str ==\"0\" || str ==\"1\" || str == \"2\"|| str== \"3\" ||\n\t\t\t\tstr == \"4\"|| str == \"5\" || str == \"6\" || str == \"7\"|| str == \"8\" || str == \"9\" || str ==\".\"){\n\t\t resultField.setText(ans + str);\n\t\t resultField2.setText(ans2 + str);\n\t\t}\n\t\tif(str == \"+\" || str == \"-\" || str == \"*\" || str == \"/\")\n\t\t{\n\t\t\toper = ans;\n\t\t\top = str;\n\t\t\tresultField.setText(\"\");\n\t\t\tresultField2.setText(ans2 + str);\n\t\t}\n\t\tif(str == \"x^2\"){\n\t\t\tresultField.setText(\"\"+Double.parseDouble(ans)*Double.parseDouble(ans));\n\t\t\tresultField2.setText(ans2 + \"^2\");\n\t\t}\n\t\tif(str == \"sqrt\")\n\t\t{\n\t\t\tresultField.setText(\"\"+Math.sqrt(Double.parseDouble(ans)));\n\t\t\tresultField2.setText(ans2 + \"^1/2\");\n\t\t}\n\t\tif(str == \"1/X\")\n\t\t{\n\t\t\tresultField.setText(\"\"+1/(Double.parseDouble(ans)));\n\t\t\tresultField2.setText(\"1/(\" + ans2 + \")\");\n\t\t}\n\t\tif(str==\"+/-\")\n\t\t{\n\t\t\tresultField.setText(\"\"+-1*(Double.parseDouble(ans)));\n\t\t\tresultField.setText(\"-1*(\"+ans2+\")\");\n\t\t}\n\n\t\tif(str==\"=\")\n\t\t{\n\t\t\tchar c=op.charAt(0);\n\t\t\tswitch(c)\n\t\t\t{\n\t\t\tcase '+':\n\t\t\t\tresult=Double.parseDouble(oper) + Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '-':\n\t\t\t\tresult=Double.parseDouble(oper) - Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '*':\n\t\t\t\tresult=Double.parseDouble(oper) * Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '/':\n\t\t\t\tresult=Double.parseDouble(oper) / Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(str == \"C\")\n\t\t{\n\t\t\tresultField.setText(\"\");\n\t\t\tresultField2.setText(\"\");\n\t\t}\n\t\t\n\t\tif(str == \"Backspace\")\n\t\t{\n\t\t\tString temp=resultField.getText();\n\t\t\ttemp=temp.substring(0,temp.length()-1);\n\t\t\tresultField.setText(temp);\n\t\t\tString temp2=resultField2.getText();\n\t\t\ttemp2 = temp2.substring(0,temp2.length()-1);\n\t\t\tresultField2.setText(temp2);\n\t\t\t\n\t\t}\n\n\t}", "public String format(double number);", "private DoubleField(String str, double low, double high) {\n\t\tparser = NumberFormat.getNumberInstance(Locale.US);\n\t\tsetBackground(Color.WHITE);\n\t\tsetHorizontalAlignment(RIGHT);\n\t\tminValue = low;\n\t\tmaxValue = high;\n\t\tsetText(str);\n\t\texceptionOnError = false;\n\t}", "@Test\n\tpublic void test_TCM__double_getDoubleValue() {\n\t\tAttribute attr = new Attribute(\"test\", \"11111111111111\");\n\t\ttry {\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 11111111111111d );\n\n\t\t\tattr.setValue(\"0\");\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 0 );\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MAX_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MAX_VALUE);\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MIN_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MIN_VALUE);\n\n\t\t} catch (DataConversionException e) {\n\t\t\tfail(\"couldn't convert boolean value\");\n\t\t}\n\n\t\ttry {\n\t\t\tattr.setValue(\"foo\");\n\t\t\tfail(\"incorrectly returned double from non double value\" + attr.getDoubleValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t}", "void setDouble(String key, double val);", "T print(double data) throws PrintingException;", "private double getDoubleAttribute(Element element, String tagName, String attributeName)\n {\n try\n {\n return Double.parseDouble(getAttribute(element,tagName,attributeName));\n }\n catch (NumberFormatException exception)\n {\n return 0.0;\n }\n }", "public Mult(double left, String right) {\n super(left, right);\n }", "@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }", "@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }", "public static void setTextFieldDouble(TextField txt) {\n\t\ttxt.textProperty().addListener((obs, oldValue, newValue)->{\n\t\t\tif(newValue!=null && !newValue.matches(\"\\\\d*([\\\\.]\\\\d*)?\")) {\n\t\t\t\ttxt.setText(oldValue);\n\t\t\t}\n\t\t});\n\t}", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default double asDouble() {\n \n return notSupportedCast(BasicTypeID.DOUBLE);\n }", "Rule DoubleConstant() {\n // Push 1 DoubleConstNode onto the value stack\n return Sequence(\n Sequence(\n Optional(NumericSign()),\n ZeroOrMore(Digit()),\n Sequence('.', OneOrMore(Digit())),\n MaybeScientific()),\n actions.pushDoubleConstNode());\n }", "public Double getDoubleAttribute();", "private boolean checkDouble(String str) {\n\t\tint i = 0, flag = 0;\n\t\tchar ch;\n\n\t\tif (str.length() == 0)\n\t\t\treturn false;\n\n\t\twhile (i < str.length()) {\n\t\t\tch = str.charAt(i);\n\n\t\t\tif (ch == '-' && flag == 0) {\n\t\t\t\tflag = 1;\n\t\t\t} else if (ch >= '0' && ch <= '9' && (flag <= 2)) {\n\t\t\t\tflag = 2;\n\t\t\t} else if (ch == '.' && (flag < 3)) {\n\t\t\t\tflag = 3;\n\t\t\t} else if (ch >= '0' && ch <= '9' && (flag == 3 || flag == 4)) {\n\t\t\t\tflag = 4;\n\t\t\t} else if (whiteSpace(ch) && (flag == 2 || flag == 4)) {\n\t\t\t\tflag = 5;\n\t\t\t} else if (!(whiteSpace(ch) && flag == 0)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti++;\n\t\t}\n\t\tif (flag < 2)\n\t\t\treturn false;\n\t\treturn true;\n\t}" ]
[ "0.70123696", "0.6660561", "0.65625787", "0.6301871", "0.62956583", "0.6237324", "0.6236484", "0.62202495", "0.621516", "0.61662555", "0.61385983", "0.6119884", "0.61124307", "0.6072498", "0.60679805", "0.6036646", "0.60345083", "0.6017957", "0.5984319", "0.597892", "0.59633887", "0.5963067", "0.58512163", "0.58493423", "0.58449143", "0.58437395", "0.5830221", "0.5822008", "0.5816132", "0.58015114", "0.57848865", "0.5783915", "0.5775156", "0.5772772", "0.5772146", "0.5760404", "0.5745993", "0.5732929", "0.57272357", "0.57248384", "0.5724681", "0.5713576", "0.56954545", "0.56867033", "0.5684717", "0.56813127", "0.5660352", "0.5647506", "0.5646631", "0.56398356", "0.5628924", "0.55945253", "0.5589708", "0.558554", "0.558509", "0.55830544", "0.55828166", "0.5579433", "0.5569765", "0.556205", "0.5556906", "0.5550049", "0.55448896", "0.5543275", "0.55334795", "0.5528008", "0.5523449", "0.55227846", "0.5518239", "0.551727", "0.5498757", "0.5483119", "0.5479077", "0.5464501", "0.5458114", "0.5458029", "0.5450588", "0.54450655", "0.54378784", "0.543147", "0.5423492", "0.54192543", "0.5413028", "0.5402005", "0.540052", "0.54004914", "0.5398288", "0.539522", "0.5394115", "0.5391896", "0.53810686", "0.5380265", "0.5373149", "0.5369143", "0.5369088", "0.5369088", "0.53594166", "0.53591406", "0.5356556", "0.5355308", "0.5348701" ]
0.0
-1
This function gets executed when the operator '' is used on the double
@Override public InterpreterValue mul(InterpreterValue v) { // If the given value is a IntegerValue create a new DoubleValue from // the multiplication-result if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue()); // If the given value is a DoubleValue create a new DoubleValue from // the multiplication-result if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue()); // In other case just throw an error throw new Error("Operator '*' is not defined for type double and " + v.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print(double someDouble) {\r\n print(someDouble + \"\");\r\n }", "@Override\n public String visit(DoubleLiteralExpr n, Object arg) {\n return null;\n }", "@Override\n\tpublic void visit(DoubleLiteral n) {\n\t\t\n\t}", "public Snippet visit(CoercionToDoubleExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t _ret.returnTemp = \"(\" + \"double\" + \")\" + _ret.returnTemp;\n\t\t\t_ret.expType = new X10Double();\n\t return _ret;\n\t }", "@Override\n public void onChanged(Double aDouble) {\n if (aDouble*1000 < 1) {\n etOutputValue.setText(\"0.0\");\n } else {\n DecimalFormat decimalFormat = new DecimalFormat(\"#,##0.###\");\n etOutputValue.setText(decimalFormat.format(aDouble));\n }\n }", "public abstract double fromBasicUnit(double valueJTextInsert);", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\t\t\t\tdflt=0;\r\n\r\n\t\t\t\toperator='*';\r\n\t\t\t\ttf2.setText(\"X\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "private void E()\n\t{\t\n\t\tString E = \"\";\t\t\t//Holds double which is approximated to the value of e\n\t\tString fieldText = \"\";\t//Holds the text currently in \"entry\". Used when leftValue is full.\n\t\tdouble e = Math.E;\t\t//Decimal approximation of e.\n\t\tE += e;\t\t\t\t\t//Decimal approximation of e inserted into a String\n\t\t\n\t\tif(Fun == null && calc.getLeftValue ( ) == 0.0)\n\t\t{\n\t\t\tentry.setText (E);\n\t\t\tsetLeftValue();\n\t\t}\n\t\telse if (calc.getLeftValue ( ) != 0.0 && calc.getRightValue ( ) == 0.0)\n\t\t{\n\t\t\tfieldText = entry.getText();\n\t\t\tfieldText += \" \" + E;\n\t\t\tentry.setText(fieldText);\n\t\t\tsetRightValue();\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='/';\r\n\t\t\t\ttf2.setText(\"/\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "public Operand(Double value) {\n if (value == null) throw new IllegalArgumentException(\"String with a value can't be empty\");\n this.value = value;\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='-';\r\n\t\t\t\ttf2.setText(\"-\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tansStri=\"\"+ans;\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='+';\r\n\t\t\t\ttf2.setText(\"+\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "private Double check_mathOperator(Double result) {\n \r\n switch(mathOperator){\r\n case '/':\r\n result =totalFirst/totalLast;\r\n break;\r\n case 'x':\r\n result =totalFirst*totalLast;\r\n break;\r\n case '-':\r\n result =totalFirst-totalLast;\r\n break;\r\n case '+':\r\n result =totalFirst+totalLast;\r\n break;\r\n \r\n }\r\n return result;\r\n }", "static String double2String (Double a){\n String s = \"\"+a;\n String[] arr = s.split(\"\\\\.\");\n if (arr[1].length()==1) s+=\"0\";\n return s;\n }", "public boolean isDouble() {\n return false;\n }", "@Override\n\tpublic void visit(DoubleType n) {\n\t\t\n\t}", "public boolean isDouble();", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\t\t\n\t}", "public DoubleField(double value) {\n\t\tthis(\"\" + value, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);\n\t}", "@Override\n public void onClick(View v) {\n if(operator_inserted==true && !curr.substring(curr.length()-1,curr.length()).equals(\" \")){\n\n\n String [] tokens = curr.split(\" \");\n switch(tokens[1].charAt(0)){\n\n case '+':\n res = Double.toString(Double.parseDouble(tokens[0]) + Double.parseDouble(tokens[2]));\n break;\n case '-':\n res = Double.toString(Double.parseDouble(tokens[0]) - Double.parseDouble(tokens[2]));\n break;\n case '/':\n res = Double.toString(Double.parseDouble(tokens[0]) / Double.parseDouble(tokens[2]));\n break;\n case '*':\n res = Double.toString(Double.parseDouble(tokens[0]) * Double.parseDouble(tokens[2]));\n break;\n\n }\n resNum();\n }\n }", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\n\t}", "@Override\n public void afterTextChanged(Editable arg0) {\n if(arg0.length()>0)\n arrTemp[holder.ref] = Double.parseDouble(arg0.toString()); //Bug here : in case we erase entire double value 0.0\n }", "String doubleRead();", "public DoubleField() {\n\t\tthis(\"\", Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);\n\t}", "public double getDouble(String name)\n/* */ {\n/* 1015 */ return getDouble(name, 0.0D);\n/* */ }", "String doubleWrite();", "public abstract void setDoubleImpl(String str, double d, Resolver<Void> resolver);", "private String calculate (double num1, double num2, String operator){\r\n \r\n double value;\r\n switch(operator){\r\n case \"+\":\r\n value = num1 + num2;\r\n break;\r\n case \"-\":\r\n value = num1 - num2;\r\n break;\r\n case \"*\":\r\n value = num1 * num2;\r\n break;\r\n case \"/\":\r\n value = num1/num2;\r\n break;\r\n default:\r\n throw new IllegalArgumentException();\r\n \r\n }\r\n String result = value + \"\";\r\n return result;\r\n }", "public T caseExpression_Double(Expression_Double object)\r\n {\r\n return null;\r\n }", "private void berechneNeuenWert () {\r\n try {\r\n double ergebnis = 0d;\r\n for (JTextComponent wert : this.wertOperator.keySet()) {\r\n if (this.ignoriereWhitespaceEingabefelder && wert.getText().trim().length() == 0) {\r\n continue;\r\n }\r\n final char operator = this.wertOperator.get(wert);\r\n final double operand = Double.parseDouble(wert.getDocument().getText(0, wert.getDocument().getLength()).trim());\r\n switch (operator) {\r\n case '*':\r\n ergebnis *= operand;\r\n break;\r\n case '/':\r\n ergebnis /= operand;\r\n break;\r\n case '-':\r\n ergebnis -= operand;\r\n break;\r\n case '+':\r\n ergebnis += operand;\r\n break;\r\n case '=':\r\n ergebnis = operand;\r\n break;\r\n }\r\n }\r\n String text = Double.toString(ergebnis);\r\n if (this.anzahlDerNachkommastellen <= 0 && text.indexOf('.') != -1) {\r\n text = text.substring(0,text.indexOf('.'));\r\n }\r\n else {\r\n // Kommastellen hinzufügen\r\n if (text.indexOf('.') == -1) {\r\n text += '.';\r\n }\r\n // ggf. mit Nullen hinten auffüllen\r\n while (text.indexOf('.') + anzahlDerNachkommastellen > text.length() -1) {\r\n text += '0';\r\n }\r\n // Abschneiden zuviel vorhandener Stellen\r\n if (text.length() - 1 > text.indexOf('.') +anzahlDerNachkommastellen) {\r\n text = text.substring(0,text.indexOf('.')+anzahlDerNachkommastellen+1);\r\n }\r\n }\r\n this.setText(text);\r\n }\r\n catch (final Exception berechnungsProblem) {\r\n this.setText(this.zeigeFehlerAn ? \"#WERT!\" : \"\");\r\n }\r\n }", "public double getDouble();", "private void outputBasedOnText(Editable s) {\n String stringValue = s.toString();\n if (stringValue.length() > 1 && stringValue.substring(stringValue.length() - 1).equals(\".\")) { // If the last char in string is \".\"\n convertInput(Double.parseDouble(stringValue.substring(0, stringValue.length() - 1)));\n } else if (!stringValue.matches(\"[-+]?\\\\d*\\\\.?\\\\d+\")) { // Check if stringValue is numeric\n convertInput(0);\n } else {\n convertInput(Double.parseDouble(stringValue));\n }\n }", "public void printer(double x);", "private double convertDouble()\n\t{\n\t\tString val = tokens[10];\n\t\tdouble value = 0.0;\n\t\ttry {\n\t\t\tvalue = Double.parseDouble(tokens[10]);\n\t\t}\n\t\tcatch(NumberFormatException e) {\n\t\t\tSystem.err.print(\"\");\n\t\t}\n\t\treturn value;\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n int t=0;\n String s=e.getActionCommand();\n if(s.equals(\"+\")||s.equals(\"-\")||s.equals(\"*\")||s.equals(\"/\")) {\n input+=\" \"+s+\" \"; //如果碰到运算符,就在运算符前后分别加一个空格,\n //为后面的分解字符串做准备\n\n }else if(s.equals(\"清零\")) {\n input=\"\";\n }else if(s.equals(\"退格\")) {\n if((input.charAt(input.length()-1))==' ') { //检测字符串的最后一个字符是否为空格,\n input=input.substring(0,input.length()-3);//如果是则删除末尾3个字符,否则删除\n //1个字符\n }else {\n input=input.substring(0,input.length()-1);\n }\n }\n else if(s.equals(\"=\")) {\n input=compute(input);\n jt.setText(input);\n input=\"\";\n t=1;\n }\n else\n input += s;\n if(t==0) {\n jt.setText(input);\n }\n }", "double getDoubleValue2();", "protected abstract double operation(double val);", "String getFloat_lit();", "private Object eval(SimpleExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"+\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res + (Double) res2;\n } else if (res instanceof Double && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof Boolean && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Double) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Boolean) {\n res = \"\" + res + res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else if (\"-\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res - (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "public Operand(String value) {\n if (value == null) throw new IllegalArgumentException(\"String with a value can't be empty\");\n this.value = Double.parseDouble(value);\n }", "public static void singleValue(String name, double value) {\n singleValue(name,value,null);\n }", "Double getDoubleValue();", "private static Double stod(String string) {\n\t\tDouble result = 2.0; // should handle this error: \"cannnot convert string to Double\"\n\t\tif (string == null || string.equals(\"\") || string.equals(\"null\") || string.equals(\"I\")) {\n\t\t\tresult = 0.0;\n\t\t} else if (string.equals(\"E\")) {\n\t\t\tresult = 1.0;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tresult = Double.parseDouble(string);\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "boolean hasDouble();", "@Override\n\tpublic void calcul() {\n\t\tif(this.operateur.equals(\"\"))\n\t\t\tthis.result = Double.parseDouble(this.operande);\n\t\telse {\n\t\t\tif(!this.operande.equals(\"\")) {\n\t\t\t\tif(this.operateur.equals(\"+\")) {\n\t\t\t\t\tthis.result += Double.parseDouble(this.operande);\n\t\t\t\t}\n\t\t\t\tif(this.operande.equals(\"-\")) {\n\t\t\t\t\tthis.result -= Double.parseDouble(this.operande);\n\t\t\t\t}\n\t\t\t\tif(this.operateur.equals(\"*\"))\n\t\t\t\t\tthis.result *= Double.parseDouble(this.operande); \n\t\t\t\tif(this.operateur.equals(\"/\")){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tthis.result /= Double.parseDouble(this.operande);\n\t\t\t\t\t}catch(ArithmeticException e){\n\t\t\t\t\t\tthis.result = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.operande = \"\";\n\t\tnotifyObserver(String.valueOf(this.result));\n\t}", "double getDoubleValue1();", "public double evaluateAsDouble();", "public abstract void getDoubleImpl(String str, double d, Resolver<Double> resolver);", "public String fullCellText() {\n\t\tString value = getDoubleValue() + \"\";\n\t\t\tif(getValue().equals(\"0\")) {\t// it equals to 0, we can just return \n\t\t\t\treturn getValue();\n\t\t\t}\n\t\t\telse if (!value.contains(\"%\") && value.contains(\".0\") \t//check if value contains no percent sign or \".0\"\n\t\t\t\t\t&& isDecimalEqualToZero(value)\t\t\t\t\t//make sure it is a whole number\n\t\t\t\t\t&& value.replace(\"-\", \"\").length() > 3) {\t\n\t\t\t\treturn value.substring(0, value.indexOf(\".\"));\n\t\t\t}\n\t\t\telse if (!value.contains(\"%\") && !value.contains(\".\")) {\t//if value contains percent sign and no contain dot\n\t\t\t\tvalue += \".0\";\t\t\t\t\t\t\t\t\t\t\t//just add \".0\" at the end\n\t\t\t}\n\t\treturn value;\n\t}", "private String literal(Number num) {\n int i = num.intValue();\n double d = num.doubleValue();\n \n if (i == d) {\n return String.valueOf(i);\n } else {\n // TODO: proper number formatting should be used\n return num.toString();\n }\n }", "public static double leerDouble() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "default T handleNumber(double val) {\n throw new UnsupportedOperationException();\n }", "public double evaluate(String exp) throws NumberFormatException, ArithmeticException {\r\n isConstant=true;\r\n return _evaluate(exp);\r\n }", "public BasicDouble(double value) {\r\n\t\tsuper.value = this.value = value;\r\n\t}", "public double doubleValue();", "protected abstract double doubleOp(double d1, double d2);", "private void m2248a(double d, String str) {\n this.f2954c = d;\n this.f2955d = (long) d;\n this.f2953b = str;\n this.f2952a = ValueType.doubleValue;\n }", "public MutableDouble() {\n\t\tsuper();\n mDouble = 0;\n\t}", "public abstract double read_double();", "public DataPrimitive(double value) {\n\t\tsuper();\n\t\tthis.value = Double.toString(value);\n\t}", "public double utility();", "public static double toDouble(java.lang.Object o)\n {\n if(o == null)\n {\n return 0;\n }\n else if(o.toString().equals(\"\"))\n {\n return 0;\n }\n else\n {\n return Double.parseDouble(o.toString());\n }\n }", "private double formatDouble(double number){\r\n return Double.parseDouble(String.format(\"%.2f\", number));\r\n }", "private double getDoubleValue(Element element, String tagName)\n {\n try\n {\n return Double.parseDouble(getValue(element,tagName));\n }\n catch (NumberFormatException exception)\n {\n return 0.0;\n }\n }", "private static String toPsString(double d) {\n return \"(\" + d + \")\";\n }", "private boolean isValidDouble(String text) {\r\n \ttry {\r\n \t\tDouble value = Double.valueOf(text);\r\n \t} catch (NumberFormatException e) {\r\n \t\treturn false;\r\n \t}\r\n \treturn true;\r\n }", "public double toDouble() {\n/* */ try {\n/* 813 */ return Double.valueOf(this.m_str).doubleValue();\n/* */ }\n/* 815 */ catch (NumberFormatException nfe) {\n/* */ \n/* 817 */ return Double.NaN;\n/* */ } \n/* */ }", "private void operation(char operator){\n if(initialised == false){\n calc.setNum1(Double.parseDouble(txtBox.getText()));\n operatorPressed = true;\n } else { \n calc.setNum2(Double.parseDouble(txtBox.getText()));\n Decimal();\n calc.setNum1(calc.getAnswer());\n txtBox.setText(Double.toString(calc.getAnswer()));\n }\n \n calc.setOperator(operator);\n\n operatorPressed = true;\n initialised = true;\n \n }", "public\n double getProperty_double(String key)\n {\n if (key == null)\n return 0.0;\n\n String val = getProperty(key);\n\n if (val == null)\n return 0.0;\n\n double ret_double = 0.0;\n try\n {\n Double workdouble = new Double(val);\n ret_double = workdouble.doubleValue();\n }\n catch(NumberFormatException e)\n {\n ret_double = 0.0;\n }\n\n return ret_double;\n }", "protected void operation(String operator){\n if (this.tail<2){\n this.arr[tail++] = this.value;\n this.arr[tail++] = operator;\n } else{\n if (this.peek() != \")\"){\n this.arr[this.tail++] = this.value;\n }\n this.arr[this.tail++] = operator;\n }\n this.value=\"\"; // reset tracking variables\n this.decimalUsed = false;\n }", "double getEDouble();", "double getDoubleValue3();", "private double getDoubleAttribute(Element element, String attributeName)\n {\n try\n {\n return Double.parseDouble(getAttribute(element,attributeName));\n }\n catch (NumberFormatException exception)\n {\n return 0.0;\n }\n }", "private Double parseNumber(String num) {\r\n\t\tDouble tempnum = (double) 0;\r\n\t\tint opos; //operator position\r\n\t\tif ((num == null) || (num.length() < 1) ) {\r\n\t\t\treturn tempnum;\r\n\t\t}\r\n\r\n\t\t//replace constants with their value\r\n\t\twhile (num.indexOf(\"P\") >= 0) { //PI constant\r\n\t\t\tString[] numparts = StringUtil.splitData(num, 'P', 2);\r\n\t\t\tnum = numparts[0]+String.valueOf(Math.PI)+numparts[1];\r\n\t\t}\r\n\t\twhile (num.indexOf(\"X\") >= 0) { //e constant\r\n\t\t\tString[] numparts = StringUtil.splitData(num, 'X', 2);\r\n\t\t\tnum = numparts[0]+String.valueOf(Math.E)+numparts[1];\r\n\t\t}\r\n\r\n\t\tif (num.indexOf(\"^\") >= 0) { //allows to specify powers (e.g.: 2^10)\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '^', 2);\r\n\t\t\ttempnum = Math.pow(parseNumber(numparts[0]), parseNumber(numparts[1]));\r\n\t\t}\r\n\t\telse if ( ((opos = num.indexOf(\"-\")) > 0) && (num.charAt(opos-1) != 'E') && (num.charAt(opos-1) != '^')) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '-', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) - parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if ( ((opos = num.indexOf(\"+\")) > 0) && (num.charAt(opos-1) != 'E') && (num.charAt(opos-1) != '^')) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '+', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) + parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if (num.indexOf(\"/\") >= 0) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '/', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) / parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if (num.indexOf(\"*\") >= 0) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '*', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) * parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttempnum = Double.valueOf(num);\r\n\t\t}\r\n\r\n\t\treturn tempnum;\r\n\t}", "private String normalizeDouble(Double value) {\n\n String valueSign = (value < 0) ? \"-\" : \"0\";\n String expSign = \"0\";\n Integer finalExp = 0;\n\n DecimalFormat df = new DecimalFormat(DECIMAL_FORMAT);\n String[] splits = df.format(value).split(\"E\");\n\n // if there's an exponent, complement it\n if(splits.length > 1) {\n\n String exponent = splits[1];\n\n if(exponent.startsWith(\"-\")) {\n\n expSign = \"-\";\n exponent = exponent.replace(\"-\", \"\");\n finalExp = 999 - Integer.parseInt(exponent);\n }\n\n else {\n finalExp = Integer.parseInt(exponent);\n }\n }\n\n return String.format(\"%s%s%03d %s\", valueSign, expSign, finalExp, splits[0]);\n }", "private double _evaluate(String exp) throws NumberFormatException, ArithmeticException {\r\n return _evaluate(exp,0,(exp.length()-1));\r\n }", "public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition ignore)\n/* */ {\n/* 1101 */ toAppendTo.append(format(number, this.defaultRuleSet));\n/* 1102 */ return toAppendTo;\n/* */ }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( input_symbol == '+' || input_symbol == '-' || input_symbol == '*' || input_symbol == '/'){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// get result(String)\n\t\t\t\t\t\t\t\tget_result = txt_showresult.getText();\n\t\t\t\t\t\t\t\tresult = Double.parseDouble(get_result);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcalculate_equal();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "Double getValue();", "void writeDouble(double value);", "public MyDouble() {\n this.setValue(0);\n }", "private String modifyValue(String value) {\n double d = Double.parseDouble(value);\n int v = round(d);\n return String.valueOf(v);\n }", "@Test\n public void testEditDistEmptyOtherString() throws Exception{\n assertEquals(4, Esercizio2.edit_distance_dyn(s3, s1));\n }", "double defendre();", "public String toString() {\n\t\treturn String.valueOf(mDouble);\n\t}", "public static String DoubleToString(double DoubleValue){\n Double doublee = new Double(DoubleValue);\n return doublee.toString(); \n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString str = e.getActionCommand();\n\t\tString ans = resultField.getText();\n\t\tString ans2 = resultField2.getText();\n\t\tdouble result;\n\t\t\n\t\tif(str ==\"0\" || str ==\"1\" || str == \"2\"|| str== \"3\" ||\n\t\t\t\tstr == \"4\"|| str == \"5\" || str == \"6\" || str == \"7\"|| str == \"8\" || str == \"9\" || str ==\".\"){\n\t\t resultField.setText(ans + str);\n\t\t resultField2.setText(ans2 + str);\n\t\t}\n\t\tif(str == \"+\" || str == \"-\" || str == \"*\" || str == \"/\")\n\t\t{\n\t\t\toper = ans;\n\t\t\top = str;\n\t\t\tresultField.setText(\"\");\n\t\t\tresultField2.setText(ans2 + str);\n\t\t}\n\t\tif(str == \"x^2\"){\n\t\t\tresultField.setText(\"\"+Double.parseDouble(ans)*Double.parseDouble(ans));\n\t\t\tresultField2.setText(ans2 + \"^2\");\n\t\t}\n\t\tif(str == \"sqrt\")\n\t\t{\n\t\t\tresultField.setText(\"\"+Math.sqrt(Double.parseDouble(ans)));\n\t\t\tresultField2.setText(ans2 + \"^1/2\");\n\t\t}\n\t\tif(str == \"1/X\")\n\t\t{\n\t\t\tresultField.setText(\"\"+1/(Double.parseDouble(ans)));\n\t\t\tresultField2.setText(\"1/(\" + ans2 + \")\");\n\t\t}\n\t\tif(str==\"+/-\")\n\t\t{\n\t\t\tresultField.setText(\"\"+-1*(Double.parseDouble(ans)));\n\t\t\tresultField.setText(\"-1*(\"+ans2+\")\");\n\t\t}\n\n\t\tif(str==\"=\")\n\t\t{\n\t\t\tchar c=op.charAt(0);\n\t\t\tswitch(c)\n\t\t\t{\n\t\t\tcase '+':\n\t\t\t\tresult=Double.parseDouble(oper) + Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '-':\n\t\t\t\tresult=Double.parseDouble(oper) - Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '*':\n\t\t\t\tresult=Double.parseDouble(oper) * Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '/':\n\t\t\t\tresult=Double.parseDouble(oper) / Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(str == \"C\")\n\t\t{\n\t\t\tresultField.setText(\"\");\n\t\t\tresultField2.setText(\"\");\n\t\t}\n\t\t\n\t\tif(str == \"Backspace\")\n\t\t{\n\t\t\tString temp=resultField.getText();\n\t\t\ttemp=temp.substring(0,temp.length()-1);\n\t\t\tresultField.setText(temp);\n\t\t\tString temp2=resultField2.getText();\n\t\t\ttemp2 = temp2.substring(0,temp2.length()-1);\n\t\t\tresultField2.setText(temp2);\n\t\t\t\n\t\t}\n\n\t}", "public String format(double number);", "private DoubleField(String str, double low, double high) {\n\t\tparser = NumberFormat.getNumberInstance(Locale.US);\n\t\tsetBackground(Color.WHITE);\n\t\tsetHorizontalAlignment(RIGHT);\n\t\tminValue = low;\n\t\tmaxValue = high;\n\t\tsetText(str);\n\t\texceptionOnError = false;\n\t}", "@Test\n\tpublic void test_TCM__double_getDoubleValue() {\n\t\tAttribute attr = new Attribute(\"test\", \"11111111111111\");\n\t\ttry {\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 11111111111111d );\n\n\t\t\tattr.setValue(\"0\");\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 0 );\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MAX_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MAX_VALUE);\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MIN_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MIN_VALUE);\n\n\t\t} catch (DataConversionException e) {\n\t\t\tfail(\"couldn't convert boolean value\");\n\t\t}\n\n\t\ttry {\n\t\t\tattr.setValue(\"foo\");\n\t\t\tfail(\"incorrectly returned double from non double value\" + attr.getDoubleValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t}", "void setDouble(String key, double val);", "T print(double data) throws PrintingException;", "private double getDoubleAttribute(Element element, String tagName, String attributeName)\n {\n try\n {\n return Double.parseDouble(getAttribute(element,tagName,attributeName));\n }\n catch (NumberFormatException exception)\n {\n return 0.0;\n }\n }", "public Mult(double left, String right) {\n super(left, right);\n }", "@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }", "@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }", "public static void setTextFieldDouble(TextField txt) {\n\t\ttxt.textProperty().addListener((obs, oldValue, newValue)->{\n\t\t\tif(newValue!=null && !newValue.matches(\"\\\\d*([\\\\.]\\\\d*)?\")) {\n\t\t\t\ttxt.setText(oldValue);\n\t\t\t}\n\t\t});\n\t}", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default double asDouble() {\n \n return notSupportedCast(BasicTypeID.DOUBLE);\n }", "Rule DoubleConstant() {\n // Push 1 DoubleConstNode onto the value stack\n return Sequence(\n Sequence(\n Optional(NumericSign()),\n ZeroOrMore(Digit()),\n Sequence('.', OneOrMore(Digit())),\n MaybeScientific()),\n actions.pushDoubleConstNode());\n }", "public Double getDoubleAttribute();", "private boolean checkDouble(String str) {\n\t\tint i = 0, flag = 0;\n\t\tchar ch;\n\n\t\tif (str.length() == 0)\n\t\t\treturn false;\n\n\t\twhile (i < str.length()) {\n\t\t\tch = str.charAt(i);\n\n\t\t\tif (ch == '-' && flag == 0) {\n\t\t\t\tflag = 1;\n\t\t\t} else if (ch >= '0' && ch <= '9' && (flag <= 2)) {\n\t\t\t\tflag = 2;\n\t\t\t} else if (ch == '.' && (flag < 3)) {\n\t\t\t\tflag = 3;\n\t\t\t} else if (ch >= '0' && ch <= '9' && (flag == 3 || flag == 4)) {\n\t\t\t\tflag = 4;\n\t\t\t} else if (whiteSpace(ch) && (flag == 2 || flag == 4)) {\n\t\t\t\tflag = 5;\n\t\t\t} else if (!(whiteSpace(ch) && flag == 0)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti++;\n\t\t}\n\t\tif (flag < 2)\n\t\t\treturn false;\n\t\treturn true;\n\t}" ]
[ "0.70123696", "0.6660561", "0.65625787", "0.6301871", "0.62956583", "0.6237324", "0.6236484", "0.62202495", "0.621516", "0.61662555", "0.61385983", "0.6119884", "0.61124307", "0.6072498", "0.60679805", "0.6036646", "0.60345083", "0.6017957", "0.5984319", "0.597892", "0.59633887", "0.5963067", "0.58512163", "0.58493423", "0.58449143", "0.58437395", "0.5830221", "0.5822008", "0.5816132", "0.58015114", "0.57848865", "0.5783915", "0.5775156", "0.5772772", "0.5772146", "0.5760404", "0.5745993", "0.5732929", "0.57272357", "0.57248384", "0.5724681", "0.5713576", "0.56954545", "0.56867033", "0.5684717", "0.56813127", "0.5660352", "0.5647506", "0.5646631", "0.56398356", "0.5628924", "0.55945253", "0.5589708", "0.558554", "0.558509", "0.55830544", "0.55828166", "0.5579433", "0.5569765", "0.556205", "0.5556906", "0.5550049", "0.55448896", "0.5543275", "0.55334795", "0.5528008", "0.5523449", "0.55227846", "0.5518239", "0.551727", "0.5498757", "0.5483119", "0.5479077", "0.5464501", "0.5458114", "0.5458029", "0.5450588", "0.54450655", "0.54378784", "0.543147", "0.5423492", "0.54192543", "0.5413028", "0.5402005", "0.540052", "0.54004914", "0.5398288", "0.539522", "0.5394115", "0.5391896", "0.53810686", "0.5380265", "0.5373149", "0.5369143", "0.5369088", "0.5369088", "0.53594166", "0.53591406", "0.5356556", "0.5355308", "0.5348701" ]
0.0
-1
This function gets executed when the operator '/' is used on the double
@Override public InterpreterValue div(InterpreterValue v) { // If the given value is a IntegerValue create a new DoubleValue from // the division-result if(v instanceof IntegerValue) return new DoubleValue(getValue() / ((IntegerValue) v).getValue()); // If the given value is a DoubleValue create a new DoubleValue from // the division-result if(v instanceof DoubleValue) return new DoubleValue(getValue() / ((DoubleValue) v).getValue()); // In other case just throw an error throw new Error("Operator '/' is not defined for type double and " + v.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract double operation(double val);", "@Override\n public double calculate(double input)\n {\n return input/getValue();\n }", "private Double check_mathOperator(Double result) {\n \r\n switch(mathOperator){\r\n case '/':\r\n result =totalFirst/totalLast;\r\n break;\r\n case 'x':\r\n result =totalFirst*totalLast;\r\n break;\r\n case '-':\r\n result =totalFirst-totalLast;\r\n break;\r\n case '+':\r\n result =totalFirst+totalLast;\r\n break;\r\n \r\n }\r\n return result;\r\n }", "@Override\n\tpublic double divide(double in1, double in2) {\n\t\treturn 0;\n\t}", "private void division()\n\t{\n\t\tFun = Function.DIVIDE; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public void divide(MyDouble val) {\n this.setValue(this.getValue() / val.getValue());\n }", "public void divide()\r\n {\r\n if (fractionDisplay)\r\n {\r\n result = Operations.fractionFormat(leftOperand, rightOperand);\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n divisionFormatResult = true;\r\n }\r\n else \r\n {\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n }\r\n resultResetHelper();\r\n }", "@Override\n\tpublic double divide(double a, double b) {\n\t\treturn (a/b);\n\t}", "double doubleValue()\n {\n double top = 1.0 * numerator;\n double bottom=1.0*denominator;\n top=top/bottom;\n return top;\n\n }", "public void divide() {\n\t\t\n\t}", "@Override\n\tpublic void visit(DoubleType n) {\n\t\t\n\t}", "@Override\n\tpublic void visit(DoubleLiteral n) {\n\t\t\n\t}", "private static double operate(Double a, Double b, String op){\n\t switch (op){\r\n\t case \"+\": return Double.valueOf(a) + Double.valueOf(b);\r\n\t case \"-\": return Double.valueOf(a) - Double.valueOf(b);\r\n\t case \"*\": return Double.valueOf(a) * Double.valueOf(b);\r\n\t case \"/\": try{\r\n\t return Double.valueOf(a) / Double.valueOf(b);\r\n\t }catch (Exception e){\r\n\t e.getMessage();\r\n\t }\r\n\t default: return -1;\r\n\t }\r\n\t }", "protected abstract double doubleOp(double d1, double d2);", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\t\t\n\t}", "double getDoubleValue2();", "public double evaluateAsDouble();", "public double getDouble();", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\n\t}", "public double getDoubleValue()\n {\n return (double) getValue() / (double) multiplier;\n }", "@Override\n\tpublic void calcul() {\n\t\tif(this.operateur.equals(\"\"))\n\t\t\tthis.result = Double.parseDouble(this.operande);\n\t\telse {\n\t\t\tif(!this.operande.equals(\"\")) {\n\t\t\t\tif(this.operateur.equals(\"+\")) {\n\t\t\t\t\tthis.result += Double.parseDouble(this.operande);\n\t\t\t\t}\n\t\t\t\tif(this.operande.equals(\"-\")) {\n\t\t\t\t\tthis.result -= Double.parseDouble(this.operande);\n\t\t\t\t}\n\t\t\t\tif(this.operateur.equals(\"*\"))\n\t\t\t\t\tthis.result *= Double.parseDouble(this.operande); \n\t\t\t\tif(this.operateur.equals(\"/\")){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tthis.result /= Double.parseDouble(this.operande);\n\t\t\t\t\t}catch(ArithmeticException e){\n\t\t\t\t\t\tthis.result = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.operande = \"\";\n\t\tnotifyObserver(String.valueOf(this.result));\n\t}", "double value(double x) {\n double a = left.value(x);\n\n // value of the right operand expression tree\n double b = right.value(x);\n\n switch (op) {\n case \"+\":\n return a + b;\n case \"-\":\n return a - b;\n case \"*\":\n return a * b;\n default:\n return a / b;\n }\n }", "public double toDouble(){\n return (double)this.numerator /(double)this.denominator;\n }", "public abstract double compute(double value);", "void div(double val) {\r\n\t\tresult = result / val;\r\n\t}", "public static void main(String[]args) {\n\t\tdouble d=10;\n\t\tint num=10;\n\t\t\n\t\tSystem.out.println(d);\n\t\tint i=(int) 12.99;\n\t\tSystem.out.println(i);\n\t\tbyte b=(byte)130;\n\t\tSystem.out.println(b);\n\t\t\n\t double number =12;\n\t\tdouble result = number/5;\n\t\tSystem.out.println(result);\n\t\t\n\t\tdouble newNum=10;\n\t\tnewNum=newNum/3;\n\t\tSystem.out.println(newNum);\n\t\t\n\t\tdouble num1=10+10.5;\n\t\t\n\t\tSystem.out.println(num1);\n\t\t\n\t\n\t\t\n\t}", "double getDoubleValue1();", "private double processTerm() throws ParsingException {\n double result = processFactor();\n\n while (true) {\n if (tryCaptureChar('*')) {\n result *= processFactor();\n } else if (tryCaptureChar('/')) {\n result /= processFactor();\n } else {\n break;\n }\n }\n\n return result;\n }", "public double getValue(){\n return (double) numerator / (double) denominator;\n }", "private Object eval(Term expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"*\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res * (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: Term error\");\n }\n } else if (\"/\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res / (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: Term error\");\n }\n } else if (\"%\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res % (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: Term error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "default DiscreteDoubleMap2D dividedBy(double value) {\r\n\t\treturn pushForward(d -> d / value);\r\n\t}", "public boolean isDouble();", "Double getDoubleValue();", "public double doubleValue()\n\t\t{\n\t\t\t// Converts BigIntegers to doubles and then divides \n\t\t\treturn (numerator.doubleValue()*1)/denominator.doubleValue();\n\t\t}", "public double getDoubleValue() {\n\t\treturn (this.numerator/1.0)/this.denominator;\n\t}", "public abstract double evaluate(double value);", "@Override\n public InterpreterValue mod(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the modulo-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() % ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the modulo-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() % ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '%' is not defined for type double and \" + v.getName());\n\n }", "@Override\n\tpublic void\n\tscalarDiv( double value )\n\t{\n\t\tdata[0] /= value;\n\t\tdata[1] /= value;\n\t\tdata[2] /= value;\n\t}", "public double doubleValue();", "Double getValue();", "public double toDouble() {\n return ((double)numerator) / ((double)denominator);\n }", "double getDoubleValue3();", "public double utility();", "BaseNumber divide(BaseNumber operand);", "@Override\n\tpublic void div(double dx, double dy) {\n\t\t\n\t}", "@Override\n\tpublic double compute(double input) {\n\t\treturn input;\n\t}", "public abstract double read_double();", "public double calculate(double value1, double value2, String op)\r\n { \r\n if (op.equals(\"+\")) \r\n {\r\n return value1 + value2;\r\n }\r\n else if (op.equals(\"-\")) \r\n {\r\n return value1 - value2;\r\n }\r\n else if (op.equals(\"*\")) \r\n {\r\n return value1 * value2;\r\n }\r\n else if (op.equals(\"/\")) \r\n {\r\n return value1 / value2;\r\n }\r\n else // \"=\"\r\n {\r\n return value2;\r\n }\r\n }", "double doubleTheValue(double input) {\n\t\treturn input*2;\n\t}", "public static double divide(double num1,double num2){\n\n // return num1/num2 ;\n\n if(num2==0){\n return 0 ;\n } else {\n return num1/num2 ;\n }\n }", "public final void div (Unit unit) throws ArithmeticException {\n\t\tlong u = mksa ; double r = factor; double v = value;\n\t\tif (((mksa&_abs)!=0) && (unit.factor != 1)) throw\t// On a date\n\t\tnew ArithmeticException(\"****Unit.div on a date!\");\n\t\tif (((mksa|unit.mksa)&_log) != 0) {\n\t\t\tif ((mksa == underScore) && (factor == 1.)) ;\n\t\t\telse if ((unit.mksa == underScore) && (unit.factor == 1.)) ;\n\t\t\telse throw new ArithmeticException\n\t\t\t(\"****Unit: can't divide logs: \" + symbol + \" x \" + unit.symbol);\n\t\t}\n\t\t/* As soon as there is an operation, the offset is ignored \n\t\t * except if one of the factors is unity.\n\t\t */\n\t\tif ((offset!=0) || (unit.offset!=0)) {\n\t\t\tif (mksa == underScore) offset = unit.offset;\n\t\t\telse if (unit.mksa == underScore) ;\n\t\t\telse offset = 0;\n\t\t}\n\t\tv /= unit.value; \n\t\tr /= unit.factor; \n\t\tu += underScore; u -= unit.mksa;\n\t\tif ((u&0x8c80808080808080L) != 0) throw new ArithmeticException\n\t\t(\"****too large powers in: \" + symbol + \" / \" + unit.symbol);\n\t\tmksa = u;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\t/* Decision for the new symbol */\n\t\tif ((symbol != null) && (unit.symbol != null)) {\n\t\t\tif ((unit.mksa == underScore) && (unit.factor == 1)) return;\t// No unit ...\n\t\t\tif (( mksa == underScore) && ( factor == 1))\n\t\t\t\tsymbol = toExpr(unit.symbol) + \"-1\";\n\t\t\telse if (symbol.equals(unit.symbol)) symbol = edf(factor);\n\t\t\telse symbol = toExpr(symbol) + \"/\" + toExpr(unit.symbol) ;\n\t\t}\n\t}", "double getRealValue();", "public static double leerDouble() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "double getEDouble();", "void doStuff() {\n System.out.println(7/0);\r\n }", "@Test\n\tvoid divide() {\n\t\tfloat result = calculator.divide(12, 4);\n\t\tassertEquals(3,result);\n\t}", "@Override\n\tpublic double derive(double input) {\n\t\treturn 1;\n\t}", "double apply(double x, double y) {\n switch (this) {\n case PLUS: return x + y;\n case MINUS: return x - y;\n case TIMES: return x * y;\n case DEVICE: return x / y;\n }\n throw new AssertionError(\"unknwon op: \" + this);\n }", "public int division(){\r\n return Math.round(x/y);\r\n }", "public abstract double getValue();", "private boolean dividingByZero(String operator){\n if (numStack.peek() == 0 && operator.equals(\"/\")){\n return true;\n }\n return false;\n }", "@Override\r\n\tpublic double calculate() {\n\t\treturn n1 / n2;\r\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='/';\r\n\t\t\t\ttf2.setText(\"/\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "private double convertDouble()\n\t{\n\t\tString val = tokens[10];\n\t\tdouble value = 0.0;\n\t\ttry {\n\t\t\tvalue = Double.parseDouble(tokens[10]);\n\t\t}\n\t\tcatch(NumberFormatException e) {\n\t\t\tSystem.err.print(\"\");\n\t\t}\n\t\treturn value;\n\t}", "@Override\n public void onClick(View v) {\n if(operator_inserted==true && !curr.substring(curr.length()-1,curr.length()).equals(\" \")){\n\n\n String [] tokens = curr.split(\" \");\n switch(tokens[1].charAt(0)){\n\n case '+':\n res = Double.toString(Double.parseDouble(tokens[0]) + Double.parseDouble(tokens[2]));\n break;\n case '-':\n res = Double.toString(Double.parseDouble(tokens[0]) - Double.parseDouble(tokens[2]));\n break;\n case '/':\n res = Double.toString(Double.parseDouble(tokens[0]) / Double.parseDouble(tokens[2]));\n break;\n case '*':\n res = Double.toString(Double.parseDouble(tokens[0]) * Double.parseDouble(tokens[2]));\n break;\n\n }\n resNum();\n }\n }", "double divide (double a, double b) {\n\t\tdouble result = a/b;\n\t\treturn result;\n\t}", "private String doDivision(String answer)\n\t{\n\t\tint signSpot;\n\t\tString stringToDelete;\n\t\tdouble number1;\n\t\tdouble number2;\n\t\tint minValue = 0;\n\t\tint maxValue = 0;\n\n\t\twhile (answer.contains(\"/\"))\n\t\t{\n\t\t\tsignSpot = answer.indexOf(\"/\");\n\n\t\t\t// start\n\t\t\tfor (int count = signSpot - 1; count >= 0; count -= 1)\n\t\t\t{\n\t\t\t\tif (isNumeric(answer.substring(count, count + 1)) == true\n\t\t\t\t\t\t|| answer.substring(count, count + 1).equals(\".\"))\n\t\t\t\t{\n\t\t\t\t\tminValue = count;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// finish\n\t\t\tfor (int count = signSpot + 2; count <= answer.length(); count += 1)\n\t\t\t{\n\t\t\t\tif (isNumeric(answer.substring(count - 1, count)) == true\n\t\t\t\t\t\t|| answer.substring(count - 1, count).equals(\".\"))\n\t\t\t\t{\n\t\t\t\t\tmaxValue = count;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstringToDelete = answer.substring(minValue, maxValue);\n\t\t\tString myString = answer.substring(minValue, signSpot);\n\t\t\tnumber1 = Double.parseDouble(myString);\n\t\t\tmyString = answer.substring(signSpot + 1, maxValue);\n\t\t\tnumber2 = Double.parseDouble(myString);\n\t\t\tDouble numberAnswer1 = number1 / number2;\n\t\t\tanswer = answer.replace(stringToDelete, \"\" + numberAnswer1);\n\t\t\tSystem.out.println(answer);\n\t\t}\n\t\treturn answer;\n\t}", "public static void main(String[] args) {\n\t\tfinal double d = 1 / 2; \n\t\tSystem.out.println(d); \n\t}", "@Override\n\t\tpublic Double fazCalculo(Double num1, Double num2) {\n\t\t\treturn num1 / num2;\n\t\t}", "double getValue();", "double getValue();", "double getValue();", "@Override\n public void onChanged(Double aDouble) {\n if (aDouble*1000 < 1) {\n etOutputValue.setText(\"0.0\");\n } else {\n DecimalFormat decimalFormat = new DecimalFormat(\"#,##0.###\");\n etOutputValue.setText(decimalFormat.format(aDouble));\n }\n }", "public abstract void setDoubleImpl(String str, double d, Resolver<Void> resolver);", "public boolean isDouble() {\n return false;\n }", "public abstract void getDoubleImpl(String str, double d, Resolver<Double> resolver);", "private double term(boolean get){\n\t\t// compute the left argument which has to be a primary value or an expression with a higher priority than products\n\t\tdouble left = pot(get);\n\t\tfor(;;){\n\t\t\tswitch(curr_tok){\n\t\t\t\tcase MUL:{\n\t\t\t\t\tleft*=pot(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase DIV:{\n\t\t\t\t\tdouble d;\n\t\t\t\t\tif((d=pot(true)) != 0){\n\t\t\t\t\t\tleft/=d;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//System.err.println(\"Error::TermParser::term(): Invalid operation. Division by 0.\");\n\t\t\t\t\treturn Double.NaN;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\treturn left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void setRightValue()\n\t{\t\n\t\tString[] split = null;\t//String array created to hold individual Strings generated by the\n\t\t\t\t\t\t\t\t//split method\n\t\t\n\t\t/* Determines the arithmetic symbol that is being used in calculation\t*/\n\t\tif(Fun != null)\n\t\t{\n\t\t\tstrParse = entry.getText();\n\t\t\tswitch (Fun)\n\t\t\t{\n\t\t\t\tcase ADD:\n\t\t\t\t\tsplit = strParse.split (\"\\\\+\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase SUBTRACT:\n\t\t\t\t\tsplit = strParse.split (\"\\\\-\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase DIVIDE:\n\t\t\t\t\tsplit = strParse.split (\"\\\\/\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase MULTIPLY:\n\t\t\t\t\tsplit = strParse.split (\"\\\\*\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\trightValue = Double.parseDouble (split[1]);\n\t\t\t\tcalc.setRightValue (rightValue);\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t}//end if\n\t\t\n\t}", "public int getDenominator() { \n return denominator; \n }", "private double parseTerm() {\n double value = parseFactor();\n while (true) {\n if (token.getType().equals(Token.Type.DIVIDE)) { // division\n token = lexer.getNextToken();\n value /= parseFactor();\n } else if (token.getType().equals(Token.Type.MULTIPLY)|| \n \t\t token.getType().equals(Token.Type.LPAREN)|| \n \t \t token.getType().equals(Token.Type.SQRT)|| \n \t\t token.getType().equals(Token.Type.NUMBER)) { // multiplication\n if (token.getType().equals(Token.Type.MULTIPLY)) {\n \ttoken=lexer.getNextToken();\n }\n value *= parseFactor();\n } else {\n return value;\n }\n }\n\t}", "public void set_double(double param) {\n this.local_double = param;\n }", "public Snippet visit(CoercionToDoubleExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t _ret.returnTemp = \"(\" + \"double\" + \")\" + _ret.returnTemp;\n\t\t\t_ret.expType = new X10Double();\n\t return _ret;\n\t }", "public double divide(double a, double b) {\n\t\treturn a/b;\n\t}", "void multiply(double value);", "public double getDouble(String key)\n {\n return getDouble(key, 0);\n }", "public static strictfp final \n\tvoid myMethod5()throws Exception{\n\t\tdouble dnum=100/3;\t\n\t}", "public static double getDouble(Key key) {\n return getDouble(key, 0);\n }", "public double nextDouble() {\n\tdouble result = (d1 - 1.0) / (POW3_33 - 1.0);\n\tnextIterate();\n\treturn result;\n }", "public static double getDoubleProperty(String key) {\r\n\t\treturn getDoubleProperty(key, 0);\r\n\t}", "private void percent()\n\t{\n\t\tDouble percent;\t\t//holds the right value percentage of the left value\n\t\tString newText = \"\";//Holds the updated text \n\t\tif(calc.getLeftValue ( ) != 0.0 && Fun != null)\n\t\t{\n\t\t\tsetRightValue();\n\t\t\tpercent = calc.getRightValue() * 0.01 * calc.getLeftValue();\n\t\t\tleftValue = calc.getLeftValue();\n\t\t\tnewText += leftValue;\n\t\t\tswitch (Fun)\n\t\t\t{\n\t\t\t\tcase ADD:\n\t\t\t\t\tnewText += \" + \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase SUBTRACT:\n\t\t\t\t\tnewText += \" - \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase DIVIDE:\n\t\t\t\t\tnewText += \" / \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase MULTIPLY:\n\t\t\t\t\tnewText += \" * \";\n\t\t\t\t\tbreak;\n\t\t\t}//end switch\n\t\t\t\n\t\t\tnewText += \" \" + percent;\n\t\t\tentry.setText(newText);\n\t\t\t\n\t\t}//end if\n\t\t\n\t}", "boolean hasDouble();", "private void E()\n\t{\t\n\t\tString E = \"\";\t\t\t//Holds double which is approximated to the value of e\n\t\tString fieldText = \"\";\t//Holds the text currently in \"entry\". Used when leftValue is full.\n\t\tdouble e = Math.E;\t\t//Decimal approximation of e.\n\t\tE += e;\t\t\t\t\t//Decimal approximation of e inserted into a String\n\t\t\n\t\tif(Fun == null && calc.getLeftValue ( ) == 0.0)\n\t\t{\n\t\t\tentry.setText (E);\n\t\t\tsetLeftValue();\n\t\t}\n\t\telse if (calc.getLeftValue ( ) != 0.0 && calc.getRightValue ( ) == 0.0)\n\t\t{\n\t\t\tfieldText = entry.getText();\n\t\t\tfieldText += \" \" + E;\n\t\t\tentry.setText(fieldText);\n\t\t\tsetRightValue();\n\t\t}\n\t}", "public\n double getProperty_double(String key)\n {\n if (key == null)\n return 0.0;\n\n String val = getProperty(key);\n\n if (val == null)\n return 0.0;\n\n double ret_double = 0.0;\n try\n {\n Double workdouble = new Double(val);\n ret_double = workdouble.doubleValue();\n }\n catch(NumberFormatException e)\n {\n ret_double = 0.0;\n }\n\n return ret_double;\n }", "double performeOperation(double argument1, double argument2);", "public double getDoubleWert() {\n\t\treturn (double) p / (double) q;\n\t}", "void setValue(double value);", "public double divide(double a, double b, boolean rem){ return rem? a%b: a/b; }", "com.google.protobuf.ByteString getSlashFractionDoubleSign();", "@Override\n\tpublic double DivideOperation(double dividend, double divisor) {\n\t\treturn 0;\n\t}", "private double formatDoubleWithTwoDeci(double value) {\r\n \treturn Math.floor(value*1e2)/1e2;\r\n }" ]
[ "0.66926754", "0.66677874", "0.6621252", "0.6486757", "0.6466879", "0.6437575", "0.6417483", "0.6408106", "0.63556516", "0.6314545", "0.62754935", "0.6269384", "0.62228876", "0.621803", "0.62040085", "0.6192243", "0.6156995", "0.6156864", "0.6145621", "0.6122247", "0.61087966", "0.60739243", "0.6073802", "0.606596", "0.6063743", "0.6041643", "0.6038929", "0.6033765", "0.60308737", "0.60307145", "0.600495", "0.60036814", "0.5990425", "0.597297", "0.5938624", "0.5930814", "0.5925772", "0.5923565", "0.5877739", "0.58670574", "0.58289653", "0.5824878", "0.58161", "0.5815231", "0.5805026", "0.5800343", "0.57876253", "0.5783756", "0.5779897", "0.5772065", "0.5768242", "0.5765221", "0.57620215", "0.5750432", "0.57487035", "0.57464373", "0.57459927", "0.57430714", "0.57413423", "0.57359576", "0.5734272", "0.5733258", "0.573131", "0.5717653", "0.57103676", "0.57041824", "0.569244", "0.5690501", "0.5654158", "0.5651494", "0.5651494", "0.5651494", "0.5645038", "0.5644318", "0.5642062", "0.5634841", "0.56239015", "0.5620007", "0.56118685", "0.56085", "0.5607095", "0.5601163", "0.560043", "0.55964994", "0.5596159", "0.5595045", "0.5587688", "0.5584313", "0.5580987", "0.55783206", "0.5569599", "0.5569096", "0.55687296", "0.5568484", "0.55656344", "0.55589825", "0.55570453", "0.5539018", "0.5538985", "0.5538041" ]
0.6883047
0
This function gets executed when the operator '%' is used on the double
@Override public InterpreterValue mod(InterpreterValue v) { // If the given value is a IntegerValue create a new DoubleValue from // the modulo-result if(v instanceof IntegerValue) return new DoubleValue(getValue() % ((IntegerValue) v).getValue()); // If the given value is a DoubleValue create a new DoubleValue from // the modulo-result if(v instanceof DoubleValue) return new DoubleValue(getValue() % ((DoubleValue) v).getValue()); // In other case just throw an error throw new Error("Operator '%' is not defined for type double and " + v.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public double calculate(double input)\n {\n return input/getValue();\n }", "private void percent()\n\t{\n\t\tDouble percent;\t\t//holds the right value percentage of the left value\n\t\tString newText = \"\";//Holds the updated text \n\t\tif(calc.getLeftValue ( ) != 0.0 && Fun != null)\n\t\t{\n\t\t\tsetRightValue();\n\t\t\tpercent = calc.getRightValue() * 0.01 * calc.getLeftValue();\n\t\t\tleftValue = calc.getLeftValue();\n\t\t\tnewText += leftValue;\n\t\t\tswitch (Fun)\n\t\t\t{\n\t\t\t\tcase ADD:\n\t\t\t\t\tnewText += \" + \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase SUBTRACT:\n\t\t\t\t\tnewText += \" - \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase DIVIDE:\n\t\t\t\t\tnewText += \" / \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase MULTIPLY:\n\t\t\t\t\tnewText += \" * \";\n\t\t\t\t\tbreak;\n\t\t\t}//end switch\n\t\t\t\n\t\t\tnewText += \" \" + percent;\n\t\t\tentry.setText(newText);\n\t\t\t\n\t\t}//end if\n\t\t\n\t}", "protected abstract double operation(double val);", "public void modulo(MyDouble val) {\n this.setValue(this.getValue() % val.getValue());\n }", "void div(double val) {\r\n\t\tresult = result / val;\r\n\t}", "private Double check_mathOperator(Double result) {\n \r\n switch(mathOperator){\r\n case '/':\r\n result =totalFirst/totalLast;\r\n break;\r\n case 'x':\r\n result =totalFirst*totalLast;\r\n break;\r\n case '-':\r\n result =totalFirst-totalLast;\r\n break;\r\n case '+':\r\n result =totalFirst+totalLast;\r\n break;\r\n \r\n }\r\n return result;\r\n }", "public static void main(String[] args) {\n\n double doubleVariable = 20.00d;\n double secondDouble = 80.00d;\n\n double total = doubleVariable + secondDouble * 100d;\n System.out.println(total);\n\n\n double remainder = total % 40.00d;\n\n System.out.println(remainder);\n\n boolean isRemainderZero = remainder == 0 ? true : false;\n\n System.out.println(isRemainderZero);\n\n if(!isRemainderZero){\n System.out.println(\"Got some remainder\");\n }\n\n\n }", "public abstract double compute(double value);", "@Override\n public InterpreterValue div(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the division-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() / ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the division-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() / ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '/' is not defined for type double and \" + v.getName());\n\n }", "double updateValue(double value, double percentage){\n\t\treturn value+=(value*(.01*percentage));\r\n\t}", "private void division()\n\t{\n\t\tFun = Function.DIVIDE; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "int getRemainderPercent();", "public void divide(MyDouble val) {\n this.setValue(this.getValue() / val.getValue());\n }", "@Override\n\tpublic double divide(double in1, double in2) {\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\n double valueTwenty = 20.00d;\n double valueEighty = 80.00d;\n double totalValue = (valueEighty+valueTwenty)*100.00d;\n double remainderValue = totalValue % 40.00d;\n boolean isZero = (remainderValue == 0) ? true : false;\n if(!isZero){\n System.out.println(\"Got Some Remainder\");\n }\n\n }", "double getBasedOnValue();", "public double divide(double a, double b, boolean rem){ return rem? a%b: a/b; }", "int getAlphaMod(){\n return getPercentageValue(\"alphaMod\");\n }", "public static void main(String[] args) {\n\n String result = NumberFormat.getPercentInstance().format(0.1);// method chaining\n System.out.println(result);\n }", "public static void main(String[] args) {\n\t\tdouble myFirstValue = 20.00d;\r\n\t\tdouble mySecondValue = 80.00d;\r\n\t\tdouble myTotalValue = (myFirstValue+mySecondValue) *100.00d;\r\n\t\tSystem.out.println(\"myTotalValue: \"+ myTotalValue);\r\n\t\tdouble theRemainder = myTotalValue % 40.00d;\r\n\t\tSystem.out.println(\"theRemainder: \"+ theRemainder);\r\n\t\tboolean isNoRemainder = (theRemainder==0)? true: false;\r\n\t\tSystem.out.println(\"isNoRemainder: \"+ isNoRemainder);\r\n\t\tif(!isNoRemainder) {\r\n\t\t\tSystem.out.println(\"Got Some Remainder\");\r\n\t\t}\r\n\t\t\r\n\t}", "double doubleValue()\n {\n double top = 1.0 * numerator;\n double bottom=1.0*denominator;\n top=top/bottom;\n return top;\n\n }", "public abstract double evaluate(double value);", "public void divide()\r\n {\r\n if (fractionDisplay)\r\n {\r\n result = Operations.fractionFormat(leftOperand, rightOperand);\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n divisionFormatResult = true;\r\n }\r\n else \r\n {\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n }\r\n resultResetHelper();\r\n }", "int getSatMod(){\n return getPercentageValue(\"satMod\");\n }", "public void onclickpercent(View v){\n Button b = (Button) v;\n String temp;\n double t;\n String y;\n displayscreen = screen.getText().toString();\n displayscreen2 = screen2.getText().toString();\n if (displayscreen.equals(\"\") && displayscreen2.equals(\"\")) //handle if display is empty\n return;\n else if (displayscreen.equals(\"\") && !displayscreen2.equals(\"\")) {\n temp = screen2.getText().toString();\n if (temp.contains(\"+\") || temp.contains(\"-\") || temp.contains(\"x\") || temp.contains(\"÷\")){ //handle if user inserts only operators\n return;}\n t = Double.valueOf(temp) /100.0;\n y=df2.format(t);\n screen.setText(y);\n String z=\"%\";\n screen2.setText(temp+z);\n }\n else\n {\n temp = screen.getText().toString();\n t = Double.valueOf(temp) /100.0;\n y=df2.format(t);\n screen.setText(y);\n String z=\"%\";\n screen2.setText(temp+z);\n }\n }", "boolean hasPercentage();", "@Override\n\tpublic double divide(double a, double b) {\n\t\treturn (a/b);\n\t}", "public double getMainPercentage(){return mainPercentage;}", "double getDoubleValue2();", "@Override\n\tpublic double compute(double input) {\n\t\treturn input;\n\t}", "java.lang.String getPercentage();", "public static void main(String[] args) {\n\n double x = 34.56;\n double y = 2.45;\n\n System.out.println(x + y);\n System.out.println(x - y);\n System.out.println(x * y);\n System.out.println(x / y);\n\n var a = 5;\n int b = 9;\n\n System.out.println(a + b);\n System.out.println(a - b);\n System.out.println(a * b);\n System.out.println(a / b);\n System.out.println(a / (double)b);\n\n System.out.println(a % b);\n\n }", "double getValue();", "double getValue();", "double getValue();", "void doStuff() {\n System.out.println(7/0);\r\n }", "private static double operate(Double a, Double b, String op){\n\t switch (op){\r\n\t case \"+\": return Double.valueOf(a) + Double.valueOf(b);\r\n\t case \"-\": return Double.valueOf(a) - Double.valueOf(b);\r\n\t case \"*\": return Double.valueOf(a) * Double.valueOf(b);\r\n\t case \"/\": try{\r\n\t return Double.valueOf(a) / Double.valueOf(b);\r\n\t }catch (Exception e){\r\n\t e.getMessage();\r\n\t }\r\n\t default: return -1;\r\n\t }\r\n\t }", "Double getValue();", "public static void main(String[]args) {\n\t\tdouble d=10;\n\t\tint num=10;\n\t\t\n\t\tSystem.out.println(d);\n\t\tint i=(int) 12.99;\n\t\tSystem.out.println(i);\n\t\tbyte b=(byte)130;\n\t\tSystem.out.println(b);\n\t\t\n\t double number =12;\n\t\tdouble result = number/5;\n\t\tSystem.out.println(result);\n\t\t\n\t\tdouble newNum=10;\n\t\tnewNum=newNum/3;\n\t\tSystem.out.println(newNum);\n\t\t\n\t\tdouble num1=10+10.5;\n\t\t\n\t\tSystem.out.println(num1);\n\t\t\n\t\n\t\t\n\t}", "public static double calculateValueInPercentage(double value) {\r\n return value * 0.01;\r\n }", "@Override\n\tdouble evaluate() {\n\t\treturn Math.abs(operand.getVal());\n\t}", "public int division(){\r\n return Math.round(x/y);\r\n }", "public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }", "int getPercentageHeated();", "public void divide() {\n\t\t\n\t}", "double getDoubleValue1();", "public static double modulo(double val, double mod) {\n double n = Math.floor(val / mod);\n double r = val - n * mod;\n return Util.almost_equals(r,mod) ? 0.0 : r;\n }", "@Override\n\tpublic void visit(DoubleLiteral n) {\n\t\t\n\t}", "protected final double mod(double value, double modulus) {\n return (value % modulus + modulus) % modulus;\n }", "public double evaluateAsDouble();", "private String calcMod(double val) {\n double vall = (val - 10) / 2;\n if (vall < 0) {\n val = Math.floor(vall);\n return String.valueOf((int)val);\n }\n else {\n val = Math.ceil(vall);\n return \"+\" + String.valueOf((int)val);\n }\n }", "public double getPercent() { return this.percentage; }", "static int valDiv2 (){\n return val/2;\n }", "public static void main(String[] args) {\n\t\tdouble i = 4.0;\n\t\ti = i+ 5;\n\t\tSystem.out.println(i);\n\t\tdouble percent = 10;\n\t\tSystem.out.println(percent + \"%\");\n\t}", "public double percentage(double value) {\n return basicCalculation(value, 100, Operator.DIVIDE);\n }", "public double utility();", "double performeOperation(double argument1, double argument2);", "public double evaluate(Map<String, Double> assignment) throws Exception {\n if (super.getExpression().evaluate(assignment) % 180 == 90) {\n return 0;\n }\n if (super.getExpression().evaluate(assignment) % 360 == 180) {\n return -1;\n }\n if (super.getExpression().evaluate(assignment) % 360 == 0) {\n return 1;\n }\n return Math.cos(Math.toRadians(super.getExpression().evaluate(assignment)));\n }", "BaseNumber divide(BaseNumber operand);", "public double evaluate(String exp) throws NumberFormatException, ArithmeticException {\r\n isConstant=true;\r\n return _evaluate(exp);\r\n }", "@Override\n public Float div(Float lhs, Float rhs) {\n\t\n\tassert(rhs != 0);\n\t\n\tfloat res = lhs/rhs;\n\treturn res;\n }", "@Override\n\tpublic void visit(DoubleType n) {\n\t\t\n\t}", "public final void mPERCENT() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = PERCENT;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:433:8: ( '%' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:433:16: '%'\n\t\t\t{\n\t\t\tmatch('%'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "double getDoubleValue3();", "public static void main(String[] args) {\n\n System.out.println(3 + 9);\n\n System.out.println(10 - 2);\n\n System.out.println(10 * 3);\n\n System.out.println(10 / 2);\n\n System.out.println(10 % 4); // 2\n\n int result = 10 % 3;\n\n System.out.println(\"result = \" + result);\n\n System.out.println(10 / 4); // 2\n System.out.println(10.0 / 4); // 2.5\n System.out.println(10 / 4.0); // 2.5\n\n double d1 = 10 / 4; // 2.0\n\n System.out.println(\"d1 = \" + d1);\n\n double d2 = 10 / 4.0f; // 2.5\n\n System.out.println(\"d2 = \" + d2);\n }", "public double toPercent(double x){\n\t\treturn x/ 100;\n\t}", "public final void div (Unit unit) throws ArithmeticException {\n\t\tlong u = mksa ; double r = factor; double v = value;\n\t\tif (((mksa&_abs)!=0) && (unit.factor != 1)) throw\t// On a date\n\t\tnew ArithmeticException(\"****Unit.div on a date!\");\n\t\tif (((mksa|unit.mksa)&_log) != 0) {\n\t\t\tif ((mksa == underScore) && (factor == 1.)) ;\n\t\t\telse if ((unit.mksa == underScore) && (unit.factor == 1.)) ;\n\t\t\telse throw new ArithmeticException\n\t\t\t(\"****Unit: can't divide logs: \" + symbol + \" x \" + unit.symbol);\n\t\t}\n\t\t/* As soon as there is an operation, the offset is ignored \n\t\t * except if one of the factors is unity.\n\t\t */\n\t\tif ((offset!=0) || (unit.offset!=0)) {\n\t\t\tif (mksa == underScore) offset = unit.offset;\n\t\t\telse if (unit.mksa == underScore) ;\n\t\t\telse offset = 0;\n\t\t}\n\t\tv /= unit.value; \n\t\tr /= unit.factor; \n\t\tu += underScore; u -= unit.mksa;\n\t\tif ((u&0x8c80808080808080L) != 0) throw new ArithmeticException\n\t\t(\"****too large powers in: \" + symbol + \" / \" + unit.symbol);\n\t\tmksa = u;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\t/* Decision for the new symbol */\n\t\tif ((symbol != null) && (unit.symbol != null)) {\n\t\t\tif ((unit.mksa == underScore) && (unit.factor == 1)) return;\t// No unit ...\n\t\t\tif (( mksa == underScore) && ( factor == 1))\n\t\t\t\tsymbol = toExpr(unit.symbol) + \"-1\";\n\t\t\telse if (symbol.equals(unit.symbol)) symbol = edf(factor);\n\t\t\telse symbol = toExpr(symbol) + \"/\" + toExpr(unit.symbol) ;\n\t\t}\n\t}", "public double getValue(){\n return (double) numerator / (double) denominator;\n }", "public abstract double getValue();", "public static void main(String[] args) {\n\n double fraction = 1/2.0;\n System.out.println(fraction);\n\n //Modules is the remainder of a division problem\n //25 % 6 = 1\n //31 % 5 = 1\n //17 % 3 = 2\n //4 % 2 = 0\n //5 % 2 = 1\n //6 % 2 = 0\n //121 % 100 = 21\n // 47 % 15 = 2\n //55 % 15 =10\n\n //5 + 2 * 4 =\n //12 / 2 - 4 =\n //4 + 17 % 2 -1 =\n //4 + 5 * 2 / 2 + 1 =\n //4 * (6 + 3 * 2) + 7 =\n\n System.out.println(5 + 2 * 4);\n System.out.println (12 / 2 -4);\n System.out.println(4 + 17 % 2 - 1);\n System.out.println(4 + 5 * 2 / 2 + 1);\n System.out.println(4 * (6 + 3 *2) + 7);\n\n\n }", "int getLumMod(){\n return getPercentageValue(\"lumMod\");\n }", "double redPercentage();", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\t\t\n\t}", "public void percentualGordura(){\n\n s0 = 4.95 / denscorp;\n s1 = s0 - 4.50;\n percentgord = s1 * 100;\n\n }", "@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n\n double res = Math.log(getEx2().evaluate(assignment)) / Math.log(getEx2().evaluate(assignment));\n return res;\n }", "public static void main(String[] args) {\n\t\tfinal double d = 1 / 2; \n\t\tSystem.out.println(d); \n\t}", "private double term(boolean get){\n\t\t// compute the left argument which has to be a primary value or an expression with a higher priority than products\n\t\tdouble left = pot(get);\n\t\tfor(;;){\n\t\t\tswitch(curr_tok){\n\t\t\t\tcase MUL:{\n\t\t\t\t\tleft*=pot(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase DIV:{\n\t\t\t\t\tdouble d;\n\t\t\t\t\tif((d=pot(true)) != 0){\n\t\t\t\t\t\tleft/=d;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//System.err.println(\"Error::TermParser::term(): Invalid operation. Division by 0.\");\n\t\t\t\t\treturn Double.NaN;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\treturn left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract double calcular();", "@Override\n\tpublic void\n\tscalarDiv( double value )\n\t{\n\t\tdata[0] /= value;\n\t\tdata[1] /= value;\n\t\tdata[2] /= value;\n\t}", "@Override\n public void onChanged(Double aDouble) {\n if (aDouble*1000 < 1) {\n etOutputValue.setText(\"0.0\");\n } else {\n DecimalFormat decimalFormat = new DecimalFormat(\"#,##0.###\");\n etOutputValue.setText(decimalFormat.format(aDouble));\n }\n }", "double getRealValue();", "private Object eval(Term expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"*\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res * (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: Term error\");\n }\n } else if (\"/\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res / (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: Term error\");\n }\n } else if (\"%\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res % (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: Term error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "public double getDoubleValue()\n {\n return (double) getValue() / (double) multiplier;\n }", "public void testORDINARY_DIV1() throws Exception {\n\t\tObject retval = execLexer(\"ORDINARY_DIV\", 10, \"fess\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"ORDINARY_DIV\", expecting, actual);\n\t}", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\n\t}", "@Override\n\t\tpublic void monitorChanged(MonitorEvent arg0) {\n\t\t\tDBR dbr = arg0.getDBR();\n\t\t\tif (dbr.isDOUBLE()) {\n\t\t\t\t// update the latest value\n\t\t\t\tdouble lastValue = latestValue;\n\t\t\t\tlatestValue = ((DBR_Double) dbr).getDoubleValue()[0];\n\n\t\t\t\t// if the percentage change has been great enough, then inform\n\t\t\t\t// IObservers\n\t\t\t\tif (Math.abs((lastValue - latestValue) / lastValue) * 100.0 >= sensitivity) {\n\t\t\t\t\tnotifyIObservers(this, latestValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void buttonPercent(View v){\n expressionView.setText(expressionView.getText() + \"%\");\n calculate();\n }", "public Percent(final Function parameter)\n {\n super(\"%\", parameter);\n }", "private double fillPercent() {\n\t\tdouble percent = 0;\n\t\t\n\t\tfor (LinkedList<WordCode<K, V>> ll : myBuckets) {\n\t\t\tif (ll.size() != 0) percent++;\n\t\t}\n\t\treturn (percent / myBuckets.size()) * 100;\n\t}", "double test(double a){\n System.out.println(\"double a: \"+a);\n return a*a;\n }", "@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}", "public static void main(String[] args) {\n \tdouble num1 = 7.15;\n \tdouble num2 = 10.0;\n\t\t// 创建一个数值格式化对象\n\t\tNumberFormat numberFormat = NumberFormat.getInstance();\n\t\tDecimalFormat decimalFormat = new DecimalFormat(\"#.00\");\n\t\t// 设置精确到小数点后2位\n\t\tnumberFormat.setMaximumFractionDigits(2);\n\t\tString result = numberFormat.format((num1 / num2 * 100));\n\t\tSystem.out.println(\"num1和num2的百分比为:\" + result + \"%\");\n\t\tSystem.out.println(\"num1和num2的百分比为:\" + decimalFormat.format(Double.valueOf(result)) + \"%\");\n\t}", "private void E()\n\t{\t\n\t\tString E = \"\";\t\t\t//Holds double which is approximated to the value of e\n\t\tString fieldText = \"\";\t//Holds the text currently in \"entry\". Used when leftValue is full.\n\t\tdouble e = Math.E;\t\t//Decimal approximation of e.\n\t\tE += e;\t\t\t\t\t//Decimal approximation of e inserted into a String\n\t\t\n\t\tif(Fun == null && calc.getLeftValue ( ) == 0.0)\n\t\t{\n\t\t\tentry.setText (E);\n\t\t\tsetLeftValue();\n\t\t}\n\t\telse if (calc.getLeftValue ( ) != 0.0 && calc.getRightValue ( ) == 0.0)\n\t\t{\n\t\t\tfieldText = entry.getText();\n\t\t\tfieldText += \" \" + E;\n\t\t\tentry.setText(fieldText);\n\t\t\tsetRightValue();\n\t\t}\n\t}", "@Test\n\tvoid divide() {\n\t\tfloat result = calculator.divide(12, 4);\n\t\tassertEquals(3,result);\n\t}", "public void increasePrice(int percentage);", "private static int cprModFunction(int a, int b) {\n\t\tint res = a % b;\n\t\tif (res < 0)\n\t\t\tres += b;\n\t\treturn res;\n\t}", "public abstract double applyDiscount(double p);", "void multiply(double value);", "private double pot(boolean get){ \n\t\t// FIXME: The method is still broken for \"x_y_z\" or \"x^y_z\" ... etc. expressions ! Hence the unusual method description.\n\t\tdouble left = prim(get); \n\t\tfor(;;){\n\t\t\tswitch(curr_tok){\n\t\t\t\tcase EXP:{\n\t\t\t\t\tleft=Math.pow(left, prim(true));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase LOG:{\n\t\t\t\t\tdouble d=prim(true);\n\t\t\t\t\tif(left >= 0){\n\t\t\t\t\t\tleft=Math.log(left)/Math.log(d);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n//\t\t\t\t\tSystem.err.println(\"Error::TermParser::pot(): Invalid operation. Logarithm of a negative number.\");\n\t\t\t\t\treturn Double.NaN;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\treturn left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void getHitPercent(double hitPer) {\r\n\t\thitPercent = hitPer;\r\n\t}" ]
[ "0.6640394", "0.6595065", "0.6308639", "0.6305766", "0.6265934", "0.61904967", "0.61260283", "0.60960484", "0.60844225", "0.60741013", "0.6038899", "0.6034199", "0.60230106", "0.59514344", "0.5926849", "0.591532", "0.59064806", "0.5868366", "0.5863049", "0.58388585", "0.582413", "0.58220816", "0.5786903", "0.5783647", "0.57787836", "0.57746667", "0.57738197", "0.57357186", "0.5724468", "0.57239777", "0.57209855", "0.5714466", "0.5711819", "0.5711819", "0.5711819", "0.5706027", "0.5702402", "0.5699644", "0.56795543", "0.567953", "0.5679231", "0.56730396", "0.5648082", "0.56447625", "0.56324863", "0.56296027", "0.562834", "0.5622925", "0.56176966", "0.56168723", "0.56130856", "0.5612078", "0.56042004", "0.5591677", "0.5580706", "0.557917", "0.55769813", "0.5564862", "0.5564787", "0.5553764", "0.555282", "0.55525", "0.5545988", "0.5538383", "0.5536588", "0.5531709", "0.55315465", "0.55297744", "0.55231345", "0.5515781", "0.55037105", "0.55007017", "0.54981124", "0.54975873", "0.5497535", "0.5495457", "0.5493397", "0.549308", "0.5492266", "0.54784685", "0.546124", "0.5459109", "0.5457859", "0.54322684", "0.54286283", "0.5424906", "0.54107183", "0.5402934", "0.53987044", "0.5398182", "0.539456", "0.5393488", "0.5393105", "0.5392221", "0.5391514", "0.5390091", "0.5381073", "0.53798676", "0.5378591", "0.53737783" ]
0.70983416
0
This function gets executed when the operator '' is used on the double
@Override public InterpreterValue pow(InterpreterValue v) { // If the given value is a IntegerValue create a new DoubleValue from // the power-result if(v instanceof IntegerValue) return new DoubleValue(Math.pow(getValue(), ((IntegerValue) v).getValue())); // If the given value is a DoubleValue create a new DoubleValue from // the power-result if(v instanceof DoubleValue) return new DoubleValue(Math.pow(getValue(), ((DoubleValue) v).getValue())); // In other case just throw an error throw new Error("Operator '**' is not defined for type double and " + v.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print(double someDouble) {\r\n print(someDouble + \"\");\r\n }", "@Override\n public String visit(DoubleLiteralExpr n, Object arg) {\n return null;\n }", "@Override\n\tpublic void visit(DoubleLiteral n) {\n\t\t\n\t}", "public Snippet visit(CoercionToDoubleExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t _ret.returnTemp = \"(\" + \"double\" + \")\" + _ret.returnTemp;\n\t\t\t_ret.expType = new X10Double();\n\t return _ret;\n\t }", "@Override\n public void onChanged(Double aDouble) {\n if (aDouble*1000 < 1) {\n etOutputValue.setText(\"0.0\");\n } else {\n DecimalFormat decimalFormat = new DecimalFormat(\"#,##0.###\");\n etOutputValue.setText(decimalFormat.format(aDouble));\n }\n }", "public abstract double fromBasicUnit(double valueJTextInsert);", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\t\t\t\tdflt=0;\r\n\r\n\t\t\t\toperator='*';\r\n\t\t\t\ttf2.setText(\"X\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "private void E()\n\t{\t\n\t\tString E = \"\";\t\t\t//Holds double which is approximated to the value of e\n\t\tString fieldText = \"\";\t//Holds the text currently in \"entry\". Used when leftValue is full.\n\t\tdouble e = Math.E;\t\t//Decimal approximation of e.\n\t\tE += e;\t\t\t\t\t//Decimal approximation of e inserted into a String\n\t\t\n\t\tif(Fun == null && calc.getLeftValue ( ) == 0.0)\n\t\t{\n\t\t\tentry.setText (E);\n\t\t\tsetLeftValue();\n\t\t}\n\t\telse if (calc.getLeftValue ( ) != 0.0 && calc.getRightValue ( ) == 0.0)\n\t\t{\n\t\t\tfieldText = entry.getText();\n\t\t\tfieldText += \" \" + E;\n\t\t\tentry.setText(fieldText);\n\t\t\tsetRightValue();\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='/';\r\n\t\t\t\ttf2.setText(\"/\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "public Operand(Double value) {\n if (value == null) throw new IllegalArgumentException(\"String with a value can't be empty\");\n this.value = value;\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='-';\r\n\t\t\t\ttf2.setText(\"-\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tansStri=\"\"+ans;\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='+';\r\n\t\t\t\ttf2.setText(\"+\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "private Double check_mathOperator(Double result) {\n \r\n switch(mathOperator){\r\n case '/':\r\n result =totalFirst/totalLast;\r\n break;\r\n case 'x':\r\n result =totalFirst*totalLast;\r\n break;\r\n case '-':\r\n result =totalFirst-totalLast;\r\n break;\r\n case '+':\r\n result =totalFirst+totalLast;\r\n break;\r\n \r\n }\r\n return result;\r\n }", "static String double2String (Double a){\n String s = \"\"+a;\n String[] arr = s.split(\"\\\\.\");\n if (arr[1].length()==1) s+=\"0\";\n return s;\n }", "public boolean isDouble() {\n return false;\n }", "@Override\n\tpublic void visit(DoubleType n) {\n\t\t\n\t}", "public boolean isDouble();", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\t\t\n\t}", "public DoubleField(double value) {\n\t\tthis(\"\" + value, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);\n\t}", "@Override\n public void onClick(View v) {\n if(operator_inserted==true && !curr.substring(curr.length()-1,curr.length()).equals(\" \")){\n\n\n String [] tokens = curr.split(\" \");\n switch(tokens[1].charAt(0)){\n\n case '+':\n res = Double.toString(Double.parseDouble(tokens[0]) + Double.parseDouble(tokens[2]));\n break;\n case '-':\n res = Double.toString(Double.parseDouble(tokens[0]) - Double.parseDouble(tokens[2]));\n break;\n case '/':\n res = Double.toString(Double.parseDouble(tokens[0]) / Double.parseDouble(tokens[2]));\n break;\n case '*':\n res = Double.toString(Double.parseDouble(tokens[0]) * Double.parseDouble(tokens[2]));\n break;\n\n }\n resNum();\n }\n }", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\n\t}", "@Override\n public void afterTextChanged(Editable arg0) {\n if(arg0.length()>0)\n arrTemp[holder.ref] = Double.parseDouble(arg0.toString()); //Bug here : in case we erase entire double value 0.0\n }", "String doubleRead();", "public DoubleField() {\n\t\tthis(\"\", Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);\n\t}", "public double getDouble(String name)\n/* */ {\n/* 1015 */ return getDouble(name, 0.0D);\n/* */ }", "String doubleWrite();", "public abstract void setDoubleImpl(String str, double d, Resolver<Void> resolver);", "private String calculate (double num1, double num2, String operator){\r\n \r\n double value;\r\n switch(operator){\r\n case \"+\":\r\n value = num1 + num2;\r\n break;\r\n case \"-\":\r\n value = num1 - num2;\r\n break;\r\n case \"*\":\r\n value = num1 * num2;\r\n break;\r\n case \"/\":\r\n value = num1/num2;\r\n break;\r\n default:\r\n throw new IllegalArgumentException();\r\n \r\n }\r\n String result = value + \"\";\r\n return result;\r\n }", "public T caseExpression_Double(Expression_Double object)\r\n {\r\n return null;\r\n }", "private void berechneNeuenWert () {\r\n try {\r\n double ergebnis = 0d;\r\n for (JTextComponent wert : this.wertOperator.keySet()) {\r\n if (this.ignoriereWhitespaceEingabefelder && wert.getText().trim().length() == 0) {\r\n continue;\r\n }\r\n final char operator = this.wertOperator.get(wert);\r\n final double operand = Double.parseDouble(wert.getDocument().getText(0, wert.getDocument().getLength()).trim());\r\n switch (operator) {\r\n case '*':\r\n ergebnis *= operand;\r\n break;\r\n case '/':\r\n ergebnis /= operand;\r\n break;\r\n case '-':\r\n ergebnis -= operand;\r\n break;\r\n case '+':\r\n ergebnis += operand;\r\n break;\r\n case '=':\r\n ergebnis = operand;\r\n break;\r\n }\r\n }\r\n String text = Double.toString(ergebnis);\r\n if (this.anzahlDerNachkommastellen <= 0 && text.indexOf('.') != -1) {\r\n text = text.substring(0,text.indexOf('.'));\r\n }\r\n else {\r\n // Kommastellen hinzufügen\r\n if (text.indexOf('.') == -1) {\r\n text += '.';\r\n }\r\n // ggf. mit Nullen hinten auffüllen\r\n while (text.indexOf('.') + anzahlDerNachkommastellen > text.length() -1) {\r\n text += '0';\r\n }\r\n // Abschneiden zuviel vorhandener Stellen\r\n if (text.length() - 1 > text.indexOf('.') +anzahlDerNachkommastellen) {\r\n text = text.substring(0,text.indexOf('.')+anzahlDerNachkommastellen+1);\r\n }\r\n }\r\n this.setText(text);\r\n }\r\n catch (final Exception berechnungsProblem) {\r\n this.setText(this.zeigeFehlerAn ? \"#WERT!\" : \"\");\r\n }\r\n }", "public double getDouble();", "private void outputBasedOnText(Editable s) {\n String stringValue = s.toString();\n if (stringValue.length() > 1 && stringValue.substring(stringValue.length() - 1).equals(\".\")) { // If the last char in string is \".\"\n convertInput(Double.parseDouble(stringValue.substring(0, stringValue.length() - 1)));\n } else if (!stringValue.matches(\"[-+]?\\\\d*\\\\.?\\\\d+\")) { // Check if stringValue is numeric\n convertInput(0);\n } else {\n convertInput(Double.parseDouble(stringValue));\n }\n }", "public void printer(double x);", "private double convertDouble()\n\t{\n\t\tString val = tokens[10];\n\t\tdouble value = 0.0;\n\t\ttry {\n\t\t\tvalue = Double.parseDouble(tokens[10]);\n\t\t}\n\t\tcatch(NumberFormatException e) {\n\t\t\tSystem.err.print(\"\");\n\t\t}\n\t\treturn value;\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n int t=0;\n String s=e.getActionCommand();\n if(s.equals(\"+\")||s.equals(\"-\")||s.equals(\"*\")||s.equals(\"/\")) {\n input+=\" \"+s+\" \"; //如果碰到运算符,就在运算符前后分别加一个空格,\n //为后面的分解字符串做准备\n\n }else if(s.equals(\"清零\")) {\n input=\"\";\n }else if(s.equals(\"退格\")) {\n if((input.charAt(input.length()-1))==' ') { //检测字符串的最后一个字符是否为空格,\n input=input.substring(0,input.length()-3);//如果是则删除末尾3个字符,否则删除\n //1个字符\n }else {\n input=input.substring(0,input.length()-1);\n }\n }\n else if(s.equals(\"=\")) {\n input=compute(input);\n jt.setText(input);\n input=\"\";\n t=1;\n }\n else\n input += s;\n if(t==0) {\n jt.setText(input);\n }\n }", "double getDoubleValue2();", "protected abstract double operation(double val);", "String getFloat_lit();", "private Object eval(SimpleExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"+\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res + (Double) res2;\n } else if (res instanceof Double && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof Boolean && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Double) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Boolean) {\n res = \"\" + res + res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else if (\"-\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res - (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "public Operand(String value) {\n if (value == null) throw new IllegalArgumentException(\"String with a value can't be empty\");\n this.value = Double.parseDouble(value);\n }", "public static void singleValue(String name, double value) {\n singleValue(name,value,null);\n }", "Double getDoubleValue();", "private static Double stod(String string) {\n\t\tDouble result = 2.0; // should handle this error: \"cannnot convert string to Double\"\n\t\tif (string == null || string.equals(\"\") || string.equals(\"null\") || string.equals(\"I\")) {\n\t\t\tresult = 0.0;\n\t\t} else if (string.equals(\"E\")) {\n\t\t\tresult = 1.0;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tresult = Double.parseDouble(string);\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "boolean hasDouble();", "@Override\n\tpublic void calcul() {\n\t\tif(this.operateur.equals(\"\"))\n\t\t\tthis.result = Double.parseDouble(this.operande);\n\t\telse {\n\t\t\tif(!this.operande.equals(\"\")) {\n\t\t\t\tif(this.operateur.equals(\"+\")) {\n\t\t\t\t\tthis.result += Double.parseDouble(this.operande);\n\t\t\t\t}\n\t\t\t\tif(this.operande.equals(\"-\")) {\n\t\t\t\t\tthis.result -= Double.parseDouble(this.operande);\n\t\t\t\t}\n\t\t\t\tif(this.operateur.equals(\"*\"))\n\t\t\t\t\tthis.result *= Double.parseDouble(this.operande); \n\t\t\t\tif(this.operateur.equals(\"/\")){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tthis.result /= Double.parseDouble(this.operande);\n\t\t\t\t\t}catch(ArithmeticException e){\n\t\t\t\t\t\tthis.result = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.operande = \"\";\n\t\tnotifyObserver(String.valueOf(this.result));\n\t}", "double getDoubleValue1();", "public double evaluateAsDouble();", "public abstract void getDoubleImpl(String str, double d, Resolver<Double> resolver);", "public String fullCellText() {\n\t\tString value = getDoubleValue() + \"\";\n\t\t\tif(getValue().equals(\"0\")) {\t// it equals to 0, we can just return \n\t\t\t\treturn getValue();\n\t\t\t}\n\t\t\telse if (!value.contains(\"%\") && value.contains(\".0\") \t//check if value contains no percent sign or \".0\"\n\t\t\t\t\t&& isDecimalEqualToZero(value)\t\t\t\t\t//make sure it is a whole number\n\t\t\t\t\t&& value.replace(\"-\", \"\").length() > 3) {\t\n\t\t\t\treturn value.substring(0, value.indexOf(\".\"));\n\t\t\t}\n\t\t\telse if (!value.contains(\"%\") && !value.contains(\".\")) {\t//if value contains percent sign and no contain dot\n\t\t\t\tvalue += \".0\";\t\t\t\t\t\t\t\t\t\t\t//just add \".0\" at the end\n\t\t\t}\n\t\treturn value;\n\t}", "private String literal(Number num) {\n int i = num.intValue();\n double d = num.doubleValue();\n \n if (i == d) {\n return String.valueOf(i);\n } else {\n // TODO: proper number formatting should be used\n return num.toString();\n }\n }", "public static double leerDouble() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "default T handleNumber(double val) {\n throw new UnsupportedOperationException();\n }", "public double evaluate(String exp) throws NumberFormatException, ArithmeticException {\r\n isConstant=true;\r\n return _evaluate(exp);\r\n }", "public BasicDouble(double value) {\r\n\t\tsuper.value = this.value = value;\r\n\t}", "public double doubleValue();", "protected abstract double doubleOp(double d1, double d2);", "private void m2248a(double d, String str) {\n this.f2954c = d;\n this.f2955d = (long) d;\n this.f2953b = str;\n this.f2952a = ValueType.doubleValue;\n }", "public MutableDouble() {\n\t\tsuper();\n mDouble = 0;\n\t}", "public abstract double read_double();", "public DataPrimitive(double value) {\n\t\tsuper();\n\t\tthis.value = Double.toString(value);\n\t}", "public double utility();", "public static double toDouble(java.lang.Object o)\n {\n if(o == null)\n {\n return 0;\n }\n else if(o.toString().equals(\"\"))\n {\n return 0;\n }\n else\n {\n return Double.parseDouble(o.toString());\n }\n }", "private double formatDouble(double number){\r\n return Double.parseDouble(String.format(\"%.2f\", number));\r\n }", "private double getDoubleValue(Element element, String tagName)\n {\n try\n {\n return Double.parseDouble(getValue(element,tagName));\n }\n catch (NumberFormatException exception)\n {\n return 0.0;\n }\n }", "private static String toPsString(double d) {\n return \"(\" + d + \")\";\n }", "private boolean isValidDouble(String text) {\r\n \ttry {\r\n \t\tDouble value = Double.valueOf(text);\r\n \t} catch (NumberFormatException e) {\r\n \t\treturn false;\r\n \t}\r\n \treturn true;\r\n }", "public double toDouble() {\n/* */ try {\n/* 813 */ return Double.valueOf(this.m_str).doubleValue();\n/* */ }\n/* 815 */ catch (NumberFormatException nfe) {\n/* */ \n/* 817 */ return Double.NaN;\n/* */ } \n/* */ }", "private void operation(char operator){\n if(initialised == false){\n calc.setNum1(Double.parseDouble(txtBox.getText()));\n operatorPressed = true;\n } else { \n calc.setNum2(Double.parseDouble(txtBox.getText()));\n Decimal();\n calc.setNum1(calc.getAnswer());\n txtBox.setText(Double.toString(calc.getAnswer()));\n }\n \n calc.setOperator(operator);\n\n operatorPressed = true;\n initialised = true;\n \n }", "public\n double getProperty_double(String key)\n {\n if (key == null)\n return 0.0;\n\n String val = getProperty(key);\n\n if (val == null)\n return 0.0;\n\n double ret_double = 0.0;\n try\n {\n Double workdouble = new Double(val);\n ret_double = workdouble.doubleValue();\n }\n catch(NumberFormatException e)\n {\n ret_double = 0.0;\n }\n\n return ret_double;\n }", "protected void operation(String operator){\n if (this.tail<2){\n this.arr[tail++] = this.value;\n this.arr[tail++] = operator;\n } else{\n if (this.peek() != \")\"){\n this.arr[this.tail++] = this.value;\n }\n this.arr[this.tail++] = operator;\n }\n this.value=\"\"; // reset tracking variables\n this.decimalUsed = false;\n }", "double getEDouble();", "double getDoubleValue3();", "private double getDoubleAttribute(Element element, String attributeName)\n {\n try\n {\n return Double.parseDouble(getAttribute(element,attributeName));\n }\n catch (NumberFormatException exception)\n {\n return 0.0;\n }\n }", "private Double parseNumber(String num) {\r\n\t\tDouble tempnum = (double) 0;\r\n\t\tint opos; //operator position\r\n\t\tif ((num == null) || (num.length() < 1) ) {\r\n\t\t\treturn tempnum;\r\n\t\t}\r\n\r\n\t\t//replace constants with their value\r\n\t\twhile (num.indexOf(\"P\") >= 0) { //PI constant\r\n\t\t\tString[] numparts = StringUtil.splitData(num, 'P', 2);\r\n\t\t\tnum = numparts[0]+String.valueOf(Math.PI)+numparts[1];\r\n\t\t}\r\n\t\twhile (num.indexOf(\"X\") >= 0) { //e constant\r\n\t\t\tString[] numparts = StringUtil.splitData(num, 'X', 2);\r\n\t\t\tnum = numparts[0]+String.valueOf(Math.E)+numparts[1];\r\n\t\t}\r\n\r\n\t\tif (num.indexOf(\"^\") >= 0) { //allows to specify powers (e.g.: 2^10)\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '^', 2);\r\n\t\t\ttempnum = Math.pow(parseNumber(numparts[0]), parseNumber(numparts[1]));\r\n\t\t}\r\n\t\telse if ( ((opos = num.indexOf(\"-\")) > 0) && (num.charAt(opos-1) != 'E') && (num.charAt(opos-1) != '^')) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '-', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) - parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if ( ((opos = num.indexOf(\"+\")) > 0) && (num.charAt(opos-1) != 'E') && (num.charAt(opos-1) != '^')) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '+', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) + parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if (num.indexOf(\"/\") >= 0) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '/', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) / parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if (num.indexOf(\"*\") >= 0) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '*', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) * parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttempnum = Double.valueOf(num);\r\n\t\t}\r\n\r\n\t\treturn tempnum;\r\n\t}", "private String normalizeDouble(Double value) {\n\n String valueSign = (value < 0) ? \"-\" : \"0\";\n String expSign = \"0\";\n Integer finalExp = 0;\n\n DecimalFormat df = new DecimalFormat(DECIMAL_FORMAT);\n String[] splits = df.format(value).split(\"E\");\n\n // if there's an exponent, complement it\n if(splits.length > 1) {\n\n String exponent = splits[1];\n\n if(exponent.startsWith(\"-\")) {\n\n expSign = \"-\";\n exponent = exponent.replace(\"-\", \"\");\n finalExp = 999 - Integer.parseInt(exponent);\n }\n\n else {\n finalExp = Integer.parseInt(exponent);\n }\n }\n\n return String.format(\"%s%s%03d %s\", valueSign, expSign, finalExp, splits[0]);\n }", "private double _evaluate(String exp) throws NumberFormatException, ArithmeticException {\r\n return _evaluate(exp,0,(exp.length()-1));\r\n }", "public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition ignore)\n/* */ {\n/* 1101 */ toAppendTo.append(format(number, this.defaultRuleSet));\n/* 1102 */ return toAppendTo;\n/* */ }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( input_symbol == '+' || input_symbol == '-' || input_symbol == '*' || input_symbol == '/'){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// get result(String)\n\t\t\t\t\t\t\t\tget_result = txt_showresult.getText();\n\t\t\t\t\t\t\t\tresult = Double.parseDouble(get_result);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcalculate_equal();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "Double getValue();", "void writeDouble(double value);", "public MyDouble() {\n this.setValue(0);\n }", "private String modifyValue(String value) {\n double d = Double.parseDouble(value);\n int v = round(d);\n return String.valueOf(v);\n }", "@Test\n public void testEditDistEmptyOtherString() throws Exception{\n assertEquals(4, Esercizio2.edit_distance_dyn(s3, s1));\n }", "double defendre();", "public String toString() {\n\t\treturn String.valueOf(mDouble);\n\t}", "public static String DoubleToString(double DoubleValue){\n Double doublee = new Double(DoubleValue);\n return doublee.toString(); \n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString str = e.getActionCommand();\n\t\tString ans = resultField.getText();\n\t\tString ans2 = resultField2.getText();\n\t\tdouble result;\n\t\t\n\t\tif(str ==\"0\" || str ==\"1\" || str == \"2\"|| str== \"3\" ||\n\t\t\t\tstr == \"4\"|| str == \"5\" || str == \"6\" || str == \"7\"|| str == \"8\" || str == \"9\" || str ==\".\"){\n\t\t resultField.setText(ans + str);\n\t\t resultField2.setText(ans2 + str);\n\t\t}\n\t\tif(str == \"+\" || str == \"-\" || str == \"*\" || str == \"/\")\n\t\t{\n\t\t\toper = ans;\n\t\t\top = str;\n\t\t\tresultField.setText(\"\");\n\t\t\tresultField2.setText(ans2 + str);\n\t\t}\n\t\tif(str == \"x^2\"){\n\t\t\tresultField.setText(\"\"+Double.parseDouble(ans)*Double.parseDouble(ans));\n\t\t\tresultField2.setText(ans2 + \"^2\");\n\t\t}\n\t\tif(str == \"sqrt\")\n\t\t{\n\t\t\tresultField.setText(\"\"+Math.sqrt(Double.parseDouble(ans)));\n\t\t\tresultField2.setText(ans2 + \"^1/2\");\n\t\t}\n\t\tif(str == \"1/X\")\n\t\t{\n\t\t\tresultField.setText(\"\"+1/(Double.parseDouble(ans)));\n\t\t\tresultField2.setText(\"1/(\" + ans2 + \")\");\n\t\t}\n\t\tif(str==\"+/-\")\n\t\t{\n\t\t\tresultField.setText(\"\"+-1*(Double.parseDouble(ans)));\n\t\t\tresultField.setText(\"-1*(\"+ans2+\")\");\n\t\t}\n\n\t\tif(str==\"=\")\n\t\t{\n\t\t\tchar c=op.charAt(0);\n\t\t\tswitch(c)\n\t\t\t{\n\t\t\tcase '+':\n\t\t\t\tresult=Double.parseDouble(oper) + Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '-':\n\t\t\t\tresult=Double.parseDouble(oper) - Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '*':\n\t\t\t\tresult=Double.parseDouble(oper) * Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '/':\n\t\t\t\tresult=Double.parseDouble(oper) / Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(str == \"C\")\n\t\t{\n\t\t\tresultField.setText(\"\");\n\t\t\tresultField2.setText(\"\");\n\t\t}\n\t\t\n\t\tif(str == \"Backspace\")\n\t\t{\n\t\t\tString temp=resultField.getText();\n\t\t\ttemp=temp.substring(0,temp.length()-1);\n\t\t\tresultField.setText(temp);\n\t\t\tString temp2=resultField2.getText();\n\t\t\ttemp2 = temp2.substring(0,temp2.length()-1);\n\t\t\tresultField2.setText(temp2);\n\t\t\t\n\t\t}\n\n\t}", "public String format(double number);", "private DoubleField(String str, double low, double high) {\n\t\tparser = NumberFormat.getNumberInstance(Locale.US);\n\t\tsetBackground(Color.WHITE);\n\t\tsetHorizontalAlignment(RIGHT);\n\t\tminValue = low;\n\t\tmaxValue = high;\n\t\tsetText(str);\n\t\texceptionOnError = false;\n\t}", "@Test\n\tpublic void test_TCM__double_getDoubleValue() {\n\t\tAttribute attr = new Attribute(\"test\", \"11111111111111\");\n\t\ttry {\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 11111111111111d );\n\n\t\t\tattr.setValue(\"0\");\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 0 );\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MAX_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MAX_VALUE);\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MIN_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MIN_VALUE);\n\n\t\t} catch (DataConversionException e) {\n\t\t\tfail(\"couldn't convert boolean value\");\n\t\t}\n\n\t\ttry {\n\t\t\tattr.setValue(\"foo\");\n\t\t\tfail(\"incorrectly returned double from non double value\" + attr.getDoubleValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t}", "void setDouble(String key, double val);", "T print(double data) throws PrintingException;", "private double getDoubleAttribute(Element element, String tagName, String attributeName)\n {\n try\n {\n return Double.parseDouble(getAttribute(element,tagName,attributeName));\n }\n catch (NumberFormatException exception)\n {\n return 0.0;\n }\n }", "public Mult(double left, String right) {\n super(left, right);\n }", "@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }", "@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }", "public static void setTextFieldDouble(TextField txt) {\n\t\ttxt.textProperty().addListener((obs, oldValue, newValue)->{\n\t\t\tif(newValue!=null && !newValue.matches(\"\\\\d*([\\\\.]\\\\d*)?\")) {\n\t\t\t\ttxt.setText(oldValue);\n\t\t\t}\n\t\t});\n\t}", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default double asDouble() {\n \n return notSupportedCast(BasicTypeID.DOUBLE);\n }", "Rule DoubleConstant() {\n // Push 1 DoubleConstNode onto the value stack\n return Sequence(\n Sequence(\n Optional(NumericSign()),\n ZeroOrMore(Digit()),\n Sequence('.', OneOrMore(Digit())),\n MaybeScientific()),\n actions.pushDoubleConstNode());\n }", "public Double getDoubleAttribute();", "private boolean checkDouble(String str) {\n\t\tint i = 0, flag = 0;\n\t\tchar ch;\n\n\t\tif (str.length() == 0)\n\t\t\treturn false;\n\n\t\twhile (i < str.length()) {\n\t\t\tch = str.charAt(i);\n\n\t\t\tif (ch == '-' && flag == 0) {\n\t\t\t\tflag = 1;\n\t\t\t} else if (ch >= '0' && ch <= '9' && (flag <= 2)) {\n\t\t\t\tflag = 2;\n\t\t\t} else if (ch == '.' && (flag < 3)) {\n\t\t\t\tflag = 3;\n\t\t\t} else if (ch >= '0' && ch <= '9' && (flag == 3 || flag == 4)) {\n\t\t\t\tflag = 4;\n\t\t\t} else if (whiteSpace(ch) && (flag == 2 || flag == 4)) {\n\t\t\t\tflag = 5;\n\t\t\t} else if (!(whiteSpace(ch) && flag == 0)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti++;\n\t\t}\n\t\tif (flag < 2)\n\t\t\treturn false;\n\t\treturn true;\n\t}" ]
[ "0.70123696", "0.6660561", "0.65625787", "0.6301871", "0.62956583", "0.6237324", "0.6236484", "0.62202495", "0.621516", "0.61662555", "0.61385983", "0.6119884", "0.61124307", "0.6072498", "0.60679805", "0.6036646", "0.60345083", "0.6017957", "0.5984319", "0.597892", "0.59633887", "0.5963067", "0.58512163", "0.58493423", "0.58449143", "0.58437395", "0.5830221", "0.5822008", "0.5816132", "0.58015114", "0.57848865", "0.5783915", "0.5775156", "0.5772772", "0.5772146", "0.5760404", "0.5745993", "0.5732929", "0.57272357", "0.57248384", "0.5724681", "0.5713576", "0.56954545", "0.56867033", "0.5684717", "0.56813127", "0.5660352", "0.5647506", "0.5646631", "0.56398356", "0.5628924", "0.55945253", "0.5589708", "0.558554", "0.558509", "0.55830544", "0.55828166", "0.5579433", "0.5569765", "0.556205", "0.5556906", "0.5550049", "0.55448896", "0.5543275", "0.55334795", "0.5528008", "0.5523449", "0.55227846", "0.5518239", "0.551727", "0.5498757", "0.5483119", "0.5479077", "0.5464501", "0.5458114", "0.5458029", "0.5450588", "0.54450655", "0.54378784", "0.543147", "0.5423492", "0.54192543", "0.5413028", "0.5402005", "0.540052", "0.54004914", "0.5398288", "0.539522", "0.5394115", "0.5391896", "0.53810686", "0.5380265", "0.5373149", "0.5369143", "0.5369088", "0.5369088", "0.53594166", "0.53591406", "0.5356556", "0.5355308", "0.5348701" ]
0.0
-1
implementations for extended InterpreterValue >> comparison This function gets executed when the operator '==' is used on the double
@Override public BooleanValue equals(InterpreterValue v) { // If the given value is a IntegerValue then check if the value is equal // to the own value and return a BooleanValue if(v instanceof IntegerValue) return BooleanValue.from(getValue() == ((IntegerValue) v).getValue()); // If the given value is a DoubleValue then check if the value is equal // to the own value and return a BooleanValue if(v instanceof DoubleValue) return BooleanValue.from(getValue() == ((DoubleValue) v).getValue()); // In other case just throw an error throw new Error("Operator '==' is not defined for type integer and " + v.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDouble();", "public void equal() {\n if (operatorAssigned != Operator.NON || operatorType != Operator.NON) {\n double subResult;\n if (numberStored[1] != 0) {\n subResult = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), operatorType);\n numberStored[0] = basicCalculation(numberStored[0], subResult, operatorAssigned);\n numberStored[1] = 0;\n mainLabel.setText(Double.toString(numberStored[0]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n }\n operatorAssigned = Operator.NON;\n operatorType = Operator.NON;\n }", "@Override\n public Boolean getValue(Number number, Number number2) {\n if(number==number2){\n return true;\n }\n else {\n return false;\n }\n\n }", "@Override\n\tpublic Object visit(ASTEquality node, Object data)\n\t{\n\t\treturn visitOperatorNode(node, data);\n\t}", "private Object eval(RelExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n if (expr.getExpr().size() == 2) {\n Object res2 = eval(expr.getExpr().get(1));\n String opt = expr.getOpt();\n\n if (\"==\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = ((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = ((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = ((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"!=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = !((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = !((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = !((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res < (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res <= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res > (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res >= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "public boolean a(double paramDouble)\r\n/* 28: */ {\r\n/* 29: 44 */ double d1 = aQ().a() * 4.0D;\r\n/* 30: 45 */ d1 *= 64.0D;\r\n/* 31: 46 */ return paramDouble < d1 * d1;\r\n/* 32: */ }", "public abstract boolean containsInstance(double value);", "Quantity getComparisonValue();", "boolean hasDouble();", "public abstract double getValue();", "@Override\r\n\tpublic int compareTo(Double another) {\n\t\treturn 0;\r\n\t}", "Double getValue();", "public double evaluateAsDouble();", "private Double check_mathOperator(Double result) {\n \r\n switch(mathOperator){\r\n case '/':\r\n result =totalFirst/totalLast;\r\n break;\r\n case 'x':\r\n result =totalFirst*totalLast;\r\n break;\r\n case '-':\r\n result =totalFirst-totalLast;\r\n break;\r\n case '+':\r\n result =totalFirst+totalLast;\r\n break;\r\n \r\n }\r\n return result;\r\n }", "public abstract double evaluate(double value);", "@Override\n\tdouble evaluate() {\n\t\treturn Math.abs(operand.getVal());\n\t}", "@Override\n\tpublic void visit(EqualityNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam fiul stang si fiul drept\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tString s2 = null;\n\t\tString s1 = null;\n\t\t/**\n\t\t * preluam rezultatele evaluarii celor doi fii\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\ts1 = Evaluator.variables.get(node.getChild(0).getName());\n\t\t} else {\n\t\t\ts1 = node.getChild(0).getName();\n\t\t}\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ts2 = Evaluator.variables.get(node.getChild(1).getName());\n\t\t} else {\n\t\t\ts2 = node.getChild(1).getName();\n\t\t}\n\n\t\t/**\n\t\t * verificam daca cei doi fii s- au evaluat la aceeasi expresie\n\t\t */\n\t\tif (s1.contentEquals(s2)) {\n\t\t\tnode.setName(\"true\");\n\t\t} else {\n\t\t\tnode.setName(\"false\");\n\t\t}\n\n\t}", "@Override\n public InterpreterValue smaller_equals(InterpreterValue v) {\n\n // If the given value is a IntegerValue then check if the value is smaller than\n // or equal to the own value and return a BooleanValue\n if(v instanceof IntegerValue) return BooleanValue.from(getValue() <= ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue then check if the value is smaller than\n // or equal to the own value and return a BooleanValue\n if(v instanceof DoubleValue) return BooleanValue.from(getValue() <= ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '<=' is not defined for type integer and \" + v.getName());\n\n }", "private boolean compare(ValueType first, ValueType second) {\r\n // TODO\r\n return false;\r\n }", "public Object visitEqualityExpression(GNode n) {\n Object a, b, result;\n String op;\n boolean mydostring = dostring;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if (op.equals(\"==\")) {\n result = ((Long) a).equals((Long) b);\n }\n else if (op.equals(\"!=\")) {\n result = ! ((Long) a).equals((Long) b);\n }\n else {\n result = \"\";\n }\n }\n else {\n String sa, sb;\n \n if (a instanceof String) {\n sa = (String) a;\n }\n else if (a instanceof Long) {\n sa = ((Long) a).toString();\n }\n else {\n return null;\n }\n \n if (b instanceof String) {\n sb = (String) b;\n }\n else if (b instanceof Long) {\n sb = ((Long) b).toString();\n }\n else {\n return null;\n }\n \n if (op.equals(\"==\") && sa.equals(sb)) {\n result = mydostring ? \"1\" : B.one();\n }\n else {\n result = parens(sa) + \" \" + op + \" \" + parens(sb);\n }\n }\n \n return result;\n }", "@Override\n public boolean raweq(LuaValue val) {\n return val.raweq(v);\n }", "public boolean isDouble() {\n return this.data instanceof Double;\n }", "@Override\n public Class getValueType() {\n return Double.class;\n }", "@Override\n public InterpreterValue mod(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the modulo-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() % ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the modulo-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() % ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '%' is not defined for type double and \" + v.getName());\n\n }", "@Override\r\n public int compare(Pair<Integer, Double> o1, Pair<Integer, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }", "double getValue();", "double getValue();", "double getValue();", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\t\t\n\t}", "@Override\n public InterpreterValue bigger_equals(InterpreterValue v) {\n\n // If the given value is a IntegerValue then check if the value is bigger than\n // or equal to the own value and return a BooleanValue\n if(v instanceof IntegerValue) return BooleanValue.from(getValue() >= ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue then check if the value is bigger than\n // or equal to the own value and return a BooleanValue\n if(v instanceof DoubleValue) return BooleanValue.from(getValue() >= ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '>=' is not defined for type integer and \" + v.getName());\n\n }", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1,\n\t\t\t\t\tEntry<Integer, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "@Override\r\n\t\t\tpublic int compare(SimpleEntry<Integer, Double> arg0, SimpleEntry<Integer, Double> arg1)\r\n\t\t\t{\r\n\t\t\t\treturn arg1.getValue().compareTo(arg0.getValue());\r\n\t\t\t}", "private Expr comparison() {\n Expr expr = addition();\n\n while(match(GREATER, GREATER_EQUAL, LESS, LESS_EQUAL)) { // These variable length arguments are real convenient\n Token operator = previous();\n Expr right = addition();\n expr = new Expr.Binary(expr, operator, right);\n }\n\n return expr;\n }", "protected abstract double operation(double val);", "double getBasedOnValue();", "public boolean isDouble() {\n return false;\n }", "public abstract Double getDataValue();", "@Test\n public void defaultOperatorsEvaluteTrueTest() throws Exception {\n\n assertThat(getNode(\"1 == 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 != 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <> 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 < 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"2 > 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 >= 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"2 >= 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <= 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <= 1\", \"expr\").render(null), is((Object)true));\n\n // negative numbers\n assertThat(getNode(\"1 > -1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"-1 < 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1.0 > -1.0\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"-1.0 < 1.0\", \"expr\").render(null), is((Object)true));\n }", "public static boolean compareNumerics(Parser parser, ResultValue resOp1, ResultValue resOp2, String operator)\r\n {\r\n \tdouble val1 = Numeric.getDoubleValue(resOp1.value);\r\n \tdouble val2 = Numeric.getDoubleValue(resOp2.value);\r\n \t\r\n \t\r\n \t\r\n \tswitch(operator)\r\n \t{\r\n \t\tcase \">=\" :\r\n \t\t\tif(val1 >= val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse \r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \">\" :\r\n \t\t\tif(val1 > val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \"<=\" :\r\n \t\t\tif(val1 <= val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \"<\" :\r\n \t\t\tif(val1 < val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \"!=\" :\r\n \t\t\tif(val1 != val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \"==\" :\r\n \t\t\tif(val1 == val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tdefault :\r\n \t\t\tSystem.out.println(\"Error in compare Numerics, \" + operator + \" is not valid\");\r\n \t\t\treturn false;\r\n \t\t\r\n \t\t\t\r\n \t\t\r\n \t}\r\n }", "double getDoubleValue2();", "@Override\r\n\t\tpublic int compare(Double arg0, Double arg1) {\n\t\t\treturn arg0.compareTo(arg1);\r\n\t\t}", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\n\t}", "@Override\n public InterpreterValue sub(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the subtraction-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() - ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the subtraction-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() - ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '-' is not defined for type double and \" + v.getName());\n\n }", "public boolean matches(Double value) {\n\tif(this.key2==0&&this.key1<=value)return true;\n\t if(this.key1<=value&&this.key2>value)return true;\n\t return false;\n}", "@Override\n protected boolean runInEQ() {\n return true;\n }", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1, Entry<String, Double> o2) {\n\t\t\t\treturn o1.getValue().compareTo(o2.getValue());\n\t\t\t}", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "@Override\n\tpublic Object visit(ASTFilterEq node, Object data) {\n\t\tSystem.out.print(node.jjtGetChild(0).jjtAccept(this, data));\n\t\tSystem.out.print(\" eq \");\n\t\tSystem.out.print(node.jjtGetChild(1).jjtAccept(this, data));\n\t\treturn null;\n\t}", "@Override\n public Double value(TypeOfValue value);", "public double getValue();", "Double getDoubleValue();", "@Override\r\n\t\tpublic int compare(Double o1, Double o2) {\n\t\t\treturn o2.compareTo(o1);\r\n\t\t}", "public boolean lessOrEqualThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) <= 0;\n }", "private Comparison compareValues(SimpleNode first, SimpleNode second) {\n return Objects.equals(first.jjtGetValue(), second.jjtGetValue()) ? Comparison.IS_EQUAL\n : Comparison.notEqual(\"Node values differ: \" + first.jjtGetValue() + \" vs \" + second.jjtGetValue());\n }", "@Override\n\tpublic void visit(DoubleType n) {\n\t\t\n\t}", "@Override\n\t\t\tpublic int compare(Point arg0, Point arg1) {\n\t\t\t return Double.compare(arg0.getX(), arg1.getX());\n\t\t\t}", "@VTID(14)\r\n double getValue();", "public Double\n getDoubleValue() \n {\n return ((Double) getValue());\n }", "double getDoubleValue1();", "public Comparison compare(double left, double right) {\n return checkResult(Double.compare(left, right));\n }", "public boolean isOperator(){\n return true;\n }", "@Test\n\tpublic void test_TCM__double_getDoubleValue() {\n\t\tAttribute attr = new Attribute(\"test\", \"11111111111111\");\n\t\ttry {\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 11111111111111d );\n\n\t\t\tattr.setValue(\"0\");\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 0 );\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MAX_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MAX_VALUE);\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MIN_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MIN_VALUE);\n\n\t\t} catch (DataConversionException e) {\n\t\t\tfail(\"couldn't convert boolean value\");\n\t\t}\n\n\t\ttry {\n\t\t\tattr.setValue(\"foo\");\n\t\t\tfail(\"incorrectly returned double from non double value\" + attr.getDoubleValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t}", "@Override\r\n\t\t\tpublic boolean accept(double t) {\n\t\t\t\treturn t>0.5;\r\n\t\t\t}", "public static void main(String [] args){\n double a= 5+(4*5)/5;\n double b= (6*4%2)+15;\n System.out.println(\"a = \"+a);\n System.out.println(\"b = \"+b); \n \n //Ejemplo de operadores relacionales.\n boolean resultado1= a > b;\n boolean resultado2= a !=b; \n System.out.println(\"R1= \"+resultado1);\n System.out.println(\"R2= \"+resultado2); \n }", "public static Object isNaN(Context cx, Scriptable thisObj,\n Object[] args, Function funObj)\n {\n if (args.length < 1)\n return Boolean.TRUE;\n double d = ScriptRuntime.toNumber(args[0]);\n return (d != d) ? Boolean.TRUE : Boolean.FALSE;\n }", "public boolean greaterOrEqualThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) >= 0;\n }", "@Override\n public int compare(Pair<Channel, Double> lhs, Pair<Channel, Double> rhs) {\n return rhs.second.compareTo(lhs.second);\n }", "public Snippet visit(CoercionToDoubleExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t _ret.returnTemp = \"(\" + \"double\" + \")\" + _ret.returnTemp;\n\t\t\t_ret.expType = new X10Double();\n\t return _ret;\n\t }", "protected abstract double doubleOp(double d1, double d2);", "@Override\n public double getValue()\n {\n return value;\n }", "public static void main(String[] args) {\n int a =0;\n System.out.println((a!=0)?\"true\":\"false\");\n Double d = null;\n System.out.println((d instanceof Double)?true:false);\n\n\n }", "@Override\n public InterpreterValue add(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the addition-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() + ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the addition-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() + ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '+' is not defined for type double and \" + v.getName());\n\n }", "public ResultDouble(double value) {\r\n\t\tthis.value = value;\r\n\t}", "public boolean lessThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) == -1;\n }", "public double getDoubleValue()\n {\n return (double) getValue() / (double) multiplier;\n }", "@Override\n\tpublic double evaluate() {\n\t\treturn (TurtleSnapshot.getTurtleSnapshot().showing) ? 1:0;\n\t}", "boolean updateValue() {\n boolean ret;\n\n if (Math.abs(curUtilityValue - nextUtilityValue) < Math.abs(curUtilityValue) * MAX_ERR_PERCENT / 100)\n ret = true;\n else {\n ret = false;\n // System.out.println(\" no match cell: x: \"+x+\" y: \"+y);\n }\n curUtilityValue = nextUtilityValue;\n return ret;\n\n }", "bool eval(Map<string,object> obj)\n {\n if(!obj.contains(property)) //dept\n return false;\n \n curValue = obj.get(property); //purchase\n switch(operator)\n {\n case '==':\n return value.equeals(curValue); sales == purchase\n break;\n case '>':\n ...\n case '<':\n ...\n case '!=':\n ... \n case '<=':\n ...\n case '>=':\n ...\n }\n }", "public void dataNotDouble() {\n MarketDataBundle marketDataBundle = new MapMarketDataBundle(\n new MarketDataEnvironmentBuilder()\n .add(SecurityId.of(SEC1.getExternalIdBundle()), \"not a double\")\n .add(SecurityId.of(SEC2.getExternalIdBundle()), 2.0)\n .valuationTime(ZonedDateTime.now())\n .build());\n MarketDataShock shock = MarketDataShock.relativeShift(0.5, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(shock);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), marketDataBundle, scenarioDef);\n\n assertFalse(FN.foo(env, SEC1).isSuccess());\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }", "@Test\n public void testEquals() throws ValueDoesNotMatchTypeException {\n TestEvaluationContext context = new TestEvaluationContext();\n \n DecisionVariableDeclaration decl = new DecisionVariableDeclaration(\"x\", IntegerType.TYPE, null);\n \n ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0));\n ConstraintSyntaxTree cst1 = new OCLFeatureCall(\n new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0);\n ConstraintSyntaxTree cst2 = new OCLFeatureCall(\n new Variable(decl), IntegerType.GREATER_EQUALS_INTEGER_INTEGER.getName(), c0);\n\n EvaluationAccessor val1 = Utils.createValue(ConstraintType.TYPE, context, cst1);\n EvaluationAccessor val2 = Utils.createValue(ConstraintType.TYPE, context, cst2);\n EvaluationAccessor nullV = Utils.createNullValue(context);\n \n // equals is useless and will be tested in the EvaluationVisitorTest\n \n Utils.testEquals(true, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, val1);\n Utils.testEquals(true, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, val2);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, val2);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, val1);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, nullV);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, nullV);\n\n val1.release();\n val2.release();\n nullV.release();\n }", "protected abstract Value evaluate();", "@Test\n public void testEquality(){\n int ans = testing1.LessThanTen(testing1.getValue1(), testing1.getValue2());\n assertEquals(10, ans);\n }", "public boolean equals(Object obj) {\n\t\tif ((obj != null) && (obj instanceof MutableDouble)) {\n\t\t\treturn doubleValue() == ((MutableDouble) obj).doubleValue();\n\t\t}\n\t\treturn false;\n\t}", "Condition(double multiplier) {\r\n this.multiplier = multiplier;\r\n }", "DbQuery setEqualsFilter(double value) {\n filter = Filter.EQUALS;\n filterType = FilterType.DOUBLE;\n this.equals = value;\n return this;\n }", "public boolean Mayor(Object obj1, Object obj2){\n return (Double.parseDouble(obj1.toString()) > Double.parseDouble(obj2.toString()));\n }", "@Override\n\tpublic void visit(DoubleLiteral n) {\n\t\t\n\t}", "Object findOperatorNeedCheck();", "public void testDoubleValue() {\n AtomicLong ai = new AtomicLong();\n assertEquals(0.0d, ai.doubleValue());\n for (long x : VALUES) {\n ai.set(x);\n assertEquals((double)x, ai.doubleValue());\n }\n }", "public T caseExpression_Double(Expression_Double object)\r\n {\r\n return null;\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tdouble num1=18.6, num2=11.5;\n\t\t\n\t\tif(num1>num2) {\n\t\t\tSystem.out.println(\"Double value \"+num1+\" is larger than \"+num2);\n\t\t}else {\n\t\t\tSystem.out.println(\"Double value \"+num1+\" is smaller than \"+num2);\n\t\t}\n\t\t\n\t\t\t\n\t}", "double getRealValue();", "public static void main(String[] args) {\n\t\t\n\t\tboolean directTrue = true;\n\t\tboolean directFalse = false;\n\n\t\t\n\t\tSystem.out.println(\"true = \"+directTrue+\" false = \"+directFalse);\n\t\t\n\t\t\n\t\t// Values changed dynamically\n\t\t// As per condition\n\t\t\n\t\tboolean dynamicallyTrue = ( 2 < 5);\n\t\tboolean dynamicallyFalse = ( 2 > 5);\n\n\t\tSystem.out.println(\"( 2 < 5 ) = \"+dynamicallyTrue+\" ( 2 > 5 ) = \"+dynamicallyFalse);\n\t\t\n\t}", "public abstract double read_double();", "@Test\n\tpublic void testGetSessieDuur(){\n\t\tdouble expResult = 1;\n\t\tassertTrue(expResult == instance.getSessieDuur());\n\t}", "@Override\n public TypeNode evaluate() {\n return this.hijo.evaluate().toBoolNode();\n }", "public double doubleValue();", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\treturn -(int) (o1.getValue().compareTo(o2.getValue()));\n\t\t\t}", "default DoublePredicate negate() {\n/* 81 */ return paramDouble -> !test(paramDouble);\n/* */ }", "@Override\n\tpublic Object visit(ASTCondEq node, Object data) {\n\t\tnode.jjtGetChild(0).jjtAccept(this, data);\n\t\tSystem.out.print(\" eq \");\n\t\tnode.jjtGetChild(1).jjtAccept(this, data);\n\t\treturn null;\n\t}" ]
[ "0.6107149", "0.6080991", "0.59573245", "0.5929458", "0.589117", "0.5878663", "0.5878199", "0.5876318", "0.5831031", "0.58028406", "0.5799955", "0.5792691", "0.5765156", "0.57638055", "0.5743091", "0.57345045", "0.5725216", "0.5722977", "0.5693088", "0.56672186", "0.5655081", "0.56363165", "0.56151885", "0.56075865", "0.557099", "0.5553966", "0.5553966", "0.5553966", "0.55433035", "0.55428076", "0.5535147", "0.55345726", "0.55210775", "0.5520401", "0.5509799", "0.54994583", "0.5495277", "0.54844576", "0.5482278", "0.54781675", "0.54708636", "0.5454006", "0.5441952", "0.544041", "0.54359096", "0.5431999", "0.54287034", "0.5416545", "0.5406436", "0.54017645", "0.53911215", "0.5384429", "0.53598326", "0.53417563", "0.5335488", "0.5333162", "0.5332842", "0.53316855", "0.5329285", "0.5321471", "0.5319105", "0.530702", "0.5301767", "0.5296122", "0.52841437", "0.5270561", "0.5263302", "0.52615577", "0.52491164", "0.5246587", "0.5243645", "0.52398586", "0.52239895", "0.5216327", "0.5209352", "0.5207847", "0.52070045", "0.5204059", "0.52035177", "0.51923746", "0.5187846", "0.5185594", "0.51788104", "0.51764125", "0.51741886", "0.51731527", "0.5170932", "0.51700974", "0.5156156", "0.5154244", "0.515041", "0.5143108", "0.51384234", "0.5136647", "0.51365566", "0.5133791", "0.51325333", "0.5127914", "0.51187265", "0.51161855" ]
0.5440546
43
This function gets executed when the operator '$gt;=' is used on the double
@Override public InterpreterValue bigger_equals(InterpreterValue v) { // If the given value is a IntegerValue then check if the value is bigger than // or equal to the own value and return a BooleanValue if(v instanceof IntegerValue) return BooleanValue.from(getValue() >= ((IntegerValue) v).getValue()); // If the given value is a DoubleValue then check if the value is bigger than // or equal to the own value and return a BooleanValue if(v instanceof DoubleValue) return BooleanValue.from(getValue() >= ((DoubleValue) v).getValue()); // In other case just throw an error throw new Error("Operator '>=' is not defined for type integer and " + v.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasGt();", "String getGreater();", "public void testGreaterThanElement() {\n\t // fail(\"testGreaterThanElement\");\n \tCircuit circuit = new Circuit();\n \tDouble x1 = 0.5;\n \tAnd and = (And) circuit.getFactory().getGate(Gate.AND);\n\t\tNot not = (Not) circuit.getFactory().getGate(Gate.NOT);\n\t\tGte gte1 = (Gte) circuit.getFactory().getGate(Gate.GTE);\n \tand.setLeftInput(x1);\n \tnot.setInput(x1);\n \tnot.eval();\n \tand.setRightInput(not.getOutput());\n\t\tand.eval();\n \tgte1.setLeftInput(and.getOutput());\n\t\tgte1.setRightInput(x1);\n \tassertEquals( new Double(0.0), gte1.eval());\n }", "public boolean greaterOrEqualThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) >= 0;\n }", "public QueryElement addGreaterEqualsThen(String property, Object value);", "public boolean Mayor(Object obj1, Object obj2){\n return (Double.parseDouble(obj1.toString()) > Double.parseDouble(obj2.toString()));\n }", "public boolean a(double paramDouble)\r\n/* 28: */ {\r\n/* 29: 44 */ double d1 = aQ().a() * 4.0D;\r\n/* 30: 45 */ d1 *= 64.0D;\r\n/* 31: 46 */ return paramDouble < d1 * d1;\r\n/* 32: */ }", "@Override\n public boolean isGreater(Query e1, Query e2) {\n return this.compare(e1,e2) == this.GREATER;\n }", "@Override\r\n\tpublic int compareTo(Double another) {\n\t\treturn 0;\r\n\t}", "public Snippet visit(GreaterThanEqualExpression n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t\t Snippet f0 = n.identifier.accept(this, argu);\n\t\t n.nodeToken.accept(this, argu);\n\t\t Snippet f2 = n.identifier1.accept(this, argu);\n\t\t _ret.returnTemp = f0.returnTemp+\" >= \"+f2.returnTemp;\n\t return _ret;\n\t }", "@Override\r\n\t\tpublic int compare(Double o1, Double o2) {\n\t\t\treturn o2.compareTo(o1);\r\n\t\t}", "default boolean gt(int lhs, int rhs) {\r\n return lt(rhs,lhs);\r\n }", "@Override\r\n\t\t\tpublic boolean accept(double t) {\n\t\t\t\treturn t>0.5;\r\n\t\t\t}", "public boolean greaterThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) == 1;\n }", "Gt(ExpList e)\r\n\t{\r\n\t\texpList = e;\r\n\t}", "float getGt();", "@Override\r\n\t\tpublic int compare(Double arg0, Double arg1) {\n\t\t\treturn arg0.compareTo(arg1);\r\n\t\t}", "private Object eval(RelExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n if (expr.getExpr().size() == 2) {\n Object res2 = eval(expr.getExpr().get(1));\n String opt = expr.getOpt();\n\n if (\"==\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = ((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = ((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = ((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"!=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = !((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = !((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = !((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res < (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res <= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res > (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res >= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "BooleanExpression gt(ComparableExpression<? extends T> expr);", "public boolean lessOrEqualThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) <= 0;\n }", "Condition(double multiplier) {\r\n this.multiplier = multiplier;\r\n }", "public boolean greaterP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) > (yRatio.numerator * x.denominator));\n }\n }\n }", "public QueryElement addGreaterThen(String property, Object value);", "private void doEpsilon(){\n\t\tcurrentState = \"q0\";\n\t}", "public boolean greaterEqualP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) >= (yRatio.numerator * x.denominator));\n }\n }\n }", "private Expr comparison() {\n Expr expr = addition();\n\n while(match(GREATER, GREATER_EQUAL, LESS, LESS_EQUAL)) { // These variable length arguments are real convenient\n Token operator = previous();\n Expr right = addition();\n expr = new Expr.Binary(expr, operator, right);\n }\n\n return expr;\n }", "public static void main(String[] args) {\n\t\t\n\t\tdouble num1=18.6, num2=11.5;\n\t\t\n\t\tif(num1>num2) {\n\t\t\tSystem.out.println(\"Double value \"+num1+\" is larger than \"+num2);\n\t\t}else {\n\t\t\tSystem.out.println(\"Double value \"+num1+\" is smaller than \"+num2);\n\t\t}\n\t\t\n\t\t\t\n\t}", "@Override\n protected boolean runInEQ() {\n return true;\n }", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\t\t\n\t}", "double getDoubleValue2();", "public void insertionNumberSortDouble()\n {\n\t for(int j=1; j<AL.size(); j++)\n\t {\n\t\t Generics temp = AL.get(j);\n\t\t int possibleIndex = j;\n\t\t \n\t\t while(possibleIndex>0 && Double.parseDouble(AL.get(possibleIndex - 1).toString()) < Double.parseDouble(temp.toString()))\n\t\t {\n\t\t\t AL.set(possibleIndex, AL.get(possibleIndex -1));\n\t\t\t possibleIndex--;\n\t\t\t \n\t\t }\n\t\t \n\t\t AL.set(possibleIndex, temp);\n\t }\n \n }", "public boolean isDouble();", "public void method_871(double var1) {\n this.field_657 = var1;\n }", "boolean updateValue() {\n boolean ret;\n\n if (Math.abs(curUtilityValue - nextUtilityValue) < Math.abs(curUtilityValue) * MAX_ERR_PERCENT / 100)\n ret = true;\n else {\n ret = false;\n // System.out.println(\" no match cell: x: \"+x+\" y: \"+y);\n }\n curUtilityValue = nextUtilityValue;\n return ret;\n\n }", "private Double check_mathOperator(Double result) {\n \r\n switch(mathOperator){\r\n case '/':\r\n result =totalFirst/totalLast;\r\n break;\r\n case 'x':\r\n result =totalFirst*totalLast;\r\n break;\r\n case '-':\r\n result =totalFirst-totalLast;\r\n break;\r\n case '+':\r\n result =totalFirst+totalLast;\r\n break;\r\n \r\n }\r\n return result;\r\n }", "public InequalityTerm getGreaterTerm() {\n\t\treturn _greaterTerm;\n\t}", "public T caseOperation_Greater_Equals(Operation_Greater_Equals object)\r\n {\r\n return null;\r\n }", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1, Entry<String, Double> o2) {\n\t\t\t\treturn o1.getValue().compareTo(o2.getValue());\n\t\t\t}", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\n\t}", "public void setPricePerSquareFoot(double newPricePerSquareFoot){\nif(newPricePerSquareFoot > 0){\npricePerSquareFoot = newPricePerSquareFoot;\n}\n}", "public GreaterThanOrEqualExpression(final ExpressionNode<T, ?> left, final ExpressionNode<T, ?> right)\n {\n super(left, right);\n _operator = \">=\";\n }", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "public void equal() {\n if (operatorAssigned != Operator.NON || operatorType != Operator.NON) {\n double subResult;\n if (numberStored[1] != 0) {\n subResult = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), operatorType);\n numberStored[0] = basicCalculation(numberStored[0], subResult, operatorAssigned);\n numberStored[1] = 0;\n mainLabel.setText(Double.toString(numberStored[0]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n }\n operatorAssigned = Operator.NON;\n operatorType = Operator.NON;\n }", "public boolean isDouble() {\n return false;\n }", "public void method_893(Double var1) {\n this.field_669 = var1;\n }", "public final EObject ruleGreaterOrEqualThanOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4674:28: ( ( () otherlv_1= '>=' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4675:1: ( () otherlv_1= '>=' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4675:1: ( () otherlv_1= '>=' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4675:2: () otherlv_1= '>='\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4675:2: ()\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4676:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getGreaterOrEqualThanOperatorAccess().getGreaterOrEqualThanOperatorAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,61,FOLLOW_61_in_ruleGreaterOrEqualThanOperator10381); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getGreaterOrEqualThanOperatorAccess().getGreaterThanSignEqualsSignKeyword_1());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tif(o1.getValue()>o2.getValue()){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.getValue()<o2.getValue()){\n\t\t\t\t\treturn 1;\n\t\t\t\t}else{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic int compare(Point arg0, Point arg1) {\n\t\t\t return Double.compare(arg0.getX(), arg1.getX());\n\t\t\t}", "public TreeNode getGT()\r\n\t\t{\r\n\t\t\treturn gThan;\r\n\t\t}", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1,\n\t\t\t\t\tEntry<Integer, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "public final boolean greaterThanEquals() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue >= topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean matches(Double value) {\n\tif(this.key2==0&&this.key1<=value)return true;\n\t if(this.key1<=value&&this.key2>value)return true;\n\t return false;\n}", "@Override\r\n public int compare(Pair<Integer, Double> o1, Pair<Integer, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }", "@Override\n public void onChanged(Double aDouble) {\n if (aDouble*1000 < 1) {\n etOutputValue.setText(\"0.0\");\n } else {\n DecimalFormat decimalFormat = new DecimalFormat(\"#,##0.###\");\n etOutputValue.setText(decimalFormat.format(aDouble));\n }\n }", "public double getDoubleValue2() {\n return doubleValue2_;\n }", "@DISPID(-2147412103)\n @PropPut\n void ondblclick(\n java.lang.Object rhs);", "@Override\r\n\t\tpublic int compare(String2DoubleNode o1, String2DoubleNode o2) {\n\t\t\treturn o2.value.compareTo(o1.value);\r\n\t\t}", "public void method_883(double var1) {\n this.field_663 = var1;\n }", "public static double useOtherOperators(boolean shouldMult, String subToEval){\n\t\tif (shouldMult){\n\t\t\treturn Exponent.evalExpo(subToEval); //check for exponents\n\t\t} else {\n\t\t\treturn 1/Exponent.evalExpo(subToEval); //check for exponents\n\t\t}\n\t}", "double getBasedOnValue();", "public void setHigh(double value){high = value;}", "boolean hasDouble();", "BooleanExpression gteq(ComparableExpression<? extends T> expr);", "public void setLow(double value){low = value;}", "public boolean lessThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) == -1;\n }", "public final boolean lessThanEquals() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue <= topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public LessThan() {\n this.toCompare = new double[2];\n this.index = 0;\n }", "@Override\n\tpublic void visit(DoubleLiteral n) {\n\t\t\n\t}", "public Units whereGreatherOrEqual(UnitSelector.RealSelector selector, double value)\n\t{\n\t\treturn where(new RealComparisonSelector(selector, value, Comparison.GREATER_OR_EQUAL));\n\t}", "public void method_891(double var1) {\n this.field_668 = var1;\n }", "public double getDoubleValue2() {\n return doubleValue2_;\n }", "@Override\n\tpublic void visit(LessNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam expresiile din cei 2 fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger s2 = 0;\n\t\tInteger s1 = 0;\n\t\t/**\n\t\t * preluam rezultatele evaluarii si verificam daca primul este mai mic\n\t\t * decat la doilea ,setand corespunzator valoarea din nodul curent in\n\t\t * functie de rezultatul comparatiei\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\ts1 = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\t\t} else {\n\t\t\ts1 = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ts2 = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\t\t} else {\n\t\t\ts2 = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (s1 < s2) {\n\t\t\tnode.setName(\"true\");\n\t\t} else {\n\t\t\tnode.setName(\"false\");\n\t\t}\n\t}", "void setActiveOperand(double activeOperand);", "@Override\n\t\tpublic void monitorChanged(MonitorEvent arg0) {\n\t\t\tDBR dbr = arg0.getDBR();\n\t\t\tif (dbr.isDOUBLE()) {\n\t\t\t\t// update the latest value\n\t\t\t\tdouble lastValue = latestValue;\n\t\t\t\tlatestValue = ((DBR_Double) dbr).getDoubleValue()[0];\n\n\t\t\t\t// if the percentage change has been great enough, then inform\n\t\t\t\t// IObservers\n\t\t\t\tif (Math.abs((lastValue - latestValue) / lastValue) * 100.0 >= sensitivity) {\n\t\t\t\t\tnotifyIObservers(this, latestValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void setNewPVal(double pVal) { this.pValAfter = pVal; }", "public T caseOperation_Greater(Operation_Greater object)\r\n {\r\n return null;\r\n }", "Double getDoubleValue();", "public void setVar39(java.lang.Double value) {\n this.var39 = value;\n }", "@Override\r\n\t\t\tpublic int compare(SimpleEntry<Integer, Double> arg0, SimpleEntry<Integer, Double> arg1)\r\n\t\t\t{\r\n\t\t\t\treturn arg1.getValue().compareTo(arg0.getValue());\r\n\t\t\t}", "double getDoubleValue1();", "public boolean isHigher(Operator o){\n if(indent > o.indent){\n return true;\n }else{\n return prec > o.prec;\n }\n }", "public void set(double val);", "private boolean caculate(double currentValue, double lastValue, NotifyStrategy.Expression expr,\n Map<String, Object> judgeResult) {\n\n double diff = currentValue - lastValue;\n double upperLimit = 0;\n String upperLimitString = expr.getUpperLimit();\n\n // get upperLimit\n if (upperLimitString.contains(\"#\")) {\n upperLimit = Double.parseDouble(upperLimitString.substring(upperLimitString.indexOf('#') + 1));\n }\n else if (upperLimitString.contains(\"%\")) {\n upperLimit = Double.parseDouble(upperLimitString.substring(0, upperLimitString.indexOf('%')));\n diff = diff * 100 / lastValue;\n }\n else if (!upperLimitString.contains(\"*\")) {\n upperLimit = Double.parseDouble(upperLimitString);\n }\n\n if (!upperLimitString.contains(\"*\") && diff > upperLimit) {\n judgeResult.put(\"actualValue\", String.format(\"%.2f\", diff) + (upperLimitString.contains(\"%\") ? \"%\" : \"\"));\n judgeResult.put(\"expectedValue\", upperLimitString);\n judgeResult.put(\"upperORlower\", \"upper\");\n\n return true;\n }\n\n diff = currentValue - lastValue;\n double lowerLimit = 0;\n String lowerLimitString = expr.getLowerLimit();\n\n // get lowerLimit\n if (lowerLimitString.contains(\"#\")) {\n lowerLimit = 0 - Double.parseDouble(lowerLimitString.substring(lowerLimitString.indexOf('#') + 1));\n }\n else if (lowerLimitString.contains(\"%\")) {\n lowerLimit = Double.parseDouble(lowerLimitString.substring(0, lowerLimitString.indexOf('%')));\n diff = diff * 100 / lastValue;\n }\n else if (!lowerLimitString.contains(\"*\")) {\n lowerLimit = Double.parseDouble(lowerLimitString);\n }\n\n if (!lowerLimitString.contains(\"*\") && diff < 0 - lowerLimit) {\n judgeResult.put(\"actualValue\", String.format(\"%.2f\", diff) + (lowerLimitString.contains(\"%\") ? \"%\" : \"\"));\n judgeResult.put(\"expectedValue\", lowerLimitString);\n judgeResult.put(\"upperORlower\", \"lower\");\n\n return true;\n }\n\n return false;\n }", "@Override\n public boolean distributesDown() {\n return betterOrEqual(P);\n }", "public Value<?> gt(Value<?> v) {\r\n Integer cmp = compare(v);\r\n if (cmp == null)\r\n throw unsupported(\">\", v);\r\n return new ValueBoolean(cmp > 0);\r\n }", "public final void mGE() throws RecognitionException {\n try {\n int _type = GE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/dannluciano/Sources/MyLanguage/expr.g:169:4: ( '>=' )\n // /Users/dannluciano/Sources/MyLanguage/expr.g:169:6: '>='\n {\n match(\">=\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public T caseExpression_Double(Expression_Double object)\r\n {\r\n return null;\r\n }", "@Override\r\n\tpublic boolean evaluate(SensorData latest){\r\n \taddQueue(latest);\r\n \tremoveOverTime();\r\n \tfloat overlapRatio = 0;\r\n \tbyte latestLog[] = latest.getSensorDate(getKey());\r\n \tif( latestLog!=null ){\r\n \t\toverlapRatio = Bytes.toFloat(latestLog);\r\n \tLog.v( LOG_TAG + \",Interval\", this.toString() + \" | \" + getKey() + \" = \" + overlapRatio);\r\n \t}else{\r\n \t\toverlapRatio = smoothingOverlapRatio();\r\n \tLog.v( LOG_TAG, this.toString() + \" | \" + getKey() + \" = \" + overlapRatio);\r\n \t}\r\n \tif( MatchingConstants.LARGER_THAN == calculater ){\r\n \t\tlatestResult = overlapRatio > floatConstant;\r\n \t\treturn latestResult;\r\n \t}else if( MatchingConstants.SMALLER_THAN == calculater ){\r\n \t\tlatestResult = overlapRatio < floatConstant;\r\n \t\treturn latestResult;\r\n \t}else if( MatchingConstants.EQUAL == calculater ){\r\n \t\tlatestResult = overlapRatio == floatConstant;\r\n \t\treturn latestResult;\r\n \t}else{\r\n \t\tLog.e(LOG_TAG, \"calculater is not correct!!\");\r\n \t\tlatestResult = false;\r\n \t\treturn false;\r\n \t}\r\n\t}", "public abstract boolean containsInstance(double value);", "public Double\n getDoubleValue() \n {\n return ((Double) getValue());\n }", "@Override\n public boolean get()\n {\n return controller.getRawAxis( axisID ) > 0.75;\n }", "@Override String toDot() {\r\n switch ( operator ) {\r\n case EQUALS_PREFIX :\r\n case EQUALS :\r\n return left.toDot() + \" = \" + right.toDot();\r\n case NEQ :\r\n return left.toDot() + \" &ne; \" + right.toDot();\r\n case GE : \r\n return left.toDot() + \" &ge; \" + right.toDot();\r\n case GT : \r\n return left.toDot() + \" &gt; \" + right.toDot(); \r\n case LE :\r\n return left.toDot() + \" &le; \" + right.toDot();\r\n case LT : \r\n return left.toDot() + \" &lt; \" + right.toDot();\r\n }\r\n assert false:operator;\r\n return null;\r\n }", "public void method_887(double var1) {\n this.field_666 = var1;\n }", "public void setVar76(java.lang.Double value) {\n this.var76 = value;\n }", "@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> greaterThanEquals(String field, long propertyValue);", "public Comparison compare(double left, double right) {\n return checkResult(Double.compare(left, right));\n }", "public boolean HasGreaterUtility(DijkstraDistance d2, Method source)\n\t{\n\t\tdouble thisQuality = this.quality - source.getPosition().distance(this.position);\n\t\tdouble d2Quality = d2.quality - source.getPosition().distance(d2.position);\n\t\tboolean result = thisQuality>d2Quality;\n\t\tif (result)\n\t\t{\n\t\t\tMain.Message(debugFlag, \"[DijkstraDistance] Utility \" + source.label + \"-\" + nodeName + \" (\" + thisQuality + \")>\"\n\t\t\t\t\t+ source.label + \"-\" + d2.nodeName + \"(\" + d2Quality + \")\");\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tdouble evaluate() {\n\t\treturn Math.abs(operand.getVal());\n\t}", "bool eval(Map<string,object> obj)\n {\n if(!obj.contains(property)) //dept\n return false;\n \n curValue = obj.get(property); //purchase\n switch(operator)\n {\n case '==':\n return value.equeals(curValue); sales == purchase\n break;\n case '>':\n ...\n case '<':\n ...\n case '!=':\n ... \n case '<=':\n ...\n case '>=':\n ...\n }\n }", "@Override\r\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\tif ((o1.getValue()-o2.getValue())>0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} else if ((o1.getValue()-o2.getValue())<0) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t}", "public double getDoubleValue1() {\n return doubleValue1_;\n }" ]
[ "0.60524714", "0.5886445", "0.57953435", "0.576977", "0.57684356", "0.56663793", "0.55815727", "0.5527303", "0.5517828", "0.5479127", "0.54672253", "0.5458556", "0.5458451", "0.543927", "0.54363155", "0.5406549", "0.5394386", "0.5381566", "0.5373033", "0.53428125", "0.53095174", "0.53076214", "0.5299276", "0.5298692", "0.5296016", "0.5281923", "0.52817863", "0.52644485", "0.52620465", "0.52375126", "0.5234106", "0.52294904", "0.52156866", "0.5213574", "0.5199464", "0.5198774", "0.5190947", "0.51869965", "0.5183132", "0.51767904", "0.5170071", "0.5147362", "0.51386434", "0.5135933", "0.513357", "0.5117836", "0.51119214", "0.50973207", "0.5095644", "0.5094826", "0.5094342", "0.50904715", "0.5086311", "0.50745016", "0.5072427", "0.50721145", "0.5071388", "0.5067062", "0.5061372", "0.5060028", "0.50555724", "0.504797", "0.5047889", "0.50437987", "0.50423837", "0.5028917", "0.50250196", "0.5024427", "0.5015791", "0.50001884", "0.4998822", "0.49970374", "0.4996223", "0.4996202", "0.4995368", "0.49931356", "0.49906123", "0.4990574", "0.4987267", "0.4982497", "0.49812582", "0.49691832", "0.4965964", "0.49580133", "0.4957801", "0.49541664", "0.49541193", "0.4952465", "0.49386933", "0.493814", "0.49364504", "0.4925258", "0.49167705", "0.49167395", "0.49138084", "0.49116504", "0.49038288", "0.49021596", "0.49014658", "0.48994884", "0.48986062" ]
0.0
-1
This function gets executed when the operator '<=' is used on the doubles
@Override public InterpreterValue smaller_equals(InterpreterValue v) { // If the given value is a IntegerValue then check if the value is smaller than // or equal to the own value and return a BooleanValue if(v instanceof IntegerValue) return BooleanValue.from(getValue() <= ((IntegerValue) v).getValue()); // If the given value is a DoubleValue then check if the value is smaller than // or equal to the own value and return a BooleanValue if(v instanceof DoubleValue) return BooleanValue.from(getValue() <= ((DoubleValue) v).getValue()); // In other case just throw an error throw new Error("Operator '<=' is not defined for type integer and " + v.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic int compare(Double o1, Double o2) {\n\t\t\treturn o2.compareTo(o1);\r\n\t\t}", "@Override\r\n\tpublic int compareTo(Double another) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\t\tpublic int compare(Double arg0, Double arg1) {\n\t\t\treturn arg0.compareTo(arg1);\r\n\t\t}", "@Override\n\t\t\tpublic int compare(Point arg0, Point arg1) {\n\t\t\t return Double.compare(arg0.getX(), arg1.getX());\n\t\t\t}", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\treturn -(int) (o1.getValue().compareTo(o2.getValue()));\n\t\t\t}", "public boolean a(double paramDouble)\r\n/* 28: */ {\r\n/* 29: 44 */ double d1 = aQ().a() * 4.0D;\r\n/* 30: 45 */ d1 *= 64.0D;\r\n/* 31: 46 */ return paramDouble < d1 * d1;\r\n/* 32: */ }", "public boolean lessOrEqualThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) <= 0;\n }", "public boolean lessThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) == -1;\n }", "@Override\r\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\tif ((o1.getValue()-o2.getValue())>0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} else if ((o1.getValue()-o2.getValue())<0) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1,\n\t\t\t\t\tEntry<Integer, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "@Override\r\n public int compare(Pair<Integer, Double> o1, Pair<Integer, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }", "public double getMinDoubleValue();", "@Override\r\n\t\t\tpublic int compare(SimpleEntry<Integer, Double> arg0, SimpleEntry<Integer, Double> arg1)\r\n\t\t\t{\r\n\t\t\t\treturn arg1.getValue().compareTo(arg0.getValue());\r\n\t\t\t}", "@Override\n\tdouble evaluate() {\n\t\treturn Math.abs(operand.getVal());\n\t}", "public void setLow(double value){low = value;}", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tif(o1.getValue()>o2.getValue()){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.getValue()<o2.getValue()){\n\t\t\t\t\treturn 1;\n\t\t\t\t}else{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}", "public LessThan() {\n this.toCompare = new double[2];\n this.index = 0;\n }", "@Override\n public int compareTo(UnconstrainedBidElement o) {\n return Double.compare(o.demandWatt, demandWatt);\n }", "public static void main(String[] args) {\n\t\t\n\t\tdouble num1=18.6, num2=11.5;\n\t\t\n\t\tif(num1>num2) {\n\t\t\tSystem.out.println(\"Double value \"+num1+\" is larger than \"+num2);\n\t\t}else {\n\t\t\tSystem.out.println(\"Double value \"+num1+\" is smaller than \"+num2);\n\t\t}\n\t\t\n\t\t\t\n\t}", "private Object eval(RelExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n if (expr.getExpr().size() == 2) {\n Object res2 = eval(expr.getExpr().get(1));\n String opt = expr.getOpt();\n\n if (\"==\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = ((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = ((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = ((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"!=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = !((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = !((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = !((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res < (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res <= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res > (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res >= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\t\t\n\t}", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "public abstract DoublePredicate lowerPredicate(double lowerBound);", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1, Entry<String, Double> o2) {\n\t\t\t\treturn o1.getValue().compareTo(o2.getValue());\n\t\t\t}", "public static int compare(double obj1,double obj2){\n\t\tif(obj1 == obj2) { return 0; }\n\t\telse if(obj1 > obj2){\n\t\t\treturn 1;\n\t\t} else{ return -1; }\n\t}", "public void testGreaterThanElement() {\n\t // fail(\"testGreaterThanElement\");\n \tCircuit circuit = new Circuit();\n \tDouble x1 = 0.5;\n \tAnd and = (And) circuit.getFactory().getGate(Gate.AND);\n\t\tNot not = (Not) circuit.getFactory().getGate(Gate.NOT);\n\t\tGte gte1 = (Gte) circuit.getFactory().getGate(Gate.GTE);\n \tand.setLeftInput(x1);\n \tnot.setInput(x1);\n \tnot.eval();\n \tand.setRightInput(not.getOutput());\n\t\tand.eval();\n \tgte1.setLeftInput(and.getOutput());\n\t\tgte1.setRightInput(x1);\n \tassertEquals( new Double(0.0), gte1.eval());\n }", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\n\t}", "@Override\r\n\t\t\tpublic boolean accept(double t) {\n\t\t\t\treturn t>0.5;\r\n\t\t\t}", "@Override\n\tpublic void visit(LessNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam expresiile din cei 2 fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger s2 = 0;\n\t\tInteger s1 = 0;\n\t\t/**\n\t\t * preluam rezultatele evaluarii si verificam daca primul este mai mic\n\t\t * decat la doilea ,setand corespunzator valoarea din nodul curent in\n\t\t * functie de rezultatul comparatiei\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\ts1 = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\t\t} else {\n\t\t\ts1 = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ts2 = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\t\t} else {\n\t\t\ts2 = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (s1 < s2) {\n\t\t\tnode.setName(\"true\");\n\t\t} else {\n\t\t\tnode.setName(\"false\");\n\t\t}\n\t}", "public Comparison compare(double left, double right) {\n return checkResult(Double.compare(left, right));\n }", "public boolean greaterOrEqualThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) >= 0;\n }", "private int handleIncomparablePrimitives(Object x, Object y) {\n int xCost = getPrimitiveValueCost(x);\n int yCost = getPrimitiveValueCost(y);\n int res = Integer.compare(xCost, yCost);\n return ascending ? res : -res;\n }", "protected abstract double operation(double val);", "public boolean isDouble();", "public int compareTo(PointDouble other) { // override less than operator\n if (Math.abs(x - other.x) > EPS) // useful for sorting\n return (int)Math.ceil(x - other.x); // first: by x-coordinate\n else if (Math.abs(y - other.y) > EPS)\n return (int)Math.ceil(y - other.y); // second: by y-coordinate\n else\n return 0; // they are equal\n }", "@Override\n\tpublic void visit(DoubleType n) {\n\t\t\n\t}", "public void insertionNumberSortDouble()\n {\n\t for(int j=1; j<AL.size(); j++)\n\t {\n\t\t Generics temp = AL.get(j);\n\t\t int possibleIndex = j;\n\t\t \n\t\t while(possibleIndex>0 && Double.parseDouble(AL.get(possibleIndex - 1).toString()) < Double.parseDouble(temp.toString()))\n\t\t {\n\t\t\t AL.set(possibleIndex, AL.get(possibleIndex -1));\n\t\t\t possibleIndex--;\n\t\t\t \n\t\t }\n\t\t \n\t\t AL.set(possibleIndex, temp);\n\t }\n \n }", "public boolean Mayor(Object obj1, Object obj2){\n return (Double.parseDouble(obj1.toString()) > Double.parseDouble(obj2.toString()));\n }", "public double getMinimumDouble() {\n/* 201 */ return this.min;\n/* */ }", "private static boolean lt(Comparable lhs, Comparable rhs) \n {\n return lhs.compareTo(rhs) < 0;\n }", "Double getMinimumValue();", "private RegressionTreeNode traverseNumericalNode(Double v) {\n\t\tdouble val = (Double) this.value;\n\t\tif(v.compareTo(val) <= 0){\n\t\t\treturn this.leftChild;\n\t\t}else{\n\t\t\treturn this.rightChild;\n\t\t}\n\t}", "public void setMinValue(double x) {\r\n\t\tminValue = x;\r\n\t}", "public void equal() {\n if (operatorAssigned != Operator.NON || operatorType != Operator.NON) {\n double subResult;\n if (numberStored[1] != 0) {\n subResult = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), operatorType);\n numberStored[0] = basicCalculation(numberStored[0], subResult, operatorAssigned);\n numberStored[1] = 0;\n mainLabel.setText(Double.toString(numberStored[0]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n }\n operatorAssigned = Operator.NON;\n operatorType = Operator.NON;\n }", "@Override\n public void testIncreasingTolerance() {\n doTestIncreasingTolerance(Decimal64Field.getInstance(), 1.3, 1.0e-12);\n }", "private double min(double a, double b) {\n if (a > b) {\n return b;\n }\n return a;\n }", "private Double check_mathOperator(Double result) {\n \r\n switch(mathOperator){\r\n case '/':\r\n result =totalFirst/totalLast;\r\n break;\r\n case 'x':\r\n result =totalFirst*totalLast;\r\n break;\r\n case '-':\r\n result =totalFirst-totalLast;\r\n break;\r\n case '+':\r\n result =totalFirst+totalLast;\r\n break;\r\n \r\n }\r\n return result;\r\n }", "@SuppressWarnings(\"unchecked\")\n protected void \n validate\n (\n Comparable value\t \n )\n throws IllegalArgumentException \n {\n if((value != null) && !(value instanceof Double))\n throw new IllegalArgumentException\n\t(\"The parameter (\" + pName + \") only accepts (Double) values!\");\n }", "public void testComparisons() {\n\tfinal double small = Math.pow(2.0, -42);\n\n\t// Input: a, b\n\tdouble[][] input = new double[][] { new double[] { 1, 1 },\n\t\tnew double[] { 1, 2 }, new double[] { 1, 1 - small / 10 },\n\t\tnew double[] { 1, 1 + small / 10 },\n\n\t\tnew double[] { 0, 1 }, new double[] { 0, 0 },\n\t\tnew double[] { 0, -1 }, new double[] { 0, small / 100 },\n\t\tnew double[] { 2100000001.0001, 2100000001.0003 }, };\n\n\t// Output: less, equals\n\tboolean[][] output = new boolean[][] { new boolean[] { false, true },\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true },\n\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true }, };\n\n\tfor (int i = 0; i < input.length; ++i) {\n\t boolean l = StandardFloatingPointComparator.getDouble().less(\n\t\t input[i][0], input[i][1]);\n\t boolean e = StandardFloatingPointComparator.getDouble().equals(\n\t\t input[i][0], input[i][1]);\n\n\t boolean ne = StandardFloatingPointComparator.getDouble().notEquals(\n\t\t input[i][0], input[i][1]);\n\t boolean le = StandardFloatingPointComparator.getDouble()\n\t\t .lessOrEquals(input[i][0], input[i][1]);\n\t boolean g = StandardFloatingPointComparator.getDouble().greater(\n\t\t input[i][0], input[i][1]);\n\t boolean ge = StandardFloatingPointComparator.getDouble()\n\t\t .greaterOrEquals(input[i][0], input[i][1]);\n\n\t boolean less = output[i][0];\n\t boolean equals = output[i][1];\n\n\t boolean notEquals = !equals;\n\t boolean lessOrEquals = less || equals;\n\t boolean greater = !lessOrEquals;\n\t boolean greaterOrEquals = !less;\n\n\t assertFalse(l != less);\n\t assertFalse(g != greater);\n\t assertFalse(e != equals);\n\t assertFalse(ne != notEquals);\n\t assertFalse(le != lessOrEquals);\n\t assertFalse(ge != greaterOrEquals);\n\t}\n }", "public double lower()\n\t{\n\t\treturn _dblLower;\n\t}", "@Override\n\tprotected void setLowerBound() {\n\t\t\n\t}", "boolean hasDouble();", "@Override\n\tprotected double getLowerBound() {\n\t\treturn 0;\n\t}", "final boolean operator_less(final Sample x) {\n for (int i = 0; i < positive_features.size(); i++) {\n if (i >= x.positive_features.size()) return false;\n int v0 = positive_features.get(i);\n int v1 = x.positive_features.get(i);\n if (v0 < v1) return true;\n if (v0 > v1) return false;\n }\n return false;\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @Override\n protected FloatAssert invoke_api_method() {\n given(floats.getComparator()).willReturn((Comparator) ALWAY_EQUAL_FLOAT);\n return assertions.isLessThanOrEqualTo(6.0f);\n }", "public boolean isDouble() {\n return false;\n }", "public static void greaterThanOrEqual(double arg, double min, String argName) {\r\n if (arg < min) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\" must be greater than or equal to \" + min);\r\n }\r\n }", "@Override\n public boolean lessThan(Object o1, Object o2) {\n return ((MI)o1).value < ((MI)o2).value;\n }", "protected abstract double doubleOp(double d1, double d2);", "private boolean compare(ValueType first, ValueType second) {\r\n // TODO\r\n return false;\r\n }", "public void removeSmaller(double value){\r\n\t DoubleNode cursor2; \r\n\tfor(cursor = head; cursor != null; cursor = cursor.getLink()){\r\n\t\tif(cursor.getData() < value){\r\n\t\t\tif(cursor == head){\r\n\t\t\t\thead = head.getLink(); \r\n\t\t\t\tmanyNodes--; \r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcursor2 = cursor; \r\n\t\t\t\tthis.removeCurrent();\r\n\t\t\t\tcursor = cursor2;\r\n\t\t\t\tmanyNodes--; \r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n }", "public static void main(String [] args){\n double a= 5+(4*5)/5;\n double b= (6*4%2)+15;\n System.out.println(\"a = \"+a);\n System.out.println(\"b = \"+b); \n \n //Ejemplo de operadores relacionales.\n boolean resultado1= a > b;\n boolean resultado2= a !=b; \n System.out.println(\"R1= \"+resultado1);\n System.out.println(\"R2= \"+resultado2); \n }", "default boolean gt(int lhs, int rhs) {\r\n return lt(rhs,lhs);\r\n }", "public static boolean almost_less(double a, double b) {\n if (almost_equals(a, b)) {\n return false;\n }\n return a < b;\n }", "double getDoubleValue2();", "private double min(double value1 , double value2){\n double minValue = 0.0;\n if(value1 <= value2){\n minValue = value1;\n }else{\n minValue = value2;\n }\n\n return minValue;\n }", "@Override\n public int compareTo(DoubleVector2 o) {\n return (getVectorOne().getSteps() + getVectorTwo().getSteps()) - (o.getVectorOne().getSteps() + o.getVectorTwo().getSteps());\n }", "public boolean lessP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) < (yRatio.numerator * x.denominator));\n }\n }\n }", "public final boolean lessThanEquals() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue <= topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static int compare(double v1, double v2) {\n return ( v1 - v2 ) > 0 ? 1 : ( ( v1 - v2 ) == 0 ? 0 : -1 );\n }", "public double getMinValue() {\r\n\t\treturn minValue;\r\n\t}", "@Override\n public InterpreterValue smaller(InterpreterValue v) {\n\n // If the given value is a IntegerValue then check if the value is smaller than\n // the own value and return a BooleanValue\n if(v instanceof IntegerValue) return BooleanValue.from(getValue() < ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue then check if the value is smaller than\n // the own value and return a BooleanValue\n if(v instanceof DoubleValue) return BooleanValue.from(getValue() < ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '<' is not defined for type integer and \" + v.getName());\n\n }", "public double getLow() {return low;}", "@Override\n public Class getValueType() {\n return Double.class;\n }", "@Override\n public InterpreterValue sub(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the subtraction-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() - ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the subtraction-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() - ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '-' is not defined for type double and \" + v.getName());\n\n }", "public static Object lt(Object val1, Object val2) {\n\t\tif (isFloat(val1) && isFloat(val2)) {\n\t\t\treturn ((BigDecimal) val1).compareTo((BigDecimal) val2) < 0;\n\t\t} else if (isInt(val1) && isInt(val2)) {\n\t\t\treturn ((BigInteger) val1).compareTo((BigInteger) val2) < 0;\n\t\t}\n\t\tthrow new OrccRuntimeException(\"type mismatch in lt\");\n\t}", "Condition(double multiplier) {\r\n this.multiplier = multiplier;\r\n }", "double getMin();", "double getMin();", "public abstract double evaluate(double value);", "Double getValue();", "public int compare(Key<Double, Double> a, Key<Double, Double> b){\n\t\t\tif (a.getFirst() < b.getFirst()){\n\t\t\t\treturn -1;\n\t\t\t} else if (a.getFirst() == b.getFirst()){\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}", "public void setOldPVal(double pVal) { this.pValBefore = pVal; }", "@Test\n\tpublic void lessThanTest() {\n\t\tassertTrue(x.less(y));\n\t\tassertFalse(y.less(x));\n\t}", "default DoublePredicate negate() {\n/* 81 */ return paramDouble -> !test(paramDouble);\n/* */ }", "private boolean iflt(PyObject x, PyObject y) {\n \n if (this.compare == null) {\n /* NOTE: we rely on the fact here that the sorting algorithm\n only ever checks whether k<0, i.e., whether x<y. So we\n invoke the rich comparison function with _lt ('<'), and\n return -1 when it returns true and 0 when it returns\n false. */\n return x._lt(y).__nonzero__();\n }\n \n PyObject ret = this.compare.__call__(x, y);\n \n if (ret instanceof PyInteger) {\n int v = ((PyInteger)ret).getValue();\n return v < 0;\n }\n throw Py.TypeError(\"comparision function must return int\");\n }", "public double evaluateAsDouble();", "public static void isValid(double dbl) throws IllegalArgumentException {\n\t//nothing to do here\n }", "@Override\n public int compare(final Triangle t1, final Triangle t2) {\n final Vec4 min1 = t1.getMin();\n final Vec4 min2 = t2.getMin();\n return Double.compare(min1.get(splitType), min2.get(splitType));\n }", "public Units whereLessOrEqual(UnitSelector.RealSelector selector, double value)\n\t{\n\t\treturn where(new RealComparisonSelector(selector, value, Comparison.LESS_OR_EQUAL));\n\t}", "@Override\n public int compare(Pair<Channel, Double> lhs, Pair<Channel, Double> rhs) {\n return rhs.second.compareTo(lhs.second);\n }", "public double minValue() {\n return 0;\r\n }", "@Override\n public boolean distributesDown() {\n return betterOrEqual(P);\n }", "double getDoubleValue1();", "public static boolean compareNumerics(Parser parser, ResultValue resOp1, ResultValue resOp2, String operator)\r\n {\r\n \tdouble val1 = Numeric.getDoubleValue(resOp1.value);\r\n \tdouble val2 = Numeric.getDoubleValue(resOp2.value);\r\n \t\r\n \t\r\n \t\r\n \tswitch(operator)\r\n \t{\r\n \t\tcase \">=\" :\r\n \t\t\tif(val1 >= val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse \r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \">\" :\r\n \t\t\tif(val1 > val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \"<=\" :\r\n \t\t\tif(val1 <= val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \"<\" :\r\n \t\t\tif(val1 < val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \"!=\" :\r\n \t\t\tif(val1 != val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \"==\" :\r\n \t\t\tif(val1 == val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tdefault :\r\n \t\t\tSystem.out.println(\"Error in compare Numerics, \" + operator + \" is not valid\");\r\n \t\t\treturn false;\r\n \t\t\r\n \t\t\t\r\n \t\t\r\n \t}\r\n }", "private boolean less(Comparable a, Comparable b) {\n return a.compareTo(b) < 0;\n }", "@Override\n public int compare(Slope s1, Slope s2){\n if(s2.deno * s1.nomi - s1.deno * s2.nomi < 0) return -1;\n else if(s2.deno * s1.nomi - s1.deno * s2.nomi > 0) return 1;\n else return 0;\n }", "boolean updateValue() {\n boolean ret;\n\n if (Math.abs(curUtilityValue - nextUtilityValue) < Math.abs(curUtilityValue) * MAX_ERR_PERCENT / 100)\n ret = true;\n else {\n ret = false;\n // System.out.println(\" no match cell: x: \"+x+\" y: \"+y);\n }\n curUtilityValue = nextUtilityValue;\n return ret;\n\n }", "E minVal();", "public int compare( Object o1, Object o2 )\n throws ClassCastException\n {\n Double d1 = (Double) o1;\n Double d2 = (Double) o2;\n\n return (int) ( d1.doubleValue() - d2.doubleValue() );\n }" ]
[ "0.6541076", "0.65241444", "0.644219", "0.62942356", "0.6262817", "0.6258138", "0.6218553", "0.619541", "0.6195262", "0.61829334", "0.6173139", "0.6019844", "0.6013288", "0.5930819", "0.5929726", "0.5884291", "0.58782023", "0.58569497", "0.58566445", "0.58342075", "0.58036834", "0.5787039", "0.57798433", "0.57709754", "0.57651746", "0.57490915", "0.57270193", "0.57156175", "0.5703542", "0.56943685", "0.5690157", "0.5686584", "0.56754136", "0.5674609", "0.5671786", "0.56649745", "0.56626314", "0.56535435", "0.5649621", "0.5579642", "0.55658257", "0.5561487", "0.555481", "0.5548446", "0.5514661", "0.55145854", "0.55133456", "0.54948854", "0.5486541", "0.54849565", "0.5479432", "0.54625714", "0.5459032", "0.54578215", "0.5453692", "0.54393494", "0.5438146", "0.5435509", "0.54257804", "0.54244053", "0.5423378", "0.54178065", "0.5406225", "0.54016536", "0.5392782", "0.53783834", "0.5378241", "0.53778994", "0.53739065", "0.53695667", "0.5368867", "0.53618693", "0.53604", "0.53533524", "0.53503954", "0.5343513", "0.5341011", "0.5339664", "0.5339664", "0.5338251", "0.53272927", "0.532637", "0.53238136", "0.5320858", "0.5309639", "0.5304228", "0.529799", "0.52820045", "0.5280693", "0.52765685", "0.5274689", "0.5259794", "0.52555513", "0.5254101", "0.5246622", "0.5243576", "0.52400917", "0.5236678", "0.5236086", "0.5233217" ]
0.53740126
68
This function gets executed when the operator '>' is used on the double
@Override public InterpreterValue bigger(InterpreterValue v) { // If the given value is a IntegerValue then check if the value is bigger than // the own value and return a BooleanValue if(v instanceof IntegerValue) return BooleanValue.from(getValue() > ((IntegerValue) v).getValue()); // If the given value is a DoubleValue then check if the value is bigger than // the own value and return a BooleanValue if(v instanceof DoubleValue) return BooleanValue.from(getValue() > ((DoubleValue) v).getValue()); // In other case just throw an error throw new Error("Operator '>' is not defined for type integer and " + v.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic int compare(Double o1, Double o2) {\n\t\t\treturn o2.compareTo(o1);\r\n\t\t}", "public boolean greaterThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) == 1;\n }", "@Override\r\n\t\tpublic int compare(Double arg0, Double arg1) {\n\t\t\treturn arg0.compareTo(arg1);\r\n\t\t}", "@Override\r\n\tpublic int compareTo(Double another) {\n\t\treturn 0;\r\n\t}", "public void testGreaterThanElement() {\n\t // fail(\"testGreaterThanElement\");\n \tCircuit circuit = new Circuit();\n \tDouble x1 = 0.5;\n \tAnd and = (And) circuit.getFactory().getGate(Gate.AND);\n\t\tNot not = (Not) circuit.getFactory().getGate(Gate.NOT);\n\t\tGte gte1 = (Gte) circuit.getFactory().getGate(Gate.GTE);\n \tand.setLeftInput(x1);\n \tnot.setInput(x1);\n \tnot.eval();\n \tand.setRightInput(not.getOutput());\n\t\tand.eval();\n \tgte1.setLeftInput(and.getOutput());\n\t\tgte1.setRightInput(x1);\n \tassertEquals( new Double(0.0), gte1.eval());\n }", "public static void main(String[] args) {\n\t\t\n\t\tdouble num1=18.6, num2=11.5;\n\t\t\n\t\tif(num1>num2) {\n\t\t\tSystem.out.println(\"Double value \"+num1+\" is larger than \"+num2);\n\t\t}else {\n\t\t\tSystem.out.println(\"Double value \"+num1+\" is smaller than \"+num2);\n\t\t}\n\t\t\n\t\t\t\n\t}", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tif(o1.getValue()>o2.getValue()){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.getValue()<o2.getValue()){\n\t\t\t\t\treturn 1;\n\t\t\t\t}else{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic int compare(Point arg0, Point arg1) {\n\t\t\t return Double.compare(arg0.getX(), arg1.getX());\n\t\t\t}", "@Override\r\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\tif ((o1.getValue()-o2.getValue())>0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} else if ((o1.getValue()-o2.getValue())<0) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t}", "public boolean greaterOrEqualThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) >= 0;\n }", "public boolean Mayor(Object obj1, Object obj2){\n return (Double.parseDouble(obj1.toString()) > Double.parseDouble(obj2.toString()));\n }", "@Override\r\n\t\t\tpublic boolean accept(double t) {\n\t\t\t\treturn t>0.5;\r\n\t\t\t}", "@Override\r\n public int compare(Pair<Integer, Double> o1, Pair<Integer, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1,\n\t\t\t\t\tEntry<Integer, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "public static int compare(double obj1,double obj2){\n\t\tif(obj1 == obj2) { return 0; }\n\t\telse if(obj1 > obj2){\n\t\t\treturn 1;\n\t\t} else{ return -1; }\n\t}", "public boolean lessThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) == -1;\n }", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\treturn -(int) (o1.getValue().compareTo(o2.getValue()));\n\t\t\t}", "@Override\r\n\t\t\tpublic int compare(SimpleEntry<Integer, Double> arg0, SimpleEntry<Integer, Double> arg1)\r\n\t\t\t{\r\n\t\t\t\treturn arg1.getValue().compareTo(arg0.getValue());\r\n\t\t\t}", "default boolean gt(int lhs, int rhs) {\r\n return lt(rhs,lhs);\r\n }", "String getGreater();", "public boolean greaterP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) > (yRatio.numerator * x.denominator));\n }\n }\n }", "public boolean a(double paramDouble)\r\n/* 28: */ {\r\n/* 29: 44 */ double d1 = aQ().a() * 4.0D;\r\n/* 30: 45 */ d1 *= 64.0D;\r\n/* 31: 46 */ return paramDouble < d1 * d1;\r\n/* 32: */ }", "public final boolean greaterThan() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue > topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isDouble();", "@Override\n public boolean isGreater(Query e1, Query e2) {\n return this.compare(e1,e2) == this.GREATER;\n }", "public Comparison compare(double left, double right) {\n return checkResult(Double.compare(left, right));\n }", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1, Entry<String, Double> o2) {\n\t\t\t\treturn o1.getValue().compareTo(o2.getValue());\n\t\t\t}", "public void insertionNumberSortDouble()\n {\n\t for(int j=1; j<AL.size(); j++)\n\t {\n\t\t Generics temp = AL.get(j);\n\t\t int possibleIndex = j;\n\t\t \n\t\t while(possibleIndex>0 && Double.parseDouble(AL.get(possibleIndex - 1).toString()) < Double.parseDouble(temp.toString()))\n\t\t {\n\t\t\t AL.set(possibleIndex, AL.get(possibleIndex -1));\n\t\t\t possibleIndex--;\n\t\t\t \n\t\t }\n\t\t \n\t\t AL.set(possibleIndex, temp);\n\t }\n \n }", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "boolean hasGt();", "public static boolean almost_greater(double a, double b) {\n if (almost_equals(a,b)) {\n return false;\n }\n return a > b;\n }", "static double getMax(double a, double b) {\n\t\treturn (a > b) ? a : b;\n\t}", "public boolean lessOrEqualThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) <= 0;\n }", "public static void main(String [] args){\n double a= 5+(4*5)/5;\n double b= (6*4%2)+15;\n System.out.println(\"a = \"+a);\n System.out.println(\"b = \"+b); \n \n //Ejemplo de operadores relacionales.\n boolean resultado1= a > b;\n boolean resultado2= a !=b; \n System.out.println(\"R1= \"+resultado1);\n System.out.println(\"R2= \"+resultado2); \n }", "@Override\n public int compareTo(UnconstrainedBidElement o) {\n return Double.compare(o.demandWatt, demandWatt);\n }", "public final boolean lessThan() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue < topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public AbstractBoolean greater(Interval other){\n\t\ttry {\n\t\t\t// If this.max > this.min then True\n\t\t\tif ((!this.low.equals(\"-Inf\"))\n\t\t\t\t\t&& (!other.high.equals(\"+Inf\"))\n\t\t\t\t\t&& Integer.parseInt(this.low) > Integer.parseInt(other.high))\n\t\t\t\treturn AbstractBoolean.True();\n\n\t\t\t// If this.min < other.max then False\n\t\t\tif ((!other.low.equals(\"-Inf\"))\n\t\t\t\t\t&& (!this.high.equals(\"+Inf\"))\n\t\t\t\t\t&& Integer.parseInt(this.high) < Integer.parseInt(other.low))\n\t\t\t\treturn AbstractBoolean.False();\n\n\t\t} catch (NumberFormatException e){\n\t\t\treturn AbstractBoolean.TopBool();\n\t\t}\n\n\t\treturn AbstractBoolean.TopBool();\n\t}", "boolean hasDouble();", "@Override\n public int compare(Pair<Channel, Double> lhs, Pair<Channel, Double> rhs) {\n return rhs.second.compareTo(lhs.second);\n }", "public static Object gt(Object val1, Object val2) {\n\t\tif (isFloat(val1) && isFloat(val2)) {\n\t\t\treturn ((BigDecimal) val1).compareTo((BigDecimal) val2) > 0;\n\t\t} else if (isInt(val1) && isInt(val2)) {\n\t\t\treturn ((BigInteger) val1).compareTo((BigInteger) val2) > 0;\n\t\t}\n\t\tthrow new OrccRuntimeException(\"type mismatch in gt\");\n\t}", "public static int compare(double v1, double v2) {\n return ( v1 - v2 ) > 0 ? 1 : ( ( v1 - v2 ) == 0 ? 0 : -1 );\n }", "public boolean isHigher(Operator o){\n if(indent > o.indent){\n return true;\n }else{\n return prec > o.prec;\n }\n }", "public final boolean greaterThanEquals() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue >= topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public int compare(Key<Double, Double> a, Key<Double, Double> b){\n\t\t\tif (a.getFirst() < b.getFirst()){\n\t\t\t\treturn -1;\n\t\t\t} else if (a.getFirst() == b.getFirst()){\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}", "public Snippet visit(GreaterThanEqualExpression n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t\t Snippet f0 = n.identifier.accept(this, argu);\n\t\t n.nodeToken.accept(this, argu);\n\t\t Snippet f2 = n.identifier1.accept(this, argu);\n\t\t _ret.returnTemp = f0.returnTemp+\" >= \"+f2.returnTemp;\n\t return _ret;\n\t }", "public static void greaterThan(double arg, double min, String argName) {\r\n if (arg <= min) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\" must be greater than \" + min);\r\n }\r\n }", "public int compareTo(PointDouble other) { // override less than operator\n if (Math.abs(x - other.x) > EPS) // useful for sorting\n return (int)Math.ceil(x - other.x); // first: by x-coordinate\n else if (Math.abs(y - other.y) > EPS)\n return (int)Math.ceil(y - other.y); // second: by y-coordinate\n else\n return 0; // they are equal\n }", "@Override\n\tpublic void visit(DoubleType n) {\n\t\t\n\t}", "BooleanExpression gt(ComparableExpression<? extends T> expr);", "public boolean matches(Double value) {\n\tif(this.key2==0&&this.key1<=value)return true;\n\t if(this.key1<=value&&this.key2>value)return true;\n\t return false;\n}", "public static BinaryExpression greaterThan(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\t\t\n\t}", "private boolean compare(ValueType first, ValueType second) {\r\n // TODO\r\n return false;\r\n }", "public boolean greaterEqualP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) >= (yRatio.numerator * x.denominator));\n }\n }\n }", "float getGt();", "private boolean isDropped(double value) {\n double tar = rd.nextDouble();\n return value > tar;\n }", "@Override\n\tdouble evaluate() {\n\t\treturn Math.abs(operand.getVal());\n\t}", "public int compare( Object o1, Object o2 )\n throws ClassCastException\n {\n Double d1 = (Double) o1;\n Double d2 = (Double) o2;\n\n return (int) ( d1.doubleValue() - d2.doubleValue() );\n }", "public double getMaxDoubleValue();", "public static void greaterThanOrEqual(double arg, double min, String argName) {\r\n if (arg < min) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\" must be greater than or equal to \" + min);\r\n }\r\n }", "public double compare(double x, double y) {\n\t\tif (Math.abs(x - y) > _threshold)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn 1;\n\t}", "@Override\r\n\t\tpublic int compare(String2DoubleNode o1, String2DoubleNode o2) {\n\t\t\treturn o2.value.compareTo(o1.value);\r\n\t\t}", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\n\t}", "public static boolean almost_less(double a, double b) {\n if (almost_equals(a, b)) {\n return false;\n }\n return a < b;\n }", "private Object eval(RelExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n if (expr.getExpr().size() == 2) {\n Object res2 = eval(expr.getExpr().get(1));\n String opt = expr.getOpt();\n\n if (\"==\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = ((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = ((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = ((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"!=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = !((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = !((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = !((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res < (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res <= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res > (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res >= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "public double getMinDoubleValue();", "public boolean isDouble() {\n return false;\n }", "public final boolean lessThanEquals() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue <= topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private RegressionTreeNode traverseNumericalNode(Double v) {\n\t\tdouble val = (Double) this.value;\n\t\tif(v.compareTo(val) <= 0){\n\t\t\treturn this.leftChild;\n\t\t}else{\n\t\t\treturn this.rightChild;\n\t\t}\n\t}", "double getDoubleValue2();", "private Expr comparison() {\n Expr expr = addition();\n\n while(match(GREATER, GREATER_EQUAL, LESS, LESS_EQUAL)) { // These variable length arguments are real convenient\n Token operator = previous();\n Expr right = addition();\n expr = new Expr.Binary(expr, operator, right);\n }\n\n return expr;\n }", "public static RuntimeValue greaterThan(RuntimeValue left, RuntimeValue right) throws RuntimeException {\n if (isDiscreteIntSamples(left, right)) {\n return new RuntimeValue(\n RuntimeValue.Type.DISCRETE_BOOL_SAMPLE,\n Operators.greaterThanIntegers(left.getDiscreteIntSample(), right.getDiscreteIntSample())\n );\n }\n\n if (isDiscreteFloatSamples(left, right)) {\n return new RuntimeValue(\n RuntimeValue.Type.DISCRETE_BOOL_SAMPLE,\n Operators.greaterThanFloats(left.getDiscreteFloatSample(), right.getDiscreteFloatSample())\n );\n }\n\n if (isDiscreteFloatSample(right) && isContinuousSample(left)) {\n return new RuntimeValue(\n RuntimeValue.Type.DISCRETE_BOOL_SAMPLE,\n Operators.not(Operators.lessThanContinuous(left.getContinuousSample(), right.getDiscreteFloatSample()))\n );\n }\n\n if (isDiscreteFloatSample(left) && isContinuousSample(right)) {\n return new RuntimeValue(\n RuntimeValue.Type.DISCRETE_BOOL_SAMPLE,\n Operators.lessThanContinuous(right.getContinuousSample(), left.getDiscreteFloatSample())\n );\n }\n\n throw new RuntimeException(\"Comparing incompatible types\");\n }", "public Value<?> gt(Value<?> v) {\r\n Integer cmp = compare(v);\r\n if (cmp == null)\r\n throw unsupported(\">\", v);\r\n return new ValueBoolean(cmp > 0);\r\n }", "private boolean isGreater(BigInt rhs) {\n if (isPositive && !rhs.isPositive) {\n // rhs is negative and this is positive\n return true;\n } else if (!isPositive && rhs.isPositive) {\n // rhs is positive and this is negative\n return false;\n }\n // The numbers have the same sign\n\n if (number.size() > rhs.number.size()) {\n // This is longer than the other, so this is bigger if it positive\n return isPositive;\n } else if (number.size() < rhs.number.size()) {\n // This is shorter than the other, so the other is bigger if this positive\n return !isPositive;\n }\n\n for (int i = number.size() - 1; i >= 0; --i) {\n if (number.get(i) > rhs.number.get(i)) {\n return isPositive;\n } else if (number.get(i) < rhs.number.get(i)) {\n return !isPositive;\n }\n }\n\n return false;\n }", "public boolean HasGreaterUtility(DijkstraDistance d2, Method source)\n\t{\n\t\tdouble thisQuality = this.quality - source.getPosition().distance(this.position);\n\t\tdouble d2Quality = d2.quality - source.getPosition().distance(d2.position);\n\t\tboolean result = thisQuality>d2Quality;\n\t\tif (result)\n\t\t{\n\t\t\tMain.Message(debugFlag, \"[DijkstraDistance] Utility \" + source.label + \"-\" + nodeName + \" (\" + thisQuality + \")>\"\n\t\t\t\t\t+ source.label + \"-\" + d2.nodeName + \"(\" + d2Quality + \")\");\n\t\t}\n\t\treturn result;\n\t}", "public LessThan() {\n this.toCompare = new double[2];\n this.index = 0;\n }", "public boolean valueLargerThan(Money other);", "public static void main(String[] args) {\n\t\t\n\t\tint result = BoundedType.compare(3.14, 4.15);\n\t\tSystem.out.println(result);\n\t\t\n\t\tArrayList<String> list;\n\t}", "@Override\n public int compareTo(DoubleVector2 o) {\n return (getVectorOne().getSteps() + getVectorTwo().getSteps()) - (o.getVectorOne().getSteps() + o.getVectorTwo().getSteps());\n }", "public static boolean almost_greater(double a, double b, long maxUlps) {\n if (almost_equals(a, b, maxUlps)) {\n return false;\n }\n return a > b;\n }", "public boolean greaterthan(Inatnum a) throws Exception{\n if((this.isZero() &&a.isZero())==true) {return false;}//if both this and a are both zero, it returns false because it is not greater than. \n if((this.isZero())==false&&a.isZero()==true) {return true;}//conditional returns if a is greater than this.\n if((this.isZero())==true&&a.isZero()==false) {return false;}//conditional returns if this is greater than a.\n else {return this.pred().greaterthan(a.pred()); }//recursive call to subtract one from this and a.\n }", "@Override\n public Comparator<Object> thenComparingDouble(final ToDoubleFunction<?> p0) {\n // This method could not be decompiled.\n // \n // Could not show original bytecode, likely due to the same error.\n // \n // The error that occurred was:\n // \n // java.lang.NullPointerException\n // at com.strobel.assembler.metadata.WildcardType.containsGenericParameters(WildcardType.java:55)\n // at com.strobel.assembler.metadata.TypeReference.containsGenericParameters(TypeReference.java:48)\n // at com.strobel.assembler.metadata.MethodReference.containsGenericParameters(MethodReference.java:79)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2497)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1029)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1656)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:672)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:655)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:365)\n // at com.strobel.decompiler.ast.TypeAnalysis.run(TypeAnalysis.java:96)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:109)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:214)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformCall(AstMethodBodyBuilder.java:1162)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:1009)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:554)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformNode(AstMethodBodyBuilder.java:392)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformBlock(AstMethodBodyBuilder.java:333)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:294)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at us.deathmarine.luyten.FileSaver.doSaveJarDecompiled(FileSaver.java:192)\n // at us.deathmarine.luyten.FileSaver.access$300(FileSaver.java:45)\n // at us.deathmarine.luyten.FileSaver$4.run(FileSaver.java:112)\n // at java.lang.Thread.run(Unknown Source)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "Double getValue();", "public static void main(String[] args) {\n\t\n\tScanner scan=new Scanner(System.in);\n\tSystem.out.println(\"2 sayi giriniz\");\n\tdouble sayi1 = scan.nextDouble();\n\tdouble sayi2 = scan.nextDouble();\n\t\n\tdouble sonuc= sayi1 > sayi2 ? sayi1 :sayi2;\n\tSystem.out.println(sonuc);\n\t\n\tscan.close();\n}", "float getLt();", "public boolean greaterThan(XObject obj2)\n throws javax.xml.transform.TransformerException{\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.lessThan(this);\n return this.num()>obj2.num();\n }", "public static int comp( double a, double b ) {\n return equal( a, b, REL_TOL, ABS_TOL ) ? 0 : (a < b ? -1 : 1 );\n }", "public static boolean doubleCompare(double accuracy, double d1, double d2)\n {\n if (Math.abs(d1 - d2) < accuracy) { return true; }\n return false;\n }", "@Override\n\tpublic int compareTo(Object other) {\n\t\treturn Double.compare(this.getHeuristique(),\n\t\t\t\t((Noeud) other).getHeuristique());\n\t}", "public boolean lessP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) < (yRatio.numerator * x.denominator));\n }\n }\n }", "public boolean isDouble() {\n return this.data instanceof Double;\n }", "public void testComparisons() {\n\tfinal double small = Math.pow(2.0, -42);\n\n\t// Input: a, b\n\tdouble[][] input = new double[][] { new double[] { 1, 1 },\n\t\tnew double[] { 1, 2 }, new double[] { 1, 1 - small / 10 },\n\t\tnew double[] { 1, 1 + small / 10 },\n\n\t\tnew double[] { 0, 1 }, new double[] { 0, 0 },\n\t\tnew double[] { 0, -1 }, new double[] { 0, small / 100 },\n\t\tnew double[] { 2100000001.0001, 2100000001.0003 }, };\n\n\t// Output: less, equals\n\tboolean[][] output = new boolean[][] { new boolean[] { false, true },\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true },\n\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true }, };\n\n\tfor (int i = 0; i < input.length; ++i) {\n\t boolean l = StandardFloatingPointComparator.getDouble().less(\n\t\t input[i][0], input[i][1]);\n\t boolean e = StandardFloatingPointComparator.getDouble().equals(\n\t\t input[i][0], input[i][1]);\n\n\t boolean ne = StandardFloatingPointComparator.getDouble().notEquals(\n\t\t input[i][0], input[i][1]);\n\t boolean le = StandardFloatingPointComparator.getDouble()\n\t\t .lessOrEquals(input[i][0], input[i][1]);\n\t boolean g = StandardFloatingPointComparator.getDouble().greater(\n\t\t input[i][0], input[i][1]);\n\t boolean ge = StandardFloatingPointComparator.getDouble()\n\t\t .greaterOrEquals(input[i][0], input[i][1]);\n\n\t boolean less = output[i][0];\n\t boolean equals = output[i][1];\n\n\t boolean notEquals = !equals;\n\t boolean lessOrEquals = less || equals;\n\t boolean greater = !lessOrEquals;\n\t boolean greaterOrEquals = !less;\n\n\t assertFalse(l != less);\n\t assertFalse(g != greater);\n\t assertFalse(e != equals);\n\t assertFalse(ne != notEquals);\n\t assertFalse(le != lessOrEquals);\n\t assertFalse(ge != greaterOrEquals);\n\t}\n }", "@Override\n public InterpreterValue bigger_equals(InterpreterValue v) {\n\n // If the given value is a IntegerValue then check if the value is bigger than\n // or equal to the own value and return a BooleanValue\n if(v instanceof IntegerValue) return BooleanValue.from(getValue() >= ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue then check if the value is bigger than\n // or equal to the own value and return a BooleanValue\n if(v instanceof DoubleValue) return BooleanValue.from(getValue() >= ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '>=' is not defined for type integer and \" + v.getName());\n\n }", "public final BooleanDataValue greaterThan(DataValueDescriptor left,\n\t\t\t\t\t\t\t DataValueDescriptor right)\n\t\t\t\t\t\t\t\tthrows StandardException\n\t{\n\t\tboolean isGreaterThan = false;\n\n\t\tif (left.isNull() || right.isNull())\n\t\t{\n\t\t\tisGreaterThan = false;\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tisGreaterThan = SQLBinary.compare(left.getBytes(), right.getBytes()) > 0;\n\t\t}\n\n\t\treturn SQLBoolean.truthValue(left,\n\t\t\t\t\t\t\t\t\t right,\n\t\t\t\t\t\t\t\t\t isGreaterThan);\n\t}", "final boolean operator_less(final Sample x) {\n for (int i = 0; i < positive_features.size(); i++) {\n if (i >= x.positive_features.size()) return false;\n int v0 = positive_features.get(i);\n int v1 = x.positive_features.get(i);\n if (v0 < v1) return true;\n if (v0 > v1) return false;\n }\n return false;\n }", "private double min(double a, double b) {\n if (a > b) {\n return b;\n }\n return a;\n }", "public static boolean compareNumerics(Parser parser, ResultValue resOp1, ResultValue resOp2, String operator)\r\n {\r\n \tdouble val1 = Numeric.getDoubleValue(resOp1.value);\r\n \tdouble val2 = Numeric.getDoubleValue(resOp2.value);\r\n \t\r\n \t\r\n \t\r\n \tswitch(operator)\r\n \t{\r\n \t\tcase \">=\" :\r\n \t\t\tif(val1 >= val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse \r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \">\" :\r\n \t\t\tif(val1 > val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \"<=\" :\r\n \t\t\tif(val1 <= val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \"<\" :\r\n \t\t\tif(val1 < val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \"!=\" :\r\n \t\t\tif(val1 != val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tcase \"==\" :\r\n \t\t\tif(val1 == val2)\r\n \t\t\t\treturn true;\r\n \t\t\telse\r\n \t\t\t\treturn false;\r\n \t\t\r\n \t\tdefault :\r\n \t\t\tSystem.out.println(\"Error in compare Numerics, \" + operator + \" is not valid\");\r\n \t\t\treturn false;\r\n \t\t\r\n \t\t\t\r\n \t\t\r\n \t}\r\n }", "public double evaluateAsDouble();", "@Override\r\n\tpublic int compare(Device d1, Device d2) {\n\t\treturn d1.getPower()- d2.getPower();\r\n\t}", "public void removeSmaller(double value){\r\n\t DoubleNode cursor2; \r\n\tfor(cursor = head; cursor != null; cursor = cursor.getLink()){\r\n\t\tif(cursor.getData() < value){\r\n\t\t\tif(cursor == head){\r\n\t\t\t\thead = head.getLink(); \r\n\t\t\t\tmanyNodes--; \r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcursor2 = cursor; \r\n\t\t\t\tthis.removeCurrent();\r\n\t\t\t\tcursor = cursor2;\r\n\t\t\t\tmanyNodes--; \r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n }" ]
[ "0.6790741", "0.6781772", "0.67744094", "0.67177486", "0.6526389", "0.647047", "0.6344082", "0.63393766", "0.6335748", "0.63289255", "0.62778544", "0.62740386", "0.6273517", "0.62591445", "0.62129426", "0.6179179", "0.61558384", "0.61328006", "0.6080622", "0.6050456", "0.6011609", "0.60018986", "0.5985939", "0.59858924", "0.5967438", "0.5964802", "0.5959872", "0.59573954", "0.5944597", "0.5934607", "0.58862436", "0.5841042", "0.5828676", "0.5818315", "0.5808166", "0.57965714", "0.578175", "0.57810175", "0.57763875", "0.5768309", "0.5731509", "0.57233757", "0.57194906", "0.56828517", "0.5673944", "0.56735694", "0.56647986", "0.5648477", "0.56456256", "0.56405014", "0.56380546", "0.56214267", "0.56152326", "0.5579233", "0.5573945", "0.5571138", "0.5571039", "0.5562526", "0.5550346", "0.55501866", "0.5543492", "0.5542757", "0.5542142", "0.5541198", "0.55338496", "0.5514975", "0.55069894", "0.55040944", "0.5503136", "0.54975307", "0.5490606", "0.5490364", "0.54807794", "0.5469907", "0.54548174", "0.54449415", "0.5444104", "0.5437132", "0.54310167", "0.5427532", "0.5419415", "0.541036", "0.5361074", "0.53442955", "0.5342263", "0.5330573", "0.5330313", "0.53277636", "0.5324242", "0.53204757", "0.5319993", "0.53180134", "0.53126013", "0.5307589", "0.53070825", "0.5302812", "0.529033", "0.5290159", "0.52875495", "0.52809775" ]
0.5627306
51
This function gets executed when the operator '<' is used on the double
@Override public InterpreterValue smaller(InterpreterValue v) { // If the given value is a IntegerValue then check if the value is smaller than // the own value and return a BooleanValue if(v instanceof IntegerValue) return BooleanValue.from(getValue() < ((IntegerValue) v).getValue()); // If the given value is a DoubleValue then check if the value is smaller than // the own value and return a BooleanValue if(v instanceof DoubleValue) return BooleanValue.from(getValue() < ((DoubleValue) v).getValue()); // In other case just throw an error throw new Error("Operator '<' is not defined for type integer and " + v.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic int compare(Double arg0, Double arg1) {\n\t\t\treturn arg0.compareTo(arg1);\r\n\t\t}", "@Override\r\n\t\tpublic int compare(Double o1, Double o2) {\n\t\t\treturn o2.compareTo(o1);\r\n\t\t}", "public boolean lessThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) == -1;\n }", "@Override\r\n\tpublic int compareTo(Double another) {\n\t\treturn 0;\r\n\t}", "@Override\n\t\t\tpublic int compare(Point arg0, Point arg1) {\n\t\t\t return Double.compare(arg0.getX(), arg1.getX());\n\t\t\t}", "@Override\r\n\t\t\tpublic int compare(SimpleEntry<Integer, Double> arg0, SimpleEntry<Integer, Double> arg1)\r\n\t\t\t{\r\n\t\t\t\treturn arg1.getValue().compareTo(arg0.getValue());\r\n\t\t\t}", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1,\n\t\t\t\t\tEntry<Integer, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "@Override\r\n public int compare(Pair<Integer, Double> o1, Pair<Integer, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }", "@Override\r\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\tif ((o1.getValue()-o2.getValue())>0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} else if ((o1.getValue()-o2.getValue())<0) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\treturn -(int) (o1.getValue().compareTo(o2.getValue()));\n\t\t\t}", "public LessThan() {\n this.toCompare = new double[2];\n this.index = 0;\n }", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tif(o1.getValue()>o2.getValue()){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.getValue()<o2.getValue()){\n\t\t\t\t\treturn 1;\n\t\t\t\t}else{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}", "public int compareTo(PointDouble other) { // override less than operator\n if (Math.abs(x - other.x) > EPS) // useful for sorting\n return (int)Math.ceil(x - other.x); // first: by x-coordinate\n else if (Math.abs(y - other.y) > EPS)\n return (int)Math.ceil(y - other.y); // second: by y-coordinate\n else\n return 0; // they are equal\n }", "public void insertionNumberSortDouble()\n {\n\t for(int j=1; j<AL.size(); j++)\n\t {\n\t\t Generics temp = AL.get(j);\n\t\t int possibleIndex = j;\n\t\t \n\t\t while(possibleIndex>0 && Double.parseDouble(AL.get(possibleIndex - 1).toString()) < Double.parseDouble(temp.toString()))\n\t\t {\n\t\t\t AL.set(possibleIndex, AL.get(possibleIndex -1));\n\t\t\t possibleIndex--;\n\t\t\t \n\t\t }\n\t\t \n\t\t AL.set(possibleIndex, temp);\n\t }\n \n }", "public static int compare(double obj1,double obj2){\n\t\tif(obj1 == obj2) { return 0; }\n\t\telse if(obj1 > obj2){\n\t\t\treturn 1;\n\t\t} else{ return -1; }\n\t}", "public double getMinDoubleValue();", "private static boolean lt(Comparable lhs, Comparable rhs) \n {\n return lhs.compareTo(rhs) < 0;\n }", "private boolean iflt(PyObject x, PyObject y) {\n \n if (this.compare == null) {\n /* NOTE: we rely on the fact here that the sorting algorithm\n only ever checks whether k<0, i.e., whether x<y. So we\n invoke the rich comparison function with _lt ('<'), and\n return -1 when it returns true and 0 when it returns\n false. */\n return x._lt(y).__nonzero__();\n }\n \n PyObject ret = this.compare.__call__(x, y);\n \n if (ret instanceof PyInteger) {\n int v = ((PyInteger)ret).getValue();\n return v < 0;\n }\n throw Py.TypeError(\"comparision function must return int\");\n }", "public Comparison compare(double left, double right) {\n return checkResult(Double.compare(left, right));\n }", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1, Entry<String, Double> o2) {\n\t\t\t\treturn o1.getValue().compareTo(o2.getValue());\n\t\t\t}", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "public double getMinimumDouble() {\n/* 201 */ return this.min;\n/* */ }", "public int compare(Key<Double, Double> a, Key<Double, Double> b){\n\t\t\tif (a.getFirst() < b.getFirst()){\n\t\t\t\treturn -1;\n\t\t\t} else if (a.getFirst() == b.getFirst()){\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}", "public static void main(String[] args) {\n\t\t\n\t\tdouble num1=18.6, num2=11.5;\n\t\t\n\t\tif(num1>num2) {\n\t\t\tSystem.out.println(\"Double value \"+num1+\" is larger than \"+num2);\n\t\t}else {\n\t\t\tSystem.out.println(\"Double value \"+num1+\" is smaller than \"+num2);\n\t\t}\n\t\t\n\t\t\t\n\t}", "public boolean lessOrEqualThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) <= 0;\n }", "@Override\n public boolean lessThan(Object o1, Object o2) {\n return ((MI)o1).value < ((MI)o2).value;\n }", "@Override\n public int compareTo(UnconstrainedBidElement o) {\n return Double.compare(o.demandWatt, demandWatt);\n }", "public boolean a(double paramDouble)\r\n/* 28: */ {\r\n/* 29: 44 */ double d1 = aQ().a() * 4.0D;\r\n/* 30: 45 */ d1 *= 64.0D;\r\n/* 31: 46 */ return paramDouble < d1 * d1;\r\n/* 32: */ }", "@Override\n\tpublic void visit(LessNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam expresiile din cei 2 fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger s2 = 0;\n\t\tInteger s1 = 0;\n\t\t/**\n\t\t * preluam rezultatele evaluarii si verificam daca primul este mai mic\n\t\t * decat la doilea ,setand corespunzator valoarea din nodul curent in\n\t\t * functie de rezultatul comparatiei\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\ts1 = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\t\t} else {\n\t\t\ts1 = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ts2 = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\t\t} else {\n\t\t\ts2 = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (s1 < s2) {\n\t\t\tnode.setName(\"true\");\n\t\t} else {\n\t\t\tnode.setName(\"false\");\n\t\t}\n\t}", "@Override\r\n\tpublic boolean isLessThan(Node node) {\n\t\treturn false;\r\n\t}", "final boolean operator_less(final Sample x) {\n for (int i = 0; i < positive_features.size(); i++) {\n if (i >= x.positive_features.size()) return false;\n int v0 = positive_features.get(i);\n int v1 = x.positive_features.get(i);\n if (v0 < v1) return true;\n if (v0 > v1) return false;\n }\n return false;\n }", "private double min(double a, double b) {\n if (a > b) {\n return b;\n }\n return a;\n }", "public static Object lt(Object val1, Object val2) {\n\t\tif (isFloat(val1) && isFloat(val2)) {\n\t\t\treturn ((BigDecimal) val1).compareTo((BigDecimal) val2) < 0;\n\t\t} else if (isInt(val1) && isInt(val2)) {\n\t\t\treturn ((BigInteger) val1).compareTo((BigInteger) val2) < 0;\n\t\t}\n\t\tthrow new OrccRuntimeException(\"type mismatch in lt\");\n\t}", "float getLt();", "default boolean gt(int lhs, int rhs) {\r\n return lt(rhs,lhs);\r\n }", "public double getLow() {return low;}", "public double lower()\n\t{\n\t\treturn _dblLower;\n\t}", "double getMin();", "double getMin();", "@Test\n\tpublic void lessThanTest() {\n\t\tassertTrue(x.less(y));\n\t\tassertFalse(y.less(x));\n\t}", "public abstract DoublePredicate lowerPredicate(double lowerBound);", "Double getMinimumValue();", "public static int compare(double v1, double v2) {\n return ( v1 - v2 ) > 0 ? 1 : ( ( v1 - v2 ) == 0 ? 0 : -1 );\n }", "public int compare( Object o1, Object o2 )\n throws ClassCastException\n {\n Double d1 = (Double) o1;\n Double d2 = (Double) o2;\n\n return (int) ( d1.doubleValue() - d2.doubleValue() );\n }", "@Override\n public int compare(Pair<Channel, Double> lhs, Pair<Channel, Double> rhs) {\n return rhs.second.compareTo(lhs.second);\n }", "private double min(double value1 , double value2){\n double minValue = 0.0;\n if(value1 <= value2){\n minValue = value1;\n }else{\n minValue = value2;\n }\n\n return minValue;\n }", "public final boolean lessThan() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue < topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean almost_less(double a, double b) {\n if (almost_equals(a, b)) {\n return false;\n }\n return a < b;\n }", "@Override\n\t\tprotected boolean lessThan(final Entry hitA, final Entry hitB) {\n\t\t\tassert hitA != hitB;\n\t\t\tassert hitA.mSlot != hitB.mSlot;\n\n\t\t\tfinal int c = mOneReverseMul * mFirstComparator.compare(hitA.mSlot, hitB.mSlot);\n\t\t\tif (c != 0) \n\t\t\t\treturn c > 0;\n\n\t\t\t\t// avoid random sort order that could lead to duplicates (bug #31241):\n\t\t\t\treturn hitA.getDoc() > hitB.getDoc();\n\t\t}", "private boolean less(Comparable a, Comparable b) {\n return a.compareTo(b) < 0;\n }", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\t\t\n\t}", "private int handleIncomparablePrimitives(Object x, Object y) {\n int xCost = getPrimitiveValueCost(x);\n int yCost = getPrimitiveValueCost(y);\n int res = Integer.compare(xCost, yCost);\n return ascending ? res : -res;\n }", "private RegressionTreeNode traverseNumericalNode(Double v) {\n\t\tdouble val = (Double) this.value;\n\t\tif(v.compareTo(val) <= 0){\n\t\t\treturn this.leftChild;\n\t\t}else{\n\t\t\treturn this.rightChild;\n\t\t}\n\t}", "@Override\n\tpublic void visit(DoubleType n) {\n\t\t\n\t}", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\n\t}", "public double getMinValue() {\r\n\t\treturn minValue;\r\n\t}", "@Override\r\n\t\tpublic int compare(String2DoubleNode o1, String2DoubleNode o2) {\n\t\t\treturn o2.value.compareTo(o1.value);\r\n\t\t}", "public void testGreaterThanElement() {\n\t // fail(\"testGreaterThanElement\");\n \tCircuit circuit = new Circuit();\n \tDouble x1 = 0.5;\n \tAnd and = (And) circuit.getFactory().getGate(Gate.AND);\n\t\tNot not = (Not) circuit.getFactory().getGate(Gate.NOT);\n\t\tGte gte1 = (Gte) circuit.getFactory().getGate(Gate.GTE);\n \tand.setLeftInput(x1);\n \tnot.setInput(x1);\n \tnot.eval();\n \tand.setRightInput(not.getOutput());\n\t\tand.eval();\n \tgte1.setLeftInput(and.getOutput());\n\t\tgte1.setRightInput(x1);\n \tassertEquals( new Double(0.0), gte1.eval());\n }", "@Override\n public boolean isLess(Query e1, Query e2) {\n return this.compare(e1,e2) == this.LESS;\n }", "ComparableExpression<T> min();", "public static int comp( double a, double b ) {\n return equal( a, b, REL_TOL, ABS_TOL ) ? 0 : (a < b ? -1 : 1 );\n }", "private boolean compare(ValueType first, ValueType second) {\r\n // TODO\r\n return false;\r\n }", "public boolean isDouble();", "private double getMin() {\n return min;\n }", "@Override\n\tprotected double getLowerBound() {\n\t\treturn 0;\n\t}", "@Override\n public int compare(final Triangle t1, final Triangle t2) {\n final Vec4 min1 = t1.getMin();\n final Vec4 min2 = t2.getMin();\n return Double.compare(min1.get(splitType), min2.get(splitType));\n }", "public void setLow(double value){low = value;}", "public boolean Mayor(Object obj1, Object obj2){\n return (Double.parseDouble(obj1.toString()) > Double.parseDouble(obj2.toString()));\n }", "public double minValue() {\n return 0;\r\n }", "public static double min(double a, double b) {\t\n\t\treturn ((a<b)?a:b);\n\t}", "public AbstractBoolean less(Interval other){\n\t\ttry {\n\t\t\t// If this.max < this.min then True\n\t\t\tif ((!this.high.equals(\"+Inf\"))\n\t\t\t\t\t&& (!other.low.equals(\"-Inf\"))\n\t\t\t\t\t&& Integer.parseInt(this.high) < Integer.parseInt(other.low))\n\t\t\t\treturn AbstractBoolean.True();\n\n\t\t\t// If this.min > other.max then False\n\t\t\tif ((!other.high.equals(\"+Inf\"))\n\t\t\t\t\t&& (!this.low.equals(\"-Inf\"))\n\t\t\t\t\t&& Integer.parseInt(this.low) > Integer.parseInt(other.high))\n\t\t\t\treturn AbstractBoolean.False();\n\n\t\t} catch (NumberFormatException e){\n\t\t\treturn AbstractBoolean.TopBool();\n\t\t}\n\n\t\treturn AbstractBoolean.TopBool();\n\t}", "public boolean lessP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) < (yRatio.numerator * x.denominator));\n }\n }\n }", "public static BinaryExpression lessThan(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "private Object eval(RelExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n if (expr.getExpr().size() == 2) {\n Object res2 = eval(expr.getExpr().get(1));\n String opt = expr.getOpt();\n\n if (\"==\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = ((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = ((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = ((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"!=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = !((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = !((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = !((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res < (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res <= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res > (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res >= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "@Override\r\n\t\t\tpublic boolean accept(double t) {\n\t\t\t\treturn t>0.5;\r\n\t\t\t}", "public static RuntimeValue lessThan(RuntimeValue left, RuntimeValue right) throws RuntimeException {\n if (isDiscreteIntSamples(left, right)) {\n return new RuntimeValue(\n RuntimeValue.Type.DISCRETE_BOOL_SAMPLE,\n Operators.lessThanIntegers(left.getDiscreteIntSample(), right.getDiscreteIntSample())\n );\n }\n\n if (isDiscreteFloatSamples(left, right)) {\n return new RuntimeValue(\n RuntimeValue.Type.DISCRETE_BOOL_SAMPLE,\n Operators.lessThanFloats(left.getDiscreteFloatSample(), right.getDiscreteFloatSample())\n );\n }\n\n if (isDiscreteFloatSample(right) && isContinuousSample(left)) {\n return new RuntimeValue(\n RuntimeValue.Type.DISCRETE_BOOL_SAMPLE,\n Operators.lessThanContinuous(left.getContinuousSample(), right.getDiscreteFloatSample())\n );\n }\n\n if (isDiscreteFloatSample(left) && isContinuousSample(right)) {\n return new RuntimeValue(\n RuntimeValue.Type.DISCRETE_BOOL_SAMPLE,\n Operators.not(Operators.lessThanContinuous(right.getContinuousSample(), left.getDiscreteFloatSample()))\n );\n }\n\n throw new RuntimeException(\"Comparing incompatible types\");\n }", "@Override\r\n\tpublic int compare(Device d1, Device d2) {\n\t\treturn d1.getPower()- d2.getPower();\r\n\t}", "@Override\n public int compareTo(DoubleVector2 o) {\n return (getVectorOne().getSteps() + getVectorTwo().getSteps()) - (o.getVectorOne().getSteps() + o.getVectorTwo().getSteps());\n }", "BooleanExpression lt(ComparableExpression<? extends T> expr);", "public double getLow() {\n return low;\n }", "public static void lessThan(double arg, double max, String argName) {\r\n if (arg >= max) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\" must be less than \" + max);\r\n }\r\n }", "public void removeSmaller(double value){\r\n\t DoubleNode cursor2; \r\n\tfor(cursor = head; cursor != null; cursor = cursor.getLink()){\r\n\t\tif(cursor.getData() < value){\r\n\t\t\tif(cursor == head){\r\n\t\t\t\thead = head.getLink(); \r\n\t\t\t\tmanyNodes--; \r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcursor2 = cursor; \r\n\t\t\t\tthis.removeCurrent();\r\n\t\t\t\tcursor = cursor2;\r\n\t\t\t\tmanyNodes--; \r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n }", "public boolean greaterThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) == 1;\n }", "@Override\n\t//o1 > o2 如果返回正数则 升序。\n\tpublic int compare(Subject o1, Subject o2) {\n\t\tint ret = 1;\n\t\tif(o1.getRatingNum() > o2.getRatingNum()){\n\t\t\t//键入中文的负号,竟然是一个运行时错误。\n\t\t\tret = -1;\n\t\t}else if(o1.getRatingNum() == o2.getRatingNum()){\n\t\t\tret = 0;\n\t\t}\n\t\treturn ret;\n\t\t//下一句有double类型的舍入误差。\n\t\t//return (int) (o1.getRatingNum() - o2.getRatingNum());\n\t}", "private static boolean less(Comparable v, Comparable w)\n\t{\n\t\tif(v.compareTo(w)<0) {\n\t\t\treturn true; \n\t\t}\n\t\treturn false; \n\t}", "protected static boolean less(Comparable a, Comparable b) {\n\t\treturn a.compareTo(b) < 0;\r\n\t}", "@Override\n public Comparator<Object> thenComparingDouble(final ToDoubleFunction<?> p0) {\n // This method could not be decompiled.\n // \n // Could not show original bytecode, likely due to the same error.\n // \n // The error that occurred was:\n // \n // java.lang.NullPointerException\n // at com.strobel.assembler.metadata.WildcardType.containsGenericParameters(WildcardType.java:55)\n // at com.strobel.assembler.metadata.TypeReference.containsGenericParameters(TypeReference.java:48)\n // at com.strobel.assembler.metadata.MethodReference.containsGenericParameters(MethodReference.java:79)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2497)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1029)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1656)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:672)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:655)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:365)\n // at com.strobel.decompiler.ast.TypeAnalysis.run(TypeAnalysis.java:96)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:109)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:214)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformCall(AstMethodBodyBuilder.java:1162)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:1009)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:554)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformNode(AstMethodBodyBuilder.java:392)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformBlock(AstMethodBodyBuilder.java:333)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:294)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at us.deathmarine.luyten.FileSaver.doSaveJarDecompiled(FileSaver.java:192)\n // at us.deathmarine.luyten.FileSaver.access$300(FileSaver.java:45)\n // at us.deathmarine.luyten.FileSaver$4.run(FileSaver.java:112)\n // at java.lang.Thread.run(Unknown Source)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "@Override\n\tpublic int compareTo(Object other) {\n\t\treturn Double.compare(this.getHeuristique(),\n\t\t\t\t((Noeud) other).getHeuristique());\n\t}", "double getDoubleValue2();", "public double compare(double x, double y) {\n\t\tif (Math.abs(x - y) > _threshold)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn 1;\n\t}", "public static double leerDouble() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "private boolean cond1(Data C) {\n return (C.getRight() < this.xL);\n }", "protected double getMinDouble() {\r\n boolean handleOutOfMemoryError = false;\r\n double min = Double.POSITIVE_INFINITY;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(false);\r\n double value;\r\n int row;\r\n int col;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n value = getCell(\r\n row,\r\n col);\r\n if (value != noDataValue) {\r\n min = Math.min(\r\n min,\r\n value);\r\n }\r\n }\r\n }\r\n return min;\r\n }", "@Override\r\n\t\t\tpublic int compare(Integer a, Integer b) {\n\t\t\t\treturn -1 * a.compareTo(b);\r\n\t\t\t}", "boolean hasDouble();", "double getMin() {\n\t\t\treturn value_min;\n\t\t}", "public boolean greaterOrEqualThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) >= 0;\n }", "E minVal();", "public boolean isLessThan(Fraction rightOperand){\n\n\t\tint denom = myDenominator*rightOperand.getDenominator();\n\n\t\treturn (myNumerator*(denom/myDenominator)) <\n\t\t\t\t(rightOperand.getNumerator() *\n\t\t\t\t(denom/rightOperand.getDenominator()));\n\t}", "private Double minDouble(final Double previousValue, final Object transactionValue) {\n Double newValue;\n if (transactionValue instanceof Double) {\n newValue = Math.min(previousValue, (Double) transactionValue);\n } else {\n newValue = Math.min(previousValue, Double.parseDouble(transactionValue.toString()));\n }\n return newValue;\n }" ]
[ "0.7144077", "0.70901036", "0.6924496", "0.68414897", "0.68396944", "0.6578901", "0.65637684", "0.6539548", "0.65369135", "0.64996374", "0.64292777", "0.63904154", "0.634121", "0.6326068", "0.63021505", "0.62450325", "0.620966", "0.6201258", "0.6200977", "0.6180123", "0.61672086", "0.6125448", "0.6112557", "0.6106055", "0.60804874", "0.607122", "0.6068472", "0.6061889", "0.60290325", "0.60275763", "0.5985221", "0.5969252", "0.5957766", "0.5956433", "0.5903075", "0.58883566", "0.58762693", "0.586433", "0.586433", "0.58633566", "0.5854411", "0.58485913", "0.5839877", "0.58359164", "0.5810808", "0.5809147", "0.5806884", "0.5806786", "0.57998663", "0.578253", "0.57730556", "0.5772804", "0.57461405", "0.5719298", "0.57093495", "0.57049775", "0.5704374", "0.5685566", "0.5685141", "0.5646904", "0.5643347", "0.56419665", "0.5630666", "0.5629305", "0.56279296", "0.5627252", "0.5618065", "0.5593606", "0.55781317", "0.55703807", "0.556044", "0.55477124", "0.5531823", "0.552491", "0.55143106", "0.55053854", "0.5499873", "0.5492863", "0.54877186", "0.5485928", "0.5483259", "0.547958", "0.54763997", "0.54671293", "0.545653", "0.5452685", "0.5441107", "0.543927", "0.5437917", "0.5428439", "0.5427799", "0.54236996", "0.54115975", "0.5410936", "0.5407298", "0.54072726", "0.540414", "0.5399518", "0.5393208", "0.53922015" ]
0.5780772
50
Initialize a new XorShiftRandom using the current system time as a seed.
public XorShiftRandom() { this(System.nanoTime()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public XorShiftRandom(final long seed) {\n\t\tthis.seed = seed;\n\t}", "public XorShiftRandom(final XorShiftRandom random) {\n\t\tthis(random.getSeed());\n\t}", "public XorShiftRandom(final Random random) {\n\t\t\n\t\ttry {\n\t\t\tif(getSeed != null)\n\t\t\t\tsetSeed(((AtomicLong)XorShiftRandom.getSeed.get(random)).get());\n\t\t} catch(Throwable t) {\n\t\t\t;\n\t\t} finally {\n\t\t\tif(getSeed() == 0)\n\t\t\t\tsetSeed(System.nanoTime());\n\t\t}\n\t}", "public Random(long seed) {\n real = new UniversalGenerator(seed);\n twister = new MersenneTwister(seed);\n }", "public Random() {\n real = new UniversalGenerator();\n twister = new MersenneTwister();\n }", "public static void randomInit(int r) { }", "public void setRNG(long seed);", "public void seed(long seed) {\n }", "public GSRandom() {\r\n\t\t\r\n\t}", "private PRNG() {\n java.util.Random r = new java.util.Random();\n seed = r.nextInt();\n mersenne = new MersenneTwister(seed);\n }", "public DayTradeStrategy(int seed) {\r\n /* If you need some initialization of e.g., instance variables\r\n write here.\r\n */\r\n\r\n fRandom = new Random(seed); // Initialization of random sequence.\r\n }", "public CellularAutomatonRNG()\n {\n this(DefaultSeedGenerator.getInstance().generateSeed(SEED_SIZE_BYTES));\n }", "public Rng(long seed) {\n\t\tr = new Random(seed);\n\t}", "void new_seed( Seed seed );", "public GridSimRandom(long seed) {\n random_.setSeed(seed);\n }", "void setSeed(long seed);", "public RNGRandomImpl() {\n\t\tsetRand(new Random());\n\t}", "public DuelistRNG() {\n this((long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L),\n (long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L));\n }", "public XxHash(long seed) {\n this.seed = seed;\n }", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "public InternalExternalTour(long seed){\n\t\t\n\t\trandom = new MersenneTwister(seed);\n\t}", "void setSeed(final long seed);", "public WB_RandomPoint setSeed(final long seed);", "public XorWowRandom(int r8, int r9) {\n /*\n r7 = this;\n int r5 = ~r8\n int r0 = r8 << 10\n int r1 = r9 >>> 4\n r6 = r0 ^ r1\n r3 = 0\n r4 = 0\n r0 = r7\n r1 = r8\n r2 = r9\n r0.<init>(r1, r2, r3, r4, r5, r6)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.random.XorWowRandom.<init>(int, int):void\");\n }", "public void initialize() throws IllegalActionException {\n\t\tsuper.initialize();\n\n\t\tlong seedValue = ((LongToken) (seed.getToken())).longValue();\n\n\t\tif (seedValue != 0) {\n\t\t\t_random.setSeed(seedValue);\n\t\t} else {\n\t\t\t_random.setSeed(System.currentTimeMillis() + hashCode());\n\t\t}\n\t}", "public void setSeed(int seed){\n this.seed = seed; \n }", "public long getSeed()\n {\n return randomSeed;\n }", "public final void randomSeed(long what){\n\t\tsetSeed(what);\n\t\trandom();\n\t}", "public FlipCoin(int seed){\n this.rander = new Random(seed);\n }", "public void setSeed(int seed){\n\t\tmyRandom = new Random(seed);\n\t}", "public TrollGame (int seed){\n rand = new Random(seed);\n initBoard(ROWS, COLS, rand);\n }", "public static void setSeed( long seed ) {\n random = new Random( seed );\n }", "public static int randomNext() { return 0; }", "public GridSimRandom(long seed, double lessFactorIO, double moreFactorIO,\n double lessFactorExec, double moreFactorExec)\n {\n random_.setSeed(seed);\n lessFactorIO_ = lessFactorIO;\n moreFactorIO_ = moreFactorIO;\n lessFactorExec_ = lessFactorExec;\n moreFactorExec_ = moreFactorExec;\n }", "public GameNode(Random rng) {\n this.number = rng.nextInt(8) + 1;\n this.next = null;\n }", "private RandomLocationGen() {}", "long random(long ws) {\r\n\t\treturn (System.currentTimeMillis() % ws);\r\n\t}", "public static void setSeed(long s) {\r\n seed = s;\r\n random = new Random(seed);\r\n }", "public static long getSeed() {\r\n return seed;\r\n }", "public long getSeed()\r\n {\r\n return this.randomSeed;\r\n }", "void reset(int randomseed);", "public RandomIA() {\n\t\trandom = new Random();\n\t}", "private static SecureRandomAndPad createSecureRandom() {\n byte[] seed;\n File devRandom = new File(\"/dev/urandom\");\n if (devRandom.exists()) {\n RandomSeed rs = new RandomSeed(\"/dev/urandom\", \"/dev/urandom\");\n seed = rs.getBytesBlocking(20);\n } else {\n seed = RandomSeed.getSystemStateHash();\n }\n return new SecureRandomAndPad(new SecureRandom(seed));\n }", "public void initWorldGenSeed(long p_75905_1_) {\n/* 99 */ this.worldGenSeed = p_75905_1_;\n/* */ \n/* 101 */ if (this.parent != null)\n/* */ {\n/* 103 */ this.parent.initWorldGenSeed(p_75905_1_);\n/* */ }\n/* */ \n/* 106 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 107 */ this.worldGenSeed += this.baseSeed;\n/* 108 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 109 */ this.worldGenSeed += this.baseSeed;\n/* 110 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 111 */ this.worldGenSeed += this.baseSeed;\n/* */ }", "protected final long seedRoll() {\r\n Long time = System.currentTimeMillis();\r\n String hexSeed = String.format(\"%x\", new BigInteger(1, mGame.getSeed().getBytes()));\r\n Long seed = Long.parseLong(hexSeed, 16);\r\n\r\n return time + seed;\r\n }", "public Rng() {\n\t\tr = new Random();\n\t}", "public ECKey() {\n this(secureRandom);\n }", "public byte[] newSeed() {\r\n return engineSpi.newSeed();\r\n }", "public void randomX() {\r\n\t\tdouble randomDub = Math.random();\r\n\t\tint randomIntX = (int)randomDub*4;\r\n\t\tthis.xcoord = randomIntX;\r\n\t}", "public CrossoverOrder() {\n\t\tthis.randomGenerator = new Random(System.currentTimeMillis());\n\t}", "abstract Truerandomness newInstance();", "public long getSeed() {\n return seed;\n }", "public Mazealgo() {\n Random number = new Random();\n long i = number.nextLong();\n this.random = new Random(i);\n this.seed = i;\n }", "public void setRandomSeed(long seed) {\n randomGenerator.setSeed(seed);\n }", "@BeforeClass\n public static void setUpClass() {\n Random r = new Random(System.currentTimeMillis());\n \n r.nextBytes(testBytes);\n }", "private static byte[] generateSeed() {\n try {\n ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream();\n DataOutputStream seedBufferOut = new DataOutputStream(seedBuffer);\n seedBufferOut.writeLong(System.currentTimeMillis());\n seedBufferOut.writeLong(System.nanoTime());\n seedBufferOut.writeInt(android.os.Process.myPid());\n seedBufferOut.writeInt(Process.myUid());\n seedBufferOut.write(BUILD_FINGERPRINT_AND_DEVICE_SERIAL);\n seedBufferOut.close();\n return seedBuffer.toByteArray();\n } catch (IOException e) {\n throw new SecurityException(\"Failed to generate seed\", e);\n }\n }", "public static long randomTime() {\n return (random.nextInt(11) + 25)*1000;\n }", "public void reset(final Random random) throws Exception\r\n {\r\n super.generate(random);\r\n \r\n //reset timer\r\n timer.reset();\r\n }", "public static UUID createForGivenTimeAndRand(long targetTimeTenthOfMicros,\n Random rand) {\n long nodeAndClock = createRandNodeAndClock(rand);\n return new UUID(createTime(targetTimeTenthOfMicros), nodeAndClock);\n }", "public GridSimRandom() {\n // empty\n }", "public void setSeed(int seed) {\r\n this.seed = seed;\r\n }", "private Random rand()\n\t{\n\t\treturn new Random();\n\t}", "public static String getRandomTimeStamp() {\n\t\treturn \"2014-12-12T10:39:40Z\";\n\t}", "public static LocalTime randomEvening() {\n int randomInt = (int)(11.0 * Math.random()) + 13;\n return LocalTime.of(randomInt, 0);\n }", "public synchronized int setArrivalTime(){\n\t\t return random.nextInt((30-1)+1)+1;\n\n\t}", "public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}", "public static void init() \r\n {\r\n currentTime = getTime(); \r\n lastTime = getTime(); \r\n }", "private String getRandomSeed() {\n long newSeed = 0;\n Random randBoolean = new Random(randomSeed);\n for (int i = 0; i < 48; i++) {\n if (randBoolean.nextBoolean()) {\n newSeed += 1 << i;\n }\n }\n if (newSeed < 0) {\n newSeed = Math.abs(newSeed);\n }\n\n String s = \"\";\n if (newSeed == 0) {\n s += \"0\";\n } else {\n while (newSeed != 0) {\n long num = (newSeed & (0xF));\n if (num < 10) {\n s = num + s;\n } else {\n s = ((char) (num + 55)) + s;\n }\n newSeed = newSeed >> 4;\n }\n }\n return s;\n }", "public int getSeed() {\r\n return seed;\r\n }", "public Mazealgo(long seed) {\n this.seed = seed;\n this.random = new Random(seed);\n }", "public PatternCacheRandom()\r\n/* 26: */ {\r\n/* 27:118 */ this(20);\r\n/* 28: */ }", "public static ExtendedRandom getRandomGenerator()\n {\n lastGeneratorUsed = ( lastGeneratorUsed + 1 ) % instances.length;\n return instances[lastGeneratorUsed];\n }", "public MarkovZero() {\n\t\tmyRandom = new Random();\n\t}", "public DigitalNetBase2IteratorShiftGenerators() {\n super(); \n dimS = dim + 1;\n if (digitalShift != null && dimShift < dimS)\n addRandomShift (dimShift, dimS, shiftStream);\n resetCurPointIndex();\n }", "@Override\n public Builder seed(long randomSeed) {\n super.seed(randomSeed);\n return this;\n }", "public void setRandomX(int x) {\r\n\t\tthis.x1 = (int) (Math.random()*1000);\r\n\t}", "public GoLRandomInitializer(long seed) {\n Random randomLifeOrDeath = new Random(seed);\n \n // Give life to random *predicted* cells in the board\n for (int row = 0; row < this.NUM_ROWS; row++)\n for (int column = 0; column < this.NUM_COLUMNS; column++)\n this.gameBoard[row][column] = new \n GoLCell(randomLifeOrDeath.nextBoolean());\n }", "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "public BaileyCrandall() {\n\tsetSeed(System.currentTimeMillis());\n }", "public static byte[] initSalt() throws Exception {\n\n // Get a random number \n SecureRandom random = new SecureRandom();\n\n // generate the SALT\n return random.generateSeed(8);\n }", "protected Agent(){\n\t\trand = SeededRandom.getGenerator();\n\t}", "public int getSeed(){\n return this.seed; \n }", "@Override\n public long generateNewTimeToNextContract() {\n return new Random().nextInt(5);\n }", "public void setSeed(final long seed) {\n random.setSeed(seed);\n }", "public CellularAutomatonRNG(SeedGenerator seedGenerator) throws SeedException\n {\n this(seedGenerator.generateSeed(SEED_SIZE_BYTES));\n }", "public RandomResource(int instances_, long mgSeed_, long lcgSeed_) {\n super(instances_);\n stream = new UniformStream(0.0, 1.0, 0, mgSeed_, lcgSeed_);\n waitingList = new Vector();\n }", "public void initialize() {\n\t\tinitialize(seedValue0, seedValue1);\n\t}", "public static int genTurnSeed(int numPlayers) {\n\t\tRandom turnRand = new Random();\n\t\treturn turnRand.nextInt(numPlayers)+1;\n\t}", "@Override\n public void setSeed(final long seed) {\n if ((seed >= 0) && (seed < LONG_LIMIT)) {\n setSeed((int) seed);\n } else {\n int[] tmp = new int[2];\n tmp[0] = (int) (seed & 0xffffffff);\n tmp[1] = (int) (seed >>> INT_SIZE);\n setSeed(tmp);\n }\n }", "private void init() {\r\n\t\tx = (float) (Math.random() * 2 - 1);\r\n\t\ty = (float) (Math.random() * 2 - 1);\r\n\t\tz[0] = (float) (Math.random() * 3f);\r\n\t\tz[1] = z[0];\r\n\t}", "public interface IRandomCore \n{\n /**\n * Set the seed of this random number generator, establishing a basis\n * for the sequence of values to be generated. Note that if two\n * IRandomCore instance of the same type receive the same seed, they\n * will generate identical sequences.\n *\n * @param seed the seed value\n */\n void setSeed(long seed);\n\n /**\n * Generate the next pseudo-random number of the sequence and to\n * return its low 'bits' bits, leaving all higher bits zero. \n * 'bits' must be in the range 1..32.\n *\n * @param bits the number of random bits, 1..32.\n * @return the next pseudorandom value from this random number generator's sequence.\n */\n int nextBits(int bits);\n}", "public int getSeed() {\n return seed;\n }", "public int getSeed() {\n return seed;\n }", "public void setRandom(Random r) {\n this.r = r;\n }", "@Override\n public Date generate() {\n int year = 2000 + Rng.instance().nextInt(20);\n int date = Rng.instance().nextInt(28) + 1;\n int month = Rng.instance().nextInt(10) + 1;\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, date);\n\n return calendar.getTime();\n }", "@Before\n public void setUp() {\n randSeeder = new Random(42);\n\n //Show we haven't seeded the test's random number generator\n randSeed = RAND_UNSEEDED;\n comp = IntPlus.getIntComparator();\n }", "public ScenarioGenerator(long seed) {\n rd.setSeed(seed);\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}", "public void setSeed(long seed) {\n real.setSeed(seed);\n twister.setSeed(seed);\n }", "public LMScrambleShift (RandomStream stream) {\n super(stream);\n }" ]
[ "0.7634386", "0.7442761", "0.727509", "0.63463163", "0.632356", "0.6145694", "0.6137781", "0.6027675", "0.59746283", "0.59706944", "0.5958992", "0.595787", "0.59505576", "0.59222966", "0.5900436", "0.588342", "0.58626896", "0.5839081", "0.58371425", "0.5788854", "0.578302", "0.5779846", "0.5739523", "0.5724843", "0.56280166", "0.56145257", "0.5583645", "0.5550885", "0.5545623", "0.5538485", "0.5500906", "0.5436125", "0.5435097", "0.54296845", "0.54281527", "0.54275405", "0.5416197", "0.5414665", "0.53939694", "0.5384443", "0.53716725", "0.53588074", "0.5342598", "0.53364676", "0.5327385", "0.5305338", "0.5265428", "0.5244831", "0.5225441", "0.5204421", "0.5183648", "0.51721054", "0.51716256", "0.51714104", "0.5167183", "0.51623935", "0.51611197", "0.51605564", "0.51579726", "0.5151548", "0.5138131", "0.5133787", "0.5133186", "0.51253915", "0.51177824", "0.5111831", "0.5111394", "0.51035887", "0.5090552", "0.5087255", "0.5085908", "0.50842357", "0.50744", "0.5073499", "0.50714123", "0.5069284", "0.50677687", "0.50627184", "0.50607455", "0.5059086", "0.50461966", "0.504557", "0.5040745", "0.50400496", "0.5034371", "0.5005139", "0.50049335", "0.5001701", "0.49928084", "0.49923682", "0.49836", "0.49783564", "0.49783564", "0.49700764", "0.4967658", "0.49639356", "0.49559557", "0.49542737", "0.49532017", "0.4938337" ]
0.83812904
0
Initialize a new XorShiftRandom using the current seed value of the provided Random.
public XorShiftRandom(final Random random) { try { if(getSeed != null) setSeed(((AtomicLong)XorShiftRandom.getSeed.get(random)).get()); } catch(Throwable t) { ; } finally { if(getSeed() == 0) setSeed(System.nanoTime()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public XorShiftRandom(final XorShiftRandom random) {\n\t\tthis(random.getSeed());\n\t}", "public XorShiftRandom(final long seed) {\n\t\tthis.seed = seed;\n\t}", "public XorShiftRandom() {\n\t\tthis(System.nanoTime());\n\t}", "public Random(long seed) {\n real = new UniversalGenerator(seed);\n twister = new MersenneTwister(seed);\n }", "public Random() {\n real = new UniversalGenerator();\n twister = new MersenneTwister();\n }", "public static void randomInit(int r) { }", "public Rng(long seed) {\n\t\tr = new Random(seed);\n\t}", "public GridSimRandom(long seed) {\n random_.setSeed(seed);\n }", "public XorWowRandom(int r8, int r9) {\n /*\n r7 = this;\n int r5 = ~r8\n int r0 = r8 << 10\n int r1 = r9 >>> 4\n r6 = r0 ^ r1\n r3 = 0\n r4 = 0\n r0 = r7\n r1 = r8\n r2 = r9\n r0.<init>(r1, r2, r3, r4, r5, r6)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.random.XorWowRandom.<init>(int, int):void\");\n }", "public void setRNG(long seed);", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "PermutationGenerator(Random random) {\n\t\tm_random = random;\n\t}", "public RNGRandomImpl() {\n\t\tsetRand(new Random());\n\t}", "public void setRandom(Random r) {\n this.r = r;\n }", "private PRNG() {\n java.util.Random r = new java.util.Random();\n seed = r.nextInt();\n mersenne = new MersenneTwister(seed);\n }", "public void setSeed(int seed){\n\t\tmyRandom = new Random(seed);\n\t}", "public void initialize() throws IllegalActionException {\n\t\tsuper.initialize();\n\n\t\tlong seedValue = ((LongToken) (seed.getToken())).longValue();\n\n\t\tif (seedValue != 0) {\n\t\t\t_random.setSeed(seedValue);\n\t\t} else {\n\t\t\t_random.setSeed(System.currentTimeMillis() + hashCode());\n\t\t}\n\t}", "public WB_RandomPoint setSeed(final long seed);", "public InternalExternalTour(long seed){\n\t\t\n\t\trandom = new MersenneTwister(seed);\n\t}", "public XxHash(long seed) {\n this.seed = seed;\n }", "void new_seed( Seed seed );", "public GridSimRandom(long seed, double lessFactorIO, double moreFactorIO,\n double lessFactorExec, double moreFactorExec)\n {\n random_.setSeed(seed);\n lessFactorIO_ = lessFactorIO;\n moreFactorIO_ = moreFactorIO;\n lessFactorExec_ = lessFactorExec;\n moreFactorExec_ = moreFactorExec;\n }", "public static void setSeed( long seed ) {\n random = new Random( seed );\n }", "void reset(int randomseed);", "public GSRandom() {\r\n\t\t\r\n\t}", "public GameNode(Random rng) {\n this.number = rng.nextInt(8) + 1;\n this.next = null;\n }", "public FlipCoin(int seed){\n this.rander = new Random(seed);\n }", "public void seed(long seed) {\n }", "@Override\n public Builder seed(long randomSeed) {\n super.seed(randomSeed);\n return this;\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}", "public RandomIA() {\n\t\trandom = new Random();\n\t}", "public final void randomSeed(long what){\n\t\tsetSeed(what);\n\t\trandom();\n\t}", "public void setRandomSeed(long seed) {\n randomGenerator.setSeed(seed);\n }", "public DayTradeStrategy(int seed) {\r\n /* If you need some initialization of e.g., instance variables\r\n write here.\r\n */\r\n\r\n fRandom = new Random(seed); // Initialization of random sequence.\r\n }", "public void reset(final Random random) throws Exception\r\n {\r\n super.generate(random);\r\n \r\n //reset timer\r\n timer.reset();\r\n }", "public Rng() {\n\t\tr = new Random();\n\t}", "public CellularAutomatonRNG()\n {\n this(DefaultSeedGenerator.getInstance().generateSeed(SEED_SIZE_BYTES));\n }", "public GoLRandomInitializer(long seed) {\n Random randomLifeOrDeath = new Random(seed);\n \n // Give life to random *predicted* cells in the board\n for (int row = 0; row < this.NUM_ROWS; row++)\n for (int column = 0; column < this.NUM_COLUMNS; column++)\n this.gameBoard[row][column] = new \n GoLCell(randomLifeOrDeath.nextBoolean());\n }", "public void randomX() {\r\n\t\tdouble randomDub = Math.random();\r\n\t\tint randomIntX = (int)randomDub*4;\r\n\t\tthis.xcoord = randomIntX;\r\n\t}", "void setSeed(final long seed);", "void setSeed(long seed);", "static Bytes96 random(Random rnd) {\n byte[] randomBytes = new byte[SIZE];\n rnd.nextBytes(randomBytes);\n return wrap(randomBytes);\n }", "public CrossoverOrder() {\n\t\tthis.randomGenerator = new Random(System.currentTimeMillis());\n\t}", "public static int randomNext() { return 0; }", "public MarkovZero() {\n\t\tmyRandom = new Random();\n\t}", "public void setSeed(final long seed) {\n random.setSeed(seed);\n }", "public void setSeed(int seed){\n this.seed = seed; \n }", "public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}", "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "public void updateNextSeed(GMSSRandom gmssRandom)\n {\n gmssRandom.nextSeed(seedNext);\n }", "public long getSeed()\n {\n return randomSeed;\n }", "private void assuerNN_random() {\n //Check, if the variable is null..\n if (this.random == null) {\n //..and now create it.\n this.random = new Random(10);\n }\n }", "RandomnessSource copy();", "public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}", "@Test\n public void testSetCantRandom() {\n System.out.println(\"setCantRandom\");\n int cantRandom = 0;\n RandomX instance = null;\n instance.setCantRandom(cantRandom);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public static void setSeed(long s) {\r\n seed = s;\r\n random = new Random(seed);\r\n }", "@Before\n public void setUp() {\n randSeeder = new Random(42);\n\n //Show we haven't seeded the test's random number generator\n randSeed = RAND_UNSEEDED;\n comp = IntPlus.getIntComparator();\n }", "public DigitalNetBase2IteratorShiftGenerators() {\n super(); \n dimS = dim + 1;\n if (digitalShift != null && dimShift < dimS)\n addRandomShift (dimShift, dimS, shiftStream);\n resetCurPointIndex();\n }", "public CellularAutomatonRNG(SeedGenerator seedGenerator) throws SeedException\n {\n this(seedGenerator.generateSeed(SEED_SIZE_BYTES));\n }", "public TrollGame (int seed){\n rand = new Random(seed);\n initBoard(ROWS, COLS, rand);\n }", "public LMScrambleShift (RandomStream stream) {\n super(stream);\n }", "public void setRandomX(int x) {\r\n\t\tthis.x1 = (int) (Math.random()*1000);\r\n\t}", "private RandomLocationGen() {}", "private void init() {\r\n\t\tx = (float) (Math.random() * 2 - 1);\r\n\t\ty = (float) (Math.random() * 2 - 1);\r\n\t\tz[0] = (float) (Math.random() * 3f);\r\n\t\tz[1] = z[0];\r\n\t}", "public int randomMove()\r\n {\r\n r = new Random();\r\n x = r.nextInt(7);\r\n return x;\r\n }", "public Mazealgo(long seed) {\n this.seed = seed;\n this.random = new Random(seed);\n }", "public GridSimRandom() {\n // empty\n }", "public Rng(int sides, long seed) {\n\t\tthis.sides = sides;\n\t\tr = new Random(seed);\n\t}", "public DuelistRNG() {\n this((long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L),\n (long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L));\n }", "public CellularAutomatonRNG(byte[] seed)\n {\n if (seed == null || seed.length != SEED_SIZE_BYTES)\n {\n throw new IllegalArgumentException(\"Cellular Automaton RNG requires a 32-bit (4-byte) seed.\");\n }\n this.seed = seed.clone();\n\n // Set initial cell states using seed.\n cells[AUTOMATON_LENGTH - 1] = seed[0] + 128;\n cells[AUTOMATON_LENGTH - 2] = seed[1] + 128;\n cells[AUTOMATON_LENGTH - 3] = seed[2] + 128;\n cells[AUTOMATON_LENGTH - 4] = seed[3] + 128;\n\n int seedAsInt = BinaryUtils.convertBytesToInt(seed, 0);\n if (seedAsInt != 0xFFFFFFFF)\n {\n seedAsInt++;\n }\n for (int i = 0; i < AUTOMATON_LENGTH - 4; i++)\n {\n cells[i] = 0x000000FF & (seedAsInt >> (i % 32));\n }\n\n // Evolve automaton before returning integers.\n for (int i = 0; i < AUTOMATON_LENGTH * AUTOMATON_LENGTH / 4; i++)\n {\n next(32);\n }\n }", "public void initialize() {\n\t\tinitialize(seedValue0, seedValue1);\n\t}", "public Builder<V, E> seed(long seed) {\n this.seed = seed;\n return this;\n }", "public void generateNether(World world, Random random, int x, int y){\n\t}", "public void randomTeleport() {\n Random random = new Random(seed);\n seed = random.nextInt(10000);\n int randomY = RandomUtils.uniform(random, 0, worldHeight);\n int randomX = RandomUtils.uniform(random, 0, worldWidth);\n int randomDirection = RandomUtils.uniform(random, 0, 4);\n move(randomX, randomY);\n turn(randomDirection);\n }", "public static ExtendedRandom getRandomGenerator()\n {\n lastGeneratorUsed = ( lastGeneratorUsed + 1 ) % instances.length;\n return instances[lastGeneratorUsed];\n }", "public GoLRandomInitializer() {\n Random randomLifeOrDeath = new Random();\n \n // Give life to random cells in the board\n for (int row = 0; row < this.NUM_ROWS; row++)\n for (int column = 0; column < this.NUM_COLUMNS; column++)\n this.gameBoard[row][column] = new \n GoLCell(randomLifeOrDeath.nextBoolean());\n }", "public long getSeed()\r\n {\r\n return this.randomSeed;\r\n }", "public Mazealgo() {\n Random number = new Random();\n long i = number.nextLong();\n this.random = new Random(i);\n this.seed = i;\n }", "protected Agent(){\n\t\trand = SeededRandom.getGenerator();\n\t}", "public void setSeed(int seed) {\r\n this.seed = seed;\r\n }", "abstract Truerandomness newInstance();", "private void random() {\n\n\t}", "private Random rand()\n\t{\n\t\treturn new Random();\n\t}", "public void setSeed(long seed) {\n real.setSeed(seed);\n twister.setSeed(seed);\n }", "public void generateRandomPosition(Zone samusZone) {\n\t\t\n\t\tint i = samusZone.getI(), j = samusZone.getJ();\n\t\twhile(i == samusZone.getI() && j == samusZone.getJ()) {\n\t\t\ti = ThreadLocalRandom.current().nextInt(1, 12 + 1);\n\t\t\tj = ThreadLocalRandom.current().nextInt(1, 12 + 1);\n\t\t}\n\t\t\n\t\tsamusZone.getSamus().setI(i);\n\t\tsamusZone.getSamus().setJ(j);\n\t}", "@Override\n public void setSeed(final long seed) {\n if ((seed >= 0) && (seed < LONG_LIMIT)) {\n setSeed((int) seed);\n } else {\n int[] tmp = new int[2];\n tmp[0] = (int) (seed & 0xffffffff);\n tmp[1] = (int) (seed >>> INT_SIZE);\n setSeed(tmp);\n }\n }", "public RandomNeighborhoodOperator(int nbRelaxedVars, long seed)\n{\n\trandom = new Random(seed);\n\tthis.nbRelaxedVars = nbRelaxedVars;\n\tselected = new TIntHashSet();\n}", "public Element setToRandom() {\n this.value = Math.abs(ThreadSecureRandom.get().nextLong()) % field.order;\n\n return mod();\n }", "public void setRandomSpawn(final Random random)\r\n {\r\n final List<Double> rows = new ArrayList<>();\r\n \r\n final double column;\r\n \r\n //get a random true/false result\r\n if (random.nextBoolean())\r\n {\r\n //here we will do west\r\n column = 0.5;\r\n }\r\n else\r\n {\r\n //here we will do east\r\n column = COLUMNS - 0.5;\r\n }\r\n \r\n for (double row=0; row < ROWS; row++)\r\n {\r\n //if platform exists add this as a possibility\r\n if (getObject(Type.Platform, (int)column, row) != null)\r\n rows.add(row);\r\n }\r\n \r\n super.setCol(column);\r\n \r\n final int index = random.nextInt(rows.size());\r\n super.setRow(rows.get(index) + 0.5);\r\n }", "public void initialize(long seed0, long seed1) {\n\t\tbytesDigested = 0;\n\t\tbyteCount = 0;\n\t\thashState[0] = seed0;\n\t\thashState[1] = seed1;\n\t}", "public GoLBoard reset()\n\t{\n\t\treturn reset(new GoLRandomInitializer(setSize));\n\t}", "public void initSign(Key paramKey, SecureRandom paramSecureRandom) throws XMLSignatureException {\n/* 255 */ this.signatureAlgorithm.engineInitSign(paramKey, paramSecureRandom);\n/* */ }", "public SelectionWheel( RandomData random ) {\n if( random == null ) {\n throw new IllegalArgumentException( \"RandomData source cannot be null\" );\n }\n\n this.random = random;\n this.entries = new TreeMap<Float, T>();\n }", "public HashPermute(int seed) {\n\t\tthis.seed = HashFunction.getRandomSeed(seed);\n\t}", "public RandomizedSet() {\r\n rehash(16, null);\r\n random = new Random();\r\n }", "public void initWorldGenSeed(long p_75905_1_) {\n/* 99 */ this.worldGenSeed = p_75905_1_;\n/* */ \n/* 101 */ if (this.parent != null)\n/* */ {\n/* 103 */ this.parent.initWorldGenSeed(p_75905_1_);\n/* */ }\n/* */ \n/* 106 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 107 */ this.worldGenSeed += this.baseSeed;\n/* 108 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 109 */ this.worldGenSeed += this.baseSeed;\n/* 110 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 111 */ this.worldGenSeed += this.baseSeed;\n/* */ }", "ReservoirSamplerWithoutReplacement(int numSamples, long seed) {\n\t\tPreconditions.checkArgument(numSamples >= 0, \"numSamples should be non-negative.\");\n\t\tthis.numSamples = numSamples;\n\t\tthis.random = new XORShiftRandom(seed);\n\t\tthis.queue = new PriorityQueue<>(numSamples);\n\t}", "public void setCoords() \r\n {\r\n \tthis.coordX = rand.nextInt(10);\r\n \tthis.coordY = rand.nextInt(10);\r\n }", "public void SetRandom(boolean random);", "public void initialize(int strength, SecureRandom random) {\n mStrength = strength;\n mSecureRandom = random;\n }" ]
[ "0.84538794", "0.79681647", "0.7835214", "0.6438134", "0.6234666", "0.62294024", "0.61918086", "0.61054164", "0.60281324", "0.59849167", "0.59420836", "0.5908757", "0.5870187", "0.58430636", "0.5821386", "0.5782251", "0.56596375", "0.56523675", "0.5611155", "0.56090355", "0.5595082", "0.55883753", "0.55800873", "0.55707556", "0.5565897", "0.55581975", "0.555815", "0.55518013", "0.55458", "0.5539207", "0.5511387", "0.5494454", "0.5484488", "0.5453105", "0.54441494", "0.54407805", "0.5438544", "0.5426726", "0.5416844", "0.5402976", "0.5358968", "0.5309661", "0.52691025", "0.52662075", "0.5213704", "0.5208901", "0.51999456", "0.51901853", "0.5170603", "0.51650906", "0.5161668", "0.51458234", "0.5144379", "0.5125662", "0.51223624", "0.510365", "0.5085936", "0.50849897", "0.5081865", "0.5073627", "0.50671583", "0.5057461", "0.5035707", "0.5034428", "0.5034168", "0.502276", "0.50194913", "0.5015782", "0.5012102", "0.50077015", "0.4999576", "0.49973252", "0.49913016", "0.4987587", "0.49804547", "0.4961464", "0.4960416", "0.49565732", "0.4955796", "0.49476227", "0.49474338", "0.49413884", "0.4926478", "0.49224702", "0.49061006", "0.48870337", "0.4886624", "0.4885103", "0.4882834", "0.4873773", "0.4869302", "0.48516935", "0.48491868", "0.48421758", "0.48321322", "0.48310557", "0.48278078", "0.48257503", "0.4823402", "0.48200026" ]
0.83611864
1
Initialize a new XorShiftRandom using the seed value of the provided XorShiftRandom instance.
public XorShiftRandom(final XorShiftRandom random) { this(random.getSeed()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public XorShiftRandom(final long seed) {\n\t\tthis.seed = seed;\n\t}", "public XorShiftRandom() {\n\t\tthis(System.nanoTime());\n\t}", "public XorShiftRandom(final Random random) {\n\t\t\n\t\ttry {\n\t\t\tif(getSeed != null)\n\t\t\t\tsetSeed(((AtomicLong)XorShiftRandom.getSeed.get(random)).get());\n\t\t} catch(Throwable t) {\n\t\t\t;\n\t\t} finally {\n\t\t\tif(getSeed() == 0)\n\t\t\t\tsetSeed(System.nanoTime());\n\t\t}\n\t}", "public XorWowRandom(int r8, int r9) {\n /*\n r7 = this;\n int r5 = ~r8\n int r0 = r8 << 10\n int r1 = r9 >>> 4\n r6 = r0 ^ r1\n r3 = 0\n r4 = 0\n r0 = r7\n r1 = r8\n r2 = r9\n r0.<init>(r1, r2, r3, r4, r5, r6)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.random.XorWowRandom.<init>(int, int):void\");\n }", "public XxHash(long seed) {\n this.seed = seed;\n }", "public Random(long seed) {\n real = new UniversalGenerator(seed);\n twister = new MersenneTwister(seed);\n }", "public DigitalNetBase2IteratorShiftGenerators() {\n super(); \n dimS = dim + 1;\n if (digitalShift != null && dimShift < dimS)\n addRandomShift (dimShift, dimS, shiftStream);\n resetCurPointIndex();\n }", "public Rng(long seed) {\n\t\tr = new Random(seed);\n\t}", "public static void randomInit(int r) { }", "public void setRNG(long seed);", "void new_seed( Seed seed );", "public GridSimRandom(long seed) {\n random_.setSeed(seed);\n }", "public Random() {\n real = new UniversalGenerator();\n twister = new MersenneTwister();\n }", "public void initialize() throws IllegalActionException {\n\t\tsuper.initialize();\n\n\t\tlong seedValue = ((LongToken) (seed.getToken())).longValue();\n\n\t\tif (seedValue != 0) {\n\t\t\t_random.setSeed(seedValue);\n\t\t} else {\n\t\t\t_random.setSeed(System.currentTimeMillis() + hashCode());\n\t\t}\n\t}", "public LMScrambleShift (RandomStream stream) {\n super(stream);\n }", "public DayTradeStrategy(int seed) {\r\n /* If you need some initialization of e.g., instance variables\r\n write here.\r\n */\r\n\r\n fRandom = new Random(seed); // Initialization of random sequence.\r\n }", "public void seed(long seed) {\n }", "public CellularAutomatonRNG()\n {\n this(DefaultSeedGenerator.getInstance().generateSeed(SEED_SIZE_BYTES));\n }", "public FlipCoin(int seed){\n this.rander = new Random(seed);\n }", "public GSRandom() {\r\n\t\t\r\n\t}", "private PRNG() {\n java.util.Random r = new java.util.Random();\n seed = r.nextInt();\n mersenne = new MersenneTwister(seed);\n }", "public InternalExternalTour(long seed){\n\t\t\n\t\trandom = new MersenneTwister(seed);\n\t}", "public void setSeed(int seed){\n this.seed = seed; \n }", "public RNGRandomImpl() {\n\t\tsetRand(new Random());\n\t}", "void setSeed(long seed);", "public WB_RandomPoint setSeed(final long seed);", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "public void setSeed(int seed){\n\t\tmyRandom = new Random(seed);\n\t}", "public TrollGame (int seed){\n rand = new Random(seed);\n initBoard(ROWS, COLS, rand);\n }", "void setSeed(final long seed);", "public GameNode(Random rng) {\n this.number = rng.nextInt(8) + 1;\n this.next = null;\n }", "public ShiftTemplate(Integer shiftId) {\n this.shiftId = shiftId;\n }", "void reset(int randomseed);", "public GridSimRandom(long seed, double lessFactorIO, double moreFactorIO,\n double lessFactorExec, double moreFactorExec)\n {\n random_.setSeed(seed);\n lessFactorIO_ = lessFactorIO;\n moreFactorIO_ = moreFactorIO;\n lessFactorExec_ = lessFactorExec;\n moreFactorExec_ = moreFactorExec;\n }", "public CellularAutomatonRNG(byte[] seed)\n {\n if (seed == null || seed.length != SEED_SIZE_BYTES)\n {\n throw new IllegalArgumentException(\"Cellular Automaton RNG requires a 32-bit (4-byte) seed.\");\n }\n this.seed = seed.clone();\n\n // Set initial cell states using seed.\n cells[AUTOMATON_LENGTH - 1] = seed[0] + 128;\n cells[AUTOMATON_LENGTH - 2] = seed[1] + 128;\n cells[AUTOMATON_LENGTH - 3] = seed[2] + 128;\n cells[AUTOMATON_LENGTH - 4] = seed[3] + 128;\n\n int seedAsInt = BinaryUtils.convertBytesToInt(seed, 0);\n if (seedAsInt != 0xFFFFFFFF)\n {\n seedAsInt++;\n }\n for (int i = 0; i < AUTOMATON_LENGTH - 4; i++)\n {\n cells[i] = 0x000000FF & (seedAsInt >> (i % 32));\n }\n\n // Evolve automaton before returning integers.\n for (int i = 0; i < AUTOMATON_LENGTH * AUTOMATON_LENGTH / 4; i++)\n {\n next(32);\n }\n }", "public CellularAutomatonRNG(SeedGenerator seedGenerator) throws SeedException\n {\n this(seedGenerator.generateSeed(SEED_SIZE_BYTES));\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}", "@Before\n public void setUp() {\n randSeeder = new Random(42);\n\n //Show we haven't seeded the test's random number generator\n randSeed = RAND_UNSEEDED;\n comp = IntPlus.getIntComparator();\n }", "public void initialize() {\n\t\tinitialize(seedValue0, seedValue1);\n\t}", "public CrossoverOrder() {\n\t\tthis.randomGenerator = new Random(System.currentTimeMillis());\n\t}", "public GoLRandomInitializer(long seed) {\n Random randomLifeOrDeath = new Random(seed);\n \n // Give life to random *predicted* cells in the board\n for (int row = 0; row < this.NUM_ROWS; row++)\n for (int column = 0; column < this.NUM_COLUMNS; column++)\n this.gameBoard[row][column] = new \n GoLCell(randomLifeOrDeath.nextBoolean());\n }", "@Test\n public void testSetCantRandom() {\n System.out.println(\"setCantRandom\");\n int cantRandom = 0;\n RandomX instance = null;\n instance.setCantRandom(cantRandom);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "PermutationGenerator(Random random) {\n\t\tm_random = random;\n\t}", "public Rng() {\n\t\tr = new Random();\n\t}", "@Override\n public Builder seed(long randomSeed) {\n super.seed(randomSeed);\n return this;\n }", "public void randomX() {\r\n\t\tdouble randomDub = Math.random();\r\n\t\tint randomIntX = (int)randomDub*4;\r\n\t\tthis.xcoord = randomIntX;\r\n\t}", "public static void setSeed( long seed ) {\n random = new Random( seed );\n }", "public void setSeed(int seed) {\r\n this.seed = seed;\r\n }", "public ShiftTemplate() {\n }", "public ECKey() {\n this(secureRandom);\n }", "public HashPermute(int seed) {\n\t\tthis.seed = HashFunction.getRandomSeed(seed);\n\t}", "public void setRandomSeed(long seed) {\n randomGenerator.setSeed(seed);\n }", "public RandomIA() {\n\t\trandom = new Random();\n\t}", "public static byte[] initSalt() throws Exception {\n\n // Get a random number \n SecureRandom random = new SecureRandom();\n\n // generate the SALT\n return random.generateSeed(8);\n }", "public DuelistRNG() {\n this((long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L),\n (long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L));\n }", "public GridSimRandom() {\n // empty\n }", "public Rng(int sides, long seed) {\n\t\tthis.sides = sides;\n\t\tr = new Random(seed);\n\t}", "public Builder<V, E> seed(long seed) {\n this.seed = seed;\n return this;\n }", "private RandomLocationGen() {}", "public void setRandom(Random r) {\n this.r = r;\n }", "public void initialize(long seed0, long seed1) {\n\t\tbytesDigested = 0;\n\t\tbyteCount = 0;\n\t\thashState[0] = seed0;\n\t\thashState[1] = seed1;\n\t}", "public static void setSeed(long s) {\r\n seed = s;\r\n random = new Random(seed);\r\n }", "public MarkovZero() {\n\t\tmyRandom = new Random();\n\t}", "Observable<Shift> createNewShift(Shift shift);", "public Rock(World world) {\n\t\tsuper(world);\n\t\tthis.color = ROCK_COLORS[rand.nextInt(ROCK_COLORS.length)];\n\t}", "public void initWorldGenSeed(long p_75905_1_) {\n/* 99 */ this.worldGenSeed = p_75905_1_;\n/* */ \n/* 101 */ if (this.parent != null)\n/* */ {\n/* 103 */ this.parent.initWorldGenSeed(p_75905_1_);\n/* */ }\n/* */ \n/* 106 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 107 */ this.worldGenSeed += this.baseSeed;\n/* 108 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 109 */ this.worldGenSeed += this.baseSeed;\n/* 110 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 111 */ this.worldGenSeed += this.baseSeed;\n/* */ }", "private static int xorShift(int r) {\n r ^= (r << 13);\n r ^= (r >>> 17);\n return r ^ (r << 5);\n }", "private void init() {\r\n\t\tx = (float) (Math.random() * 2 - 1);\r\n\t\ty = (float) (Math.random() * 2 - 1);\r\n\t\tz[0] = (float) (Math.random() * 3f);\r\n\t\tz[1] = z[0];\r\n\t}", "@BeforeClass\n public static void setUpClass() {\n Random r = new Random(System.currentTimeMillis());\n \n r.nextBytes(testBytes);\n }", "@Override\n public void setSeed(final long seed) {\n if ((seed >= 0) && (seed < LONG_LIMIT)) {\n setSeed((int) seed);\n } else {\n int[] tmp = new int[2];\n tmp[0] = (int) (seed & 0xffffffff);\n tmp[1] = (int) (seed >>> INT_SIZE);\n setSeed(tmp);\n }\n }", "abstract Truerandomness newInstance();", "public ScenarioGenerator(long seed) {\n rd.setSeed(seed);\n }", "public final void randomSeed(long what){\n\t\tsetSeed(what);\n\t\trandom();\n\t}", "public void init()\r\n\t{\r\n\t\tm_behaviorName = \"Wander\";\r\n\t\t\r\n\t\t// Punkt auf dem Kreis festlegen\r\n\t\tRandom rand = new Random();\r\n\t\t\r\n\t\tVector2d vect = new Vector2d(rand.nextInt(),rand.nextInt());\r\n\t\t\r\n\t\t// evtl. negative Werte\r\n\t\t\r\n\t\tif (rand.nextInt() > 0.5) vect.setX(vect.getX() * (-1));\r\n\t\tif (rand.nextInt() > 0.5) vect.setY(vect.getY() * (-1));\r\n\t\t\r\n\t\t// Punkt auf dem Kreis festlegen durch Normalisierung u. Skalierung\r\n\t\tvect.normalize(); vect.scale(m_r);\r\n\t\tm_seekPoint = new Point2d(m_pos);\r\n\t\tm_seekPoint = m_seekPoint.add(vect); \r\n\t}", "public static int genTurnSeed(int numPlayers) {\n\t\tRandom turnRand = new Random();\n\t\treturn turnRand.nextInt(numPlayers)+1;\n\t}", "private static int xorShift(int r) {\n r ^= r << 1;\n r ^= r >>> 3;\n r ^= r << 10;\n return r;\n }", "public long getSeed()\n {\n return randomSeed;\n }", "public void setSeed(final long seed) {\n random.setSeed(seed);\n }", "public DigitalNetBase2IteratorShiftNoGray() {\n super(); \n dimS = dim + 1;\n if (digitalShift != null && dimShift < dimS)\n addRandomShift (dimShift, dimS, shiftStream);\n resetCurPointIndex();\n }", "RandomnessSource copy();", "public Mazealgo(long seed) {\n this.seed = seed;\n this.random = new Random(seed);\n }", "public ElectricShower() {\r\n\t\tthis(12, 0, 4);\r\n\t}", "public void setSeed(long seed) {\n real.setSeed(seed);\n twister.setSeed(seed);\n }", "public void setSeed(long seed) {\n\tif (seed < POW3_33 + 100) {\n\t seed += POW3_33 + 100;\n\t}\n\tseed &= (POW2_53 - 1L);\n\tsetSeedRaw(seed);\n }", "public RandomSpread(int count) {\n this(count, 1);\n }", "Seed(){\r\n seedCells = new ArrayList<>();\r\n edgeCells = new ArrayList<>();\r\n }", "public PatternCacheRandom()\r\n/* 26: */ {\r\n/* 27:118 */ this(20);\r\n/* 28: */ }", "ReservoirSamplerWithoutReplacement(int numSamples, long seed) {\n\t\tPreconditions.checkArgument(numSamples >= 0, \"numSamples should be non-negative.\");\n\t\tthis.numSamples = numSamples;\n\t\tthis.random = new XORShiftRandom(seed);\n\t\tthis.queue = new PriorityQueue<>(numSamples);\n\t}", "public Dice() { \n this(6); /* Invoke the above Dice constructor with value 6. */ \n }", "public Add128(){\n key = new byte[128];\n Random rand = new Random();\n rand.nextBytes(key);\n }", "public int getSeed(){\n return this.seed; \n }", "public VShuffling()\n {\n }", "private void shift(int shift)\n\t{\n\t\tthis.shiftAmount = shift;\n\t}", "public final void seed(int s0, int s1, int s2)\r\n {\r\n d0 = s0;\r\n d1 = s1;\r\n d2 = s2;\r\n i = 0;\r\n }", "public void setRandomX(int x) {\r\n\t\tthis.x1 = (int) (Math.random()*1000);\r\n\t}", "public GoLBoard reset()\n\t{\n\t\treturn reset(new GoLRandomInitializer(setSize));\n\t}", "public void setSeedRaw(final long seed) {\n\t// TBD: add check, throw exception\n\tddmuldd(expm2((double) seed - POW3_33, POW3_33), POW3_33_DIV_2, dd1);\n\tdddivd(dd1, POW3_33, dd2);\n\tddmuldd(Math.floor(dd2[0]), POW3_33, dd2);\n\tddsub(dd1, dd2, dd3);\n\td1 = dd3[0];\n }", "public RandomNeighborhoodOperator(int nbRelaxedVars, long seed)\n{\n\trandom = new Random(seed);\n\tthis.nbRelaxedVars = nbRelaxedVars;\n\tselected = new TIntHashSet();\n}", "public long getSeed()\r\n {\r\n return this.randomSeed;\r\n }", "public void init( int pointDimension, long randomSeed );" ]
[ "0.7859829", "0.7728567", "0.7333325", "0.61296934", "0.58948743", "0.5638653", "0.5551258", "0.5551115", "0.55147237", "0.54921144", "0.53986496", "0.53976935", "0.53879565", "0.5384094", "0.527776", "0.52769166", "0.52765775", "0.5271865", "0.52537936", "0.5231391", "0.52203834", "0.5215626", "0.5192512", "0.51734173", "0.51568776", "0.5148294", "0.5141983", "0.51293206", "0.511731", "0.5112278", "0.5103067", "0.50975794", "0.5016642", "0.5007565", "0.49498615", "0.49322844", "0.49281368", "0.49279037", "0.490366", "0.48670402", "0.48617983", "0.48482767", "0.48438367", "0.48430604", "0.48383915", "0.48257357", "0.48213753", "0.48173532", "0.48159057", "0.48077905", "0.47571683", "0.4741625", "0.47403836", "0.47357547", "0.47150168", "0.46983188", "0.46975416", "0.46765935", "0.46612215", "0.46571597", "0.46550807", "0.46396667", "0.46383154", "0.46368495", "0.46364215", "0.4636225", "0.4619329", "0.4611112", "0.46036878", "0.45942876", "0.45925283", "0.45870754", "0.45861924", "0.45805696", "0.45769554", "0.45706975", "0.4570536", "0.4566737", "0.45664567", "0.45602384", "0.45496708", "0.454791", "0.4546798", "0.4537426", "0.4531211", "0.45307985", "0.4526718", "0.45248565", "0.45164442", "0.45133537", "0.45126963", "0.45081475", "0.45027247", "0.44998094", "0.4493814", "0.4486356", "0.44807503", "0.445889", "0.44540673", "0.44510898" ]
0.78410375
1
Initialize a new XorShiftRandom using the specified seed.
public XorShiftRandom(final long seed) { this.seed = seed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public XorShiftRandom(final XorShiftRandom random) {\n\t\tthis(random.getSeed());\n\t}", "public XorShiftRandom() {\n\t\tthis(System.nanoTime());\n\t}", "public XorShiftRandom(final Random random) {\n\t\t\n\t\ttry {\n\t\t\tif(getSeed != null)\n\t\t\t\tsetSeed(((AtomicLong)XorShiftRandom.getSeed.get(random)).get());\n\t\t} catch(Throwable t) {\n\t\t\t;\n\t\t} finally {\n\t\t\tif(getSeed() == 0)\n\t\t\t\tsetSeed(System.nanoTime());\n\t\t}\n\t}", "public XxHash(long seed) {\n this.seed = seed;\n }", "public Random(long seed) {\n real = new UniversalGenerator(seed);\n twister = new MersenneTwister(seed);\n }", "public Rng(long seed) {\n\t\tr = new Random(seed);\n\t}", "public GridSimRandom(long seed) {\n random_.setSeed(seed);\n }", "public void setRNG(long seed);", "void new_seed( Seed seed );", "public void seed(long seed) {\n }", "public WB_RandomPoint setSeed(final long seed);", "void setSeed(final long seed);", "public void setSeed(int seed){\n\t\tmyRandom = new Random(seed);\n\t}", "void setSeed(long seed);", "public static void setSeed( long seed ) {\n random = new Random( seed );\n }", "public void setSeed(int seed) {\r\n this.seed = seed;\r\n }", "public InternalExternalTour(long seed){\n\t\t\n\t\trandom = new MersenneTwister(seed);\n\t}", "public void setSeed(int seed){\n this.seed = seed; \n }", "public DayTradeStrategy(int seed) {\r\n /* If you need some initialization of e.g., instance variables\r\n write here.\r\n */\r\n\r\n fRandom = new Random(seed); // Initialization of random sequence.\r\n }", "public FlipCoin(int seed){\n this.rander = new Random(seed);\n }", "public void setRandomSeed(long seed) {\n randomGenerator.setSeed(seed);\n }", "public Builder<V, E> seed(long seed) {\n this.seed = seed;\n return this;\n }", "public void setSeed(final long seed) {\n random.setSeed(seed);\n }", "public CellularAutomatonRNG(byte[] seed)\n {\n if (seed == null || seed.length != SEED_SIZE_BYTES)\n {\n throw new IllegalArgumentException(\"Cellular Automaton RNG requires a 32-bit (4-byte) seed.\");\n }\n this.seed = seed.clone();\n\n // Set initial cell states using seed.\n cells[AUTOMATON_LENGTH - 1] = seed[0] + 128;\n cells[AUTOMATON_LENGTH - 2] = seed[1] + 128;\n cells[AUTOMATON_LENGTH - 3] = seed[2] + 128;\n cells[AUTOMATON_LENGTH - 4] = seed[3] + 128;\n\n int seedAsInt = BinaryUtils.convertBytesToInt(seed, 0);\n if (seedAsInt != 0xFFFFFFFF)\n {\n seedAsInt++;\n }\n for (int i = 0; i < AUTOMATON_LENGTH - 4; i++)\n {\n cells[i] = 0x000000FF & (seedAsInt >> (i % 32));\n }\n\n // Evolve automaton before returning integers.\n for (int i = 0; i < AUTOMATON_LENGTH * AUTOMATON_LENGTH / 4; i++)\n {\n next(32);\n }\n }", "public GoLRandomInitializer(long seed) {\n Random randomLifeOrDeath = new Random(seed);\n \n // Give life to random *predicted* cells in the board\n for (int row = 0; row < this.NUM_ROWS; row++)\n for (int column = 0; column < this.NUM_COLUMNS; column++)\n this.gameBoard[row][column] = new \n GoLCell(randomLifeOrDeath.nextBoolean());\n }", "@Override\n public void setSeed(final long seed) {\n if ((seed >= 0) && (seed < LONG_LIMIT)) {\n setSeed((int) seed);\n } else {\n int[] tmp = new int[2];\n tmp[0] = (int) (seed & 0xffffffff);\n tmp[1] = (int) (seed >>> INT_SIZE);\n setSeed(tmp);\n }\n }", "public XorWowRandom(int r8, int r9) {\n /*\n r7 = this;\n int r5 = ~r8\n int r0 = r8 << 10\n int r1 = r9 >>> 4\n r6 = r0 ^ r1\n r3 = 0\n r4 = 0\n r0 = r7\n r1 = r8\n r2 = r9\n r0.<init>(r1, r2, r3, r4, r5, r6)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.random.XorWowRandom.<init>(int, int):void\");\n }", "public void setSeed(long seed) {\n\tif (seed < POW3_33 + 100) {\n\t seed += POW3_33 + 100;\n\t}\n\tseed &= (POW2_53 - 1L);\n\tsetSeedRaw(seed);\n }", "public void setSeed(long seed) {\n real.setSeed(seed);\n twister.setSeed(seed);\n }", "public TrollGame (int seed){\n rand = new Random(seed);\n initBoard(ROWS, COLS, rand);\n }", "public Mazealgo(long seed) {\n this.seed = seed;\n this.random = new Random(seed);\n }", "void reset(int randomseed);", "public void setSeed(String seed) \n\t{\n\t}", "public CellularAutomatonRNG(SeedGenerator seedGenerator) throws SeedException\n {\n this(seedGenerator.generateSeed(SEED_SIZE_BYTES));\n }", "public static void randomInit(int r) { }", "public ScenarioGenerator(long seed) {\n rd.setSeed(seed);\n }", "public HashPermute(int seed) {\n\t\tthis.seed = HashFunction.getRandomSeed(seed);\n\t}", "@ProgrammaticProperty\n public void setSeed(String seed) {\n m_randomSeed = seed;\n }", "public CellularAutomatonRNG()\n {\n this(DefaultSeedGenerator.getInstance().generateSeed(SEED_SIZE_BYTES));\n }", "public void setSeed(int seed) {\n this.seed = seed;\n mersenne = new MersenneTwister(seed);\n }", "private void seedCommand(String seed) {\n try {\n _randomSource.setSeed(Long.parseLong(seed));\n } catch (NumberFormatException excp) {\n error(\"Invalid number: %s\", seed);\n System.out.println();\n }\n }", "public void setSeedRaw(final long seed) {\n\t// TBD: add check, throw exception\n\tddmuldd(expm2((double) seed - POW3_33, POW3_33), POW3_33_DIV_2, dd1);\n\tdddivd(dd1, POW3_33, dd2);\n\tddmuldd(Math.floor(dd2[0]), POW3_33, dd2);\n\tddsub(dd1, dd2, dd3);\n\td1 = dd3[0];\n }", "public void seedCommand(String seed) {\r\n try {\r\n _randomSource.setSeed(Long.parseLong(seed));\r\n } catch (NumberFormatException excp) {\r\n error(\"Invalid number: %s\", seed);\r\n }\r\n }", "public Random() {\n real = new UniversalGenerator();\n twister = new MersenneTwister();\n }", "private PRNG() {\n java.util.Random r = new java.util.Random();\n seed = r.nextInt();\n mersenne = new MersenneTwister(seed);\n }", "@Override\n public Builder seed(long randomSeed) {\n super.seed(randomSeed);\n return this;\n }", "public static void setSeed(long s) {\r\n seed = s;\r\n random = new Random(seed);\r\n }", "public void initialize() throws IllegalActionException {\n\t\tsuper.initialize();\n\n\t\tlong seedValue = ((LongToken) (seed.getToken())).longValue();\n\n\t\tif (seedValue != 0) {\n\t\t\t_random.setSeed(seedValue);\n\t\t} else {\n\t\t\t_random.setSeed(System.currentTimeMillis() + hashCode());\n\t\t}\n\t}", "public Rng(int sides, long seed) {\n\t\tthis.sides = sides;\n\t\tr = new Random(seed);\n\t}", "public void setSeed(Square.State seed) {\n this.mySeed = seed;\n oppSeed = (mySeed == Square.State.CROSS) ? Square.State.NOUGHT : Square.State.CROSS;\n }", "@Override\n public void setSeed(final int seed) {\n int counterMask = 3;\n int[] status = new int[4];\n status[0] = seed;\n status[1] = parameter.getMat1();\n status[2] = parameter.getMat2();\n status[3] = parameter.getTmat();\n for (int i = 1; i < MIN_LOOP; i++) {\n status[i & counterMask] ^= i + MAGIC_NUMBER3\n * (status[(i - 1) & counterMask]\n ^ (status[(i - 1) & counterMask]\n >>> INITIALIZE_SHIFT2));\n }\n st0 = status[0];\n st1 = status[1];\n st2 = status[2];\n st3 = status[3];\n periodCertification();\n for (int i = 0; i < MIN_LOOP; i++) {\n nextState();\n }\n clear();\n }", "public GridSimRandom(long seed, double lessFactorIO, double moreFactorIO,\n double lessFactorExec, double moreFactorExec)\n {\n random_.setSeed(seed);\n lessFactorIO_ = lessFactorIO;\n moreFactorIO_ = moreFactorIO;\n lessFactorExec_ = lessFactorExec;\n moreFactorExec_ = moreFactorExec;\n }", "public void initWorldGenSeed(long p_75905_1_) {\n/* 99 */ this.worldGenSeed = p_75905_1_;\n/* */ \n/* 101 */ if (this.parent != null)\n/* */ {\n/* 103 */ this.parent.initWorldGenSeed(p_75905_1_);\n/* */ }\n/* */ \n/* 106 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 107 */ this.worldGenSeed += this.baseSeed;\n/* 108 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 109 */ this.worldGenSeed += this.baseSeed;\n/* 110 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 111 */ this.worldGenSeed += this.baseSeed;\n/* */ }", "public ARXLogisticRegressionConfiguration setSeed(int seed) {\n this.seed = seed;\n return this;\n }", "public final void randomSeed(long what){\n\t\tsetSeed(what);\n\t\trandom();\n\t}", "public GSRandom() {\r\n\t\t\r\n\t}", "@Override\n protected void engineSetSeed(byte[] seed) {\n return;\n }", "public void setSeed (long seed[]) {\n // Must use long because there is no unsigned int type.\n if (seed.length < 6)\n throw new IllegalArgumentException (\"Seed must contain 6 values\");\n if (seed[0] == 0 && seed[1] == 0 && seed[2] == 0)\n throw new IllegalArgumentException\n (\"The first 3 values must not be 0\");\n if (seed[3] == 0 && seed[4] == 0 && seed[5] == 0)\n throw new IllegalArgumentException\n (\"The last 3 values must not be 0\");\n final long m1 = 4294967087L;\n if (seed[0] >= m1 || seed[1] >= m1 || seed[2] >= m1)\n throw new IllegalArgumentException\n (\"The first 3 values must be less than \" + m1);\n final long m2 = 4294944443L;\n if (seed[3] >= m2 || seed[4] >= m2 || seed[5] >= m2)\n throw new IllegalArgumentException\n (\"The last 3 values must be less than \" + m2);\n for (int i = 0; i < 6; ++i)\n Ig[i] = seed[i];\n resetStartStream();\n }", "public StressChange(long seed) {\n super(seed);\n }", "public long getSeed()\n {\n return randomSeed;\n }", "public GameNode(Random rng) {\n this.number = rng.nextInt(8) + 1;\n this.next = null;\n }", "public void initialize() {\n\t\tinitialize(seedValue0, seedValue1);\n\t}", "public void initialize(long seed0, long seed1) {\n\t\tbytesDigested = 0;\n\t\tbyteCount = 0;\n\t\thashState[0] = seed0;\n\t\thashState[1] = seed1;\n\t}", "ReservoirSamplerWithoutReplacement(int numSamples, long seed) {\n\t\tPreconditions.checkArgument(numSamples >= 0, \"numSamples should be non-negative.\");\n\t\tthis.numSamples = numSamples;\n\t\tthis.random = new XORShiftRandom(seed);\n\t\tthis.queue = new PriorityQueue<>(numSamples);\n\t}", "public RNGRandomImpl() {\n\t\tsetRand(new Random());\n\t}", "public void initializeSeed(byte[] seedIn)\n {\n System.arraycopy(seedIn, 0, this.seedNext, 0, this.messDigestTree\n .getDigestSize());\n this.seedInitialized = true;\n }", "public void init( int pointDimension, long randomSeed );", "private static byte[] genKeyWithSeed(String seed) throws Exception {\n\t\tKeyGenerator kg = KeyGenerator.getInstance(ALGORITHM);\n\t\tkg.init(256, new SecureRandom(seed.getBytes()));\n\n\t\tSecretKey secretKey = kg.generateKey();\n\t\treturn secretKey.getEncoded();\n\t}", "public long getSeed()\r\n {\r\n return this.randomSeed;\r\n }", "public static long getSeed() {\r\n return seed;\r\n }", "@Before\n public void setUp() {\n randSeeder = new Random(42);\n\n //Show we haven't seeded the test's random number generator\n randSeed = RAND_UNSEEDED;\n comp = IntPlus.getIntComparator();\n }", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "public int getSeed() {\r\n return seed;\r\n }", "public int getSeed(){\n return this.seed; \n }", "public byte[] newSeed() {\r\n return engineSpi.newSeed();\r\n }", "Seed(){\r\n seedCells = new ArrayList<>();\r\n edgeCells = new ArrayList<>();\r\n }", "public long getSeed() {\n return seed;\n }", "public DuelistRNG() {\n this((long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L),\n (long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L));\n }", "public static void setPackageSeed (long seed[]) {\n // Must use long because there is no unsigned int type.\n if (seed.length < 6)\n throw new IllegalArgumentException (\"Seed must contain 6 values\");\n if (seed[0] == 0 && seed[1] == 0 && seed[2] == 0)\n throw new IllegalArgumentException\n (\"The first 3 values must not be 0\");\n if (seed[5] == 0 && seed[3] == 0 && seed[4] == 0)\n throw new IllegalArgumentException\n (\"The last 3 values must not be 0\");\n final long m1 = 4294967087L;\n if (seed[0] >= m1 || seed[1] >= m1 || seed[2] >= m1)\n throw new IllegalArgumentException\n (\"The first 3 values must be less than \" + m1);\n final long m2 = 4294944443L;\n if (seed[5] >= m2 || seed[3] >= m2 || seed[4] >= m2)\n throw new IllegalArgumentException\n (\"The last 3 values must be less than \" + m2);\n for (int i = 0; i < 6; ++i)\n nextSeed[i] = seed[i];\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}", "public LMScrambleShift (RandomStream stream) {\n super(stream);\n }", "public DigitalNetBase2IteratorShiftGenerators() {\n super(); \n dimS = dim + 1;\n if (digitalShift != null && dimShift < dimS)\n addRandomShift (dimShift, dimS, shiftStream);\n resetCurPointIndex();\n }", "public Seed() {\r\n\t\tcards = new Cards();\r\n\t\tseedCards = new ArrayList<Cards>();\r\n\t\tdescription = \"\";\r\n\t\tautoSummary = \"\";\r\n\t}", "Event generateEvent(int seed) throws Exception {\n return new Event(\n new Description(\"Event \" + seed),\n new StartTime(\"0900\"),\n new StartDate(Integer.toString((Integer.parseInt(\"200317\") + seed))),\n new EndTime(\"1100\"),\n new EndDate(Integer.toString((Integer.parseInt(\"200317\") + seed))),\n new Location(\"House of \" + seed),\n new UniqueTagList(new Tag(\"tag\" + Math.abs(seed)), new Tag(\"tag\" + Math.abs(seed + 1)))\n );\n }", "public int getSeed() {\n return seed;\n }", "public int getSeed() {\n return seed;\n }", "public MiddleSquarePseudoRandom(long seed,int size){\r\n\t\tthis.curVal = seed;\r\n\t\tthis.size = size;\r\n\t\tthis.sizeMax = (long) Math.pow(10, size);\r\n\t\tthis.seed = seed;\t\t\r\n\t}", "public Rng() {\n\t\tr = new Random();\n\t}", "public ProcessGenerator(int numProcesses, int RandomSeed) {\n // initialise instance variables\n this.numProcesses = numProcesses;\n processArrayList = new ArrayList<>();\n this.RandomSeed = RandomSeed;\n\n }", "public MarkovZero() {\n\t\tmyRandom = new Random();\n\t}", "public void randomX() {\r\n\t\tdouble randomDub = Math.random();\r\n\t\tint randomIntX = (int)randomDub*4;\r\n\t\tthis.xcoord = randomIntX;\r\n\t}", "private String getRandomSeed() {\n long newSeed = 0;\n Random randBoolean = new Random(randomSeed);\n for (int i = 0; i < 48; i++) {\n if (randBoolean.nextBoolean()) {\n newSeed += 1 << i;\n }\n }\n if (newSeed < 0) {\n newSeed = Math.abs(newSeed);\n }\n\n String s = \"\";\n if (newSeed == 0) {\n s += \"0\";\n } else {\n while (newSeed != 0) {\n long num = (newSeed & (0xF));\n if (num < 10) {\n s = num + s;\n } else {\n s = ((char) (num + 55)) + s;\n }\n newSeed = newSeed >> 4;\n }\n }\n return s;\n }", "public RandomNeighborhoodOperator(int nbRelaxedVars, long seed)\n{\n\trandom = new Random(seed);\n\tthis.nbRelaxedVars = nbRelaxedVars;\n\tselected = new TIntHashSet();\n}", "private void newGame(long seed) {\n ter.initialize(WIDTH, HEIGHT, 0, -3);\n GameWorld world = new GameWorld(seed);\n String toSave = \"N\" + seed + \"S\";\n world.setSaveScript(toSave);\n for (int x = 0; x < WIDTH; x += 1) {\n for (int y = 0; y < HEIGHT; y += 1) {\n world.world[x][y] = Tileset.NOTHING;\n }\n }\n world.buildManyRandomSq();\n GameWorld.Position avatarPosition = randomAvatarPosition(world);\n ter.renderFrame(world.world);\n loadAvatar(world, avatarPosition);\n }", "public void setSeed(byte[] value) {\n this.seed = ((byte[]) value);\n }", "public long getSeed(){\n\t\treturn this.seed;\n\t}", "public Mazealgo() {\n Random number = new Random();\n long i = number.nextLong();\n this.random = new Random(i);\n this.seed = i;\n }", "public EarthGeometry(int iRandomSeed){\n\t\tgcl1 = new GeodeticCalculator();\n\t\trnd1 = new Random(iRandomSeed);\n\t}", "PermutationGenerator(Random random) {\n\t\tm_random = random;\n\t}", "private static int initialiseSeed(String seedString) {\n \tint randomSeed = 0;\n\t\ttry {\n \trandomSeed = Integer.parseInt(seedString);\n \t}\n \tcatch(Exception e){\n \t\tSystem.out.println(\"Please pass the value for random seed as an integer number.\");\n\t\t\texitArgumentError();\n \t}\n\t\treturn randomSeed;\n\t}" ]
[ "0.73796856", "0.7347991", "0.7077441", "0.67196226", "0.66560626", "0.65683645", "0.6517424", "0.6404331", "0.63789535", "0.63390875", "0.62855947", "0.62750787", "0.6230842", "0.61615014", "0.6047007", "0.60252815", "0.6014131", "0.59666", "0.5957604", "0.59503925", "0.59304994", "0.5904176", "0.5835825", "0.5826597", "0.5760384", "0.5729401", "0.5699941", "0.56719184", "0.5671163", "0.567045", "0.5645292", "0.56284904", "0.5621831", "0.5601376", "0.5598721", "0.5585129", "0.55839616", "0.5583599", "0.55752766", "0.5569201", "0.55439645", "0.5543617", "0.55133337", "0.54830337", "0.5473763", "0.54211724", "0.5416572", "0.5362173", "0.53431195", "0.53289074", "0.5261814", "0.5253884", "0.524685", "0.52196413", "0.5194352", "0.5175017", "0.51662356", "0.5128459", "0.5117625", "0.51067966", "0.5101965", "0.50867647", "0.50726724", "0.5063147", "0.5045818", "0.5044577", "0.50425136", "0.5035141", "0.50290334", "0.50262743", "0.50076556", "0.49993345", "0.49891025", "0.49670005", "0.49644235", "0.49554524", "0.49411473", "0.4932511", "0.4928165", "0.4925188", "0.4919245", "0.4904478", "0.4895442", "0.48781037", "0.4857406", "0.4857406", "0.4854001", "0.48413804", "0.48356438", "0.4834339", "0.48285508", "0.48204145", "0.48194396", "0.4806008", "0.48032168", "0.47912085", "0.47790715", "0.47782344", "0.47734484", "0.47595546" ]
0.8639817
0
Gets the current seed value.
public long getSeed() { return seed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static long getSeed() {\r\n return seed;\r\n }", "public long getSeed(){\n\t\treturn this.seed;\n\t}", "public int getSeed() {\r\n return seed;\r\n }", "public long getSeed() {\n return seed;\n }", "public int getSeed() {\n return seed;\n }", "public int getSeed() {\n return seed;\n }", "public int getSeed()\n {\n return map.getSeed();\n }", "public long getSeed()\r\n {\r\n return this.randomSeed;\r\n }", "public long getSeed()\n {\n return randomSeed;\n }", "public String getSeed() {\n return m_randomSeed;\n }", "public byte[] getSeed() {\n return seed;\n }", "String getSeed();", "public int getSeed(){\n return this.seed; \n }", "public long getSimulationSeed()\r\n\t{\r\n\t\treturn(getParent().getSimulationSeed());\r\n\t}", "protected Random get_rand_value()\n {\n return rand;\n }", "public byte[] newSeed() {\r\n return engineSpi.newSeed();\r\n }", "protected final long seedRoll() {\r\n Long time = System.currentTimeMillis();\r\n String hexSeed = String.format(\"%x\", new BigInteger(1, mGame.getSeed().getBytes()));\r\n Long seed = Long.parseLong(hexSeed, 16);\r\n\r\n return time + seed;\r\n }", "public byte[] getSeedActive()\n {\n return this.seedActive;\n }", "private String getRandomSeed() {\n long newSeed = 0;\n Random randBoolean = new Random(randomSeed);\n for (int i = 0; i < 48; i++) {\n if (randBoolean.nextBoolean()) {\n newSeed += 1 << i;\n }\n }\n if (newSeed < 0) {\n newSeed = Math.abs(newSeed);\n }\n\n String s = \"\";\n if (newSeed == 0) {\n s += \"0\";\n } else {\n while (newSeed != 0) {\n long num = (newSeed & (0xF));\n if (num < 10) {\n s = num + s;\n } else {\n s = ((char) (num + 55)) + s;\n }\n newSeed = newSeed >> 4;\n }\n }\n return s;\n }", "static public Long randomval() {\n Random rand = new Random();\n Long val = rand.nextLong() % p;\n return val;\n }", "public Random getRandom() {\n\t\treturn (rand);\n\t}", "@Override\r\n\t\tpublic Double get() {\n\t\t\treturn Math.random();\r\n\t\t}", "public long getValue() throws Exception {\n\n Random r = new Random();\n return (long)(r.nextFloat() * 100F);\n }", "public int getRandom() {\n int randomIdx = random.nextInt(valueList.size());\n return valueList.get(randomIdx);\n }", "public int getRandom() {\n int index = rnd.nextInt(list.size());\n return list.get(index).val;\n }", "public int getRandom() {\n // get a random integer from [0, n) where n is the size of the value list\n return values.get(random.nextInt(values.size()));\n }", "@Override\n\t protected int getSeedItem()\n\t {\n\t\t return seedID;\n\t }", "public static double random() {\r\n return uniform();\r\n }", "public static int getSeedValue(int run, int solverConfigId, int InstanceId, int ExperimentId) throws SQLException {\n PreparedStatement st = DatabaseConnector.getInstance().getConn().prepareStatement(\"SELECT seed FROM \" + table + \" \" +\n \"WHERE run=? AND SolverConfig_idSolverConfig=? AND Instances_idInstance=? AND Experiment_idExperiment=? ;\");\n st.setInt(1, run);\n st.setInt(2, solverConfigId);\n st.setInt(3, InstanceId);\n st.setInt(4, ExperimentId);\n ResultSet rs = st.executeQuery();\n rs.next();\n int seed = rs.getInt(\"seed\");\n rs.close();\n return seed;\n }", "private Random getRandom()\n\t{\n\t\tif (this.random == null)\n\t\t{\n\t\t\t// Calculate the new random number generator seed\n\t\t\tlong seed = System.currentTimeMillis();\n\t\t\tlong t1 = seed;\n\t\t\tchar entropy[] = getEntropy().toCharArray();\n\t\t\tfor (int i = 0; i < entropy.length; i++)\n\t\t\t{\n\t\t\t\tlong update = ((byte) entropy[i]) << ((i % 8) * 8);\n\t\t\t\tseed ^= update;\n\t\t\t}\n\t\t\tthis.random = new java.util.Random();\n\t\t\tthis.random.setSeed(seed);\n\t\t}\n\n\t\treturn (this.random);\n\n\t}", "public int getNextValue() {\n\t\tRandom randomGenerator = new Random();\n\t\tint randomInt = randomGenerator.nextInt(100) + 1;\n\t\treturn randomInt;\n\t}", "public double randomValue(){\n\t\treturn _randomValue() + _randomValue() + _randomValue();\n\t}", "@Override\n public Integer pee() {\n return (int) (random() * 8);\n }", "private Long getSeedSequence() {\n String s1 = \"Please enter seed and end with 'S'\";\n boolean getin = false;\n drawFrame(20, 20, s1, true);\n String seedstr = \"\";\n while (!getin) {\n if (StdDraw.hasNextKeyTyped()) {\n drawFrame(20, 20, \"\", true);\n Character ch = StdDraw.nextKeyTyped();\n if ((ch.equals('S') || ch.equals('s'))) {\n return Long.parseLong(seedstr);\n }\n seedstr += ch;\n drawFrame(20, 20, seedstr, false);\n }\n }\n return Long.parseLong(seedstr);\n }", "public int next() {\r\n\t\t// Get a random value\r\n\t\tint index = random.nextInt(values.length);\r\n\t\tint byteValue = values[index] + 128; // For an unsigned value\r\n\t\tint value = byteValue * 3;\r\n\t\t// If byteValue = 255 (max), then choose between 765000 and 799993\r\n\t\tif (byteValue == 255) {\r\n\t\t\tvalue += random.nextInt(800-765+1);\r\n\t\t}\r\n\t\t// Otherwise, choose between value and value + 2 (inc)\r\n\t\telse {\r\n\t\t\tvalue += random.nextInt(3);\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "public int getRandom() {\n \n return this.nums.get(this.rand.nextInt(this.nums.size()));\n \n }", "public int getRandom() {\n return nums.get(rand.nextInt(nums.size()));\n }", "public int getRandom() {\n return data.get(random.nextInt(data.size()));\n }", "public int getRandom() {\n Random random = new Random();\n return nums.get(random.nextInt(nums.size()));\n }", "public int getRandom() {\n return data.get(random.nextInt(data.size()));\n }", "private static int get() { \r\n Random r = new Random();\r\n return (r.nextInt(9));\r\n }", "public int getRandom() {\n return nums.get((int) (Math.random() * nums.size()));\n }", "public long getState()\n {\n return ((StatefulRandomness)random).getState();\n }", "public static int randomGet() { return 0; }", "public int getRandom() {\n return nums.get(random.nextInt(nums.size()));\n }", "public int getRandom() {\n return nums.get(random.nextInt(nums.size()));\n }", "public static int getRandom() \n\t{\n\t\treturn rGenerator.nextInt();\n\t}", "public double getRandom(){\n\t\treturn random.nextDouble();\n\t}", "public Random getRandomNumberGenerator() { return randomNumberGenerator; }", "void new_seed( Seed seed );", "public interface RandomSeed {\n\n\t/**\n\t * @return Uma semente randomica entre 0 e 1 inclusive.\n\t */\n\tpublic double getSeed();\n}", "public int getRandom() {\n Random random = new Random();\n int val = list.get( random.nextInt(list.size()));\n return val;\n }", "public static double rand() {\n return (new Random()).nextDouble();\n }", "public int getRandom() {\n return arr.get(r.nextInt(arr.size()))[0];\n }", "public BigInteger getCurrentValue()\r\n { \t\r\n \tlog.debug(\"counter: \" + currentValue.intValue() );\r\n return this.currentValue;\r\n }", "public Result getCurrentValue() throws IOException, InterruptedException {\n return value;\n }", "public static double uniform() {\r\n return random.nextDouble();\r\n }", "public long getValue()\n {\n return itsValue;\n }", "public void seed(long seed) {\n }", "public int getRandomIndex() {\n\t\treturn this.getRandomIndex(this.rng);\n\t}", "public static double uniform() {\n return random.nextDouble();\n }", "private static int getNumber() {\n LOG.info(\"Generating Value\");\n return 1 / 0;\n }", "public long getValue() {\n return value_;\n }", "public int value() {\n return value;\n }", "public int value() \n {\n return value;\n }", "public static long next() {\n return System.currentTimeMillis();\n }", "public long getValue() {\n return value_;\n }", "public Future<Integer> getValue() {\n GetValue getValue = new GetValue(this.generator);\n return this.scheduled.schedule(getValue, this.delay, TimeUnit.MILLISECONDS);\n }", "public java.lang.String getRnd () {\r\n\t\treturn rnd;\r\n\t}", "private int randomValue() {\r\n\t\tRandom rand = new Random();\r\n\t\tint val = rand.nextInt(10);\r\n\t\tif(val == 9)\r\n\t\t\treturn 4;\r\n\t\telse\r\n\t\t\treturn 2;\r\n\t}", "protected Random rng() {\r\n\t\tif (entity == null || entity.world == null) {\r\n\t\t\treturn rand;\r\n\t\t}\r\n\t\treturn entity.world.rand;\r\n\t}", "public void setSeed(int seed){\n this.seed = seed; \n }", "public Random getRandomGenerator() {\n return randomGenerator;\n }", "private int rand() {\n return (int)(Math.random()*(RAND_MAX + 1));\n }", "public int getRandom() {\n Random random = new Random();\n return list.get(random.nextInt(list.size()));\n }", "public void setRNG(long seed);", "private double getRandom() {\n return 2*Math.random() - 1;\n }", "public int nextInt() {\n return mersenne.nextInt();\n }", "public int getRandom() {\n Random rand = new Random();\n int idx = rand.nextInt(validLength);\n return set.get(idx);\n }", "private int evaluate() {\n return (int) (Math.random() * 8);\n }", "public int getRandom() {\n return A.get(r.nextInt(A.size()));\n }", "private int getCurrentValue()\n {\n return\n // Overall wait time...\n _countdownValue -\n // ...minus the time we waited so far.\n (int)(_clock.currentTime() - _startWait);\n }", "public static int randomNext() { return 0; }", "public Number getValue() {\n return currentVal;\n }", "void setSeed(long seed);", "public int getCurrentValue() {\n\t\treturn this.currentValue;\n\t}", "public int getValue () {\n return value;\n }", "public int getRandom() {\n return _list.get( rand.nextInt(_list.size()) );\n }", "public int getValue() {\n return value_;\n }", "public int getValue() {\n return value_;\n }", "public int getRandom() {\n int idx;\n Random rand;\n \n rand = new Random();\n idx = rand.nextInt(set.size());\n return set.get(idx);\n }", "public int getValue() {\r\n return lives;\r\n }", "public static double genRandomRestNumber() {\n return Simulator.randomGenerator.genRandomRest();\n }", "public long getValue() {\n\t\treturn this._value;\n\t}", "public int getValue() {\n return value_;\n }", "private Random rand()\n\t{\n\t\treturn new Random();\n\t}", "public int getRandomPositiveInt(){\r\n long gen = (a*seed+c)%m;\r\n seed = gen;\r\n return (int)gen;\r\n }", "public int getRandom() {\n int index = (int) Math.round(Math.random()*(list.size()-1));\n return list.get(index);\n }", "public int getValue()\r\n {\r\n return value;\r\n }", "public int value() {\n return this.value;\n }" ]
[ "0.8119474", "0.8059007", "0.80319947", "0.80073917", "0.7966063", "0.7966063", "0.7852292", "0.7820206", "0.7814707", "0.7663458", "0.763818", "0.74653196", "0.7405393", "0.71944803", "0.6983639", "0.6854664", "0.67085916", "0.6675985", "0.6649837", "0.6555143", "0.64486235", "0.640821", "0.6388079", "0.6387721", "0.6374483", "0.6269087", "0.6234208", "0.62299514", "0.62256855", "0.6203179", "0.61948276", "0.6188206", "0.6184267", "0.61833805", "0.6175086", "0.616408", "0.6145991", "0.61402595", "0.6136126", "0.6130433", "0.61050713", "0.6098613", "0.60949624", "0.60926175", "0.608538", "0.6084514", "0.6072918", "0.60499793", "0.6037008", "0.6012071", "0.5994338", "0.599203", "0.5964986", "0.59437585", "0.5936051", "0.59347486", "0.5934548", "0.59345436", "0.5924194", "0.5917219", "0.59160095", "0.59136003", "0.591233", "0.58973616", "0.5896663", "0.5864677", "0.5853824", "0.5852781", "0.58505934", "0.5847509", "0.5842259", "0.58326346", "0.5817186", "0.581691", "0.578365", "0.57763135", "0.57736814", "0.57614946", "0.57584745", "0.57541925", "0.5752151", "0.5747965", "0.57442486", "0.5739957", "0.573975", "0.57381874", "0.5737635", "0.5736173", "0.5735597", "0.5735597", "0.57312655", "0.5730329", "0.5726109", "0.5714762", "0.5704351", "0.570353", "0.5697678", "0.5693768", "0.5688501", "0.56879646" ]
0.80196375
3
Creates request for daily goals and sends as a json object.
private static String fetchElevHistory(){ RequestData req = new RequestData("activities/elevation/date/today/max"); //make request req.sendRequest(); //send request JSONObject json1 = new JSONObject(req.getBody()); //make json from response JSONArray json = json1.getJSONArray("activities-elevation"); return json.toString(); //return goals as json }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getWeekCalorieData(String accessToken, boolean getGoal) {\r\n ArrayList<String> taskParamsList = new ArrayList<>();\r\n taskParamsList.add(accessToken);\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/calories/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\");\r\n\r\n if(getGoal) {\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/date/\" +\r\n formattedEndDate + \".json\");\r\n }\r\n\r\n String[] taskParams = new String[taskParamsList.size()];\r\n taskParams = taskParamsList.toArray(taskParams);\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "@GetMapping(\"/activity\")\n Stats all() {\n Stats stats = new Stats();\n log.info(\"getting daily activity by default\");\n List<Activity> allActivity = repository.findAll();\n log.info(\"allActivity: \" + allActivity);\n Collections.sort(allActivity);\n Map<String, Integer> stepsByCategory = new TreeMap<String, Integer>();\n for (Activity activity : allActivity) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(activity.getUntilTime());\n int day = cal.get(Calendar.DAY_OF_YEAR);\n int year = cal.get(Calendar.YEAR);\n String dayOfYear = DAY + day + OF_YEAR + year;\n Integer steps = stepsByCategory.get(dayOfYear);\n if (steps == null) {\n steps = activity.getSteps();\n } else {\n steps += activity.getSteps();\n }\n stepsByCategory.put(dayOfYear, steps);\n }\n stats.setCategory(StatsCategory.DAILY);\n List<Details> details = new ArrayList<Stats.Details>();\n if(stepsByCategory != null) {\n for (Entry entry : stepsByCategory.entrySet()) {\n Details stat = stats.new Details();\n stat.key = entry.getKey().toString();\n stat.steps = entry.getValue().toString();\n details.add(stat);\n }\n stats.setDetails(details);\n }\n //stats.setStepsByCategory(stepsByCategory);\n return stats;\n }", "@Override\n public void mySchedule(String date) {\n FastJsonRequest request = new FastJsonRequest(SystemUtils.mainUrl + MethodCode.CLASSSCHEDULE + MethodType.MYSCHEDULEV2, RequestMethod.POST);\n request.add(\"username\", application.getSystemUtils().getDefaultUsername());\n request.add(\"token\", application.getSystemUtils().getToken());\n request.add(\"date\", date);\n request.add(MethodCode.DEVICEID, application.getSystemUtils().getSn());\n request.add(MethodCode.DEVICETYPE, SystemUtils.deviceType);\n request.add(MethodCode.APPVERSION, SystemUtils.getVersionName(context));\n addQueue(MethodCode.EVENT_MYSCHEDULE, request);\n\n\n// startQueue();\n }", "@Override\r\n\tpublic void service(AgiRequest request, AgiChannel channel)\r\n\t\t\tthrows AgiException {\n\t\t\r\n\t\tCalendar cToday = Calendar.getInstance();\r\n\t\t\r\n\t\tCalendar cTomorrow = Calendar.getInstance();\r\n\t\tcTomorrow.add(Calendar.DAY_OF_MONTH, 1);\r\n\t\t\r\n\t\tsetVariable(\"tomMilsec\", \"\" + cTomorrow.getTimeInMillis());\r\n\t\t\r\n\t\tsetVariable(\"tdMilsec\", \"\" + cToday.getTimeInMillis());\r\n \r\n\t\tsetVariable(\"tddate\", formatCalendar(cToday));\r\n\t}", "@Scheduled(cron = \"0 1 * * * *\")\n public void dailyTasks(){\n logger.info(\"Daily task started\");\n\n logger.info(\"Sending overdue emails\");\n List<Payment> overduePayments = new ArrayList<>();\n List<Payment> futurePayments = new ArrayList<>();\n paymentService.addPendingPayments(futurePayments, overduePayments);\n for(Payment overdue: overduePayments){\n Client client = overdue.getClient();\n if(client == null) throw new IllegalStateException(\"Payment \" + overdue.getId() + \" should have a valid client \");\n String email = client.getEmail();\n if(StringUtils.isEmpty(email)) continue;\n overdueEmailBody.replaceAll(\"\\\\$name\", client.getFirstName()).replaceAll(\"\\\\$unit\", overdue.getUnit().getName()).replaceAll(\"\\\\amount\", String.valueOf(overdue.getAmount()));\n emailSender.sendEmail(email, overdueEmailSubject, overdueEmailBody );\n }\n for(Payment payment: futurePayments){\n Client client = payment.getClient();\n if(client == null) throw new IllegalStateException(\"Payment \" + payment.getId() + \" should have a valid client \");\n String email = client.getEmail();\n if(StringUtils.isEmpty(email)) continue;\n futureEmailBody.replaceAll(\"\\\\$name\", client.getFirstName()).replaceAll(\"\\\\$unit\", payment.getUnit().getName()).replaceAll(\"\\\\amount\", String.valueOf(payment.getAmount()));\n emailSender.sendEmail(email, futureEmailSubject, futureEmailBody );\n }\n\n }", "@Override\n public String getEndPoint() {\n return \"/v1/json/schedule\";\n }", "private void getDateForAnalysisReport() {\n \tArrayList<Object> answer = new ArrayList<>();\n\t\tanswer.add(\"performingAnActivityTracking\");\n\t\tanswer.add(\"/getActivityData\");\n\t\tString star = reportStartDate.getValue().toString();\n\t\tString end = reportEndDate.getValue().toString();\n\t\tanswer.add(star);\n\t\tanswer.add(end);\n\t\t\n\t\tchs.client.handleMessageFromClientUI(answer);\n\t}", "public void addTimer(){\n RequestQueue rq = Volley.newRequestQueue(getApplicationContext());\n\n StringRequest request = new StringRequest(Request.Method.POST, URL, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n //display\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error)\n {\n error.printStackTrace();\n }\n }) {\n @Override\n public String getBodyContentType() {\n return \"application/json; charset=utf-8\";\n }\n\n @Override\n public byte[] getBody() {\n Gson gson = new Gson();\n String json = gson.toJson(dateStart);\n json = json.concat(\",\").concat(gson.toJson(dateEnd));\n\n try{ return (json).getBytes(\"utf-8\"); }\n catch (UnsupportedEncodingException e) { return null; }\n }\n };\n rq.add(request);\n }", "private void getDayNonSedTimeData(String accessToken) {\r\n String[] taskParams = new String[2];\r\n taskParams[0] = accessToken;\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n taskParams[1] = \"https://api.fitbit.com/1/user/-/activities/steps/date/\"\r\n + formattedEndDate + \"/1d/15min.json\";\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "@PostMapping(\"/{email}/send/beat\")\n public boolean sendBeatInfo(@PathVariable String email, @RequestBody Map<String, Object> req) {\n String time_str = (String) req.get(\"time\");\n String beat_str = (String) req.get(\"beat\");\n String rrInterval_str = (String) req.get(\"rrInterval\");\n\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n LocalDateTime dateTime = LocalDateTime.parse(time_str, formatter);\n Double beat = Double.valueOf(beat_str);\n Double rrInterval = Double.valueOf(rrInterval_str);\n BeatInfo beatInfo = BeatInfo.of(dateTime, beat, rrInterval);\n\n userRepository.findById(email).subscribe(u1 -> {\n List<BeatInfo> beats = u1.getBeatList();\n beats.add(beatInfo);\n User newUser = User.builder().email(u1.getEmail()).name(u1.getName()).build();\n newUser.setBeatList(beats);\n userRepository.save(newUser).subscribe(u2 -> {\n publisher.publishEvent(BeatEvent.builder().email(u2.getEmail()).name(u2.getName()).beatInfoList(u2.getBeatList()).build());\n });\n });\n return true;\n }", "@RequestMapping(value = \"/getDailyReportGraphOfIndividual\", method = RequestMethod.POST)\r\n public @ResponseBody String getDailyReportOfIndividual(@RequestParam(\"employeeId\") int employeeId,\r\n @RequestParam(\"attendanceDate\") String attendanceDate) {\r\n logger.info(\"inside ReportGenerationController getDailyReportOfIndividual()\");\r\n\r\n return reportGenerationService.getDailyReportOfIndividual(employeeId,\r\n new Date(Long.valueOf(attendanceDate)));\r\n }", "@Override\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\tSessionManager session = new SessionManager(getBaseContext());\n\t\t\tString user = session.GetUserIdFromSharedPreferences();\n\n\t\t\taJSONObject = new JSONObject();\n\n\t\t\tRestAPI api = new RestAPI();\n\n\t\t\ttry {\n\t\t\t\taJSONObject = api.ReportinDateRange(user, dateFrom, dateTo);\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\n\t\t\treturn null;\n\t\t}", "private void refreshGoalData () {\n DateTime now = DateTime.now();\n if((now.getWeekOfWeekyear() > userGoals.getWeekOfYear()) || now.getWeekOfWeekyear() == 0 ) {\n userGoals.setWeekOfYear(now.getWeekOfWeekyear());\n userGoals.setRunsPerWeekActual(0);\n userGoals.setMilesPerWeekActual(0.0);\n }\n\n //Calculates weekly mileage and runs per week\n double mileage = 0.0;\n int numOfRuns = 0;\n if(runMap != null && !(runMap.isEmpty())) {\n //Get current year and current week of the year\n int year = now.getYear();\n int currWeek = now.getWeekOfWeekyear();\n Calendar c = Calendar.getInstance();\n c.clear();\n //Set calendar to beginning of week\n c.set(Calendar.YEAR, year);\n c.set(Calendar.WEEK_OF_YEAR, currWeek);\n Date beginningOfWeek = c.getTime();\n\n SimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\n for (String key : runMap.keySet()) {\n Run run = runMap.get(key);\n //Date stored as MM/dd/yyyy\n try {\n Date dateOfRun = formatter.parse(run.getDate());\n if (dateOfRun.compareTo(beginningOfWeek) >= 0) {\n mileage += run.getMileage();\n numOfRuns++;\n }\n }catch (ParseException p) {\n //idfk\n }\n\n }\n\n if(userShoes != null && !userShoes.isEmpty()) {\n //While we're here, we're going to update the mileage for each shoe\n for (String shoeKey : userShoes.keySet()) {\n Shoe currShoe = userShoes.get(shoeKey);\n currShoe.setMileage(0.0);\n for (String runKey : runMap.keySet()) {\n if (currShoe.getName().equals(runMap.get(runKey).getShoe())) {\n currShoe.addMileage(runMap.get(runKey).getMileage());\n }\n }\n }\n }\n\n }\n userGoals.setRunsPerWeekActual(numOfRuns);\n userGoals.setMilesPerWeekActual(mileage);\n\n\n goalRef.setValue(userGoals);\n shoeRef.setValue(userShoes);\n\n check = 1;\n }", "@GetMapping(\"/activity/{category}\")\n Stats getStats(@PathVariable(value = \"category\") StatsCategory category) {\n Stats stats = new Stats();\n log.info(\"getting all activity\");\n List<Activity> allActivity = repository.findAll();\n Collections.sort(allActivity);\n Map<String, Integer> stepsByCategory = new TreeMap<String, Integer>();\n switch (category) {\n case DAILY:\n for (Activity activity : allActivity) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(activity.getUntilTime());\n int day = cal.get(Calendar.DAY_OF_YEAR);\n int year = cal.get(Calendar.YEAR);\n String dayOfYear = DAY + day + OF_YEAR + year;\n Integer steps = stepsByCategory.get(dayOfYear);\n if (steps == null) {\n steps = activity.getSteps();\n } else {\n steps += activity.getSteps();\n }\n stepsByCategory.put(dayOfYear, steps);\n }\n break;\n case WEEKLY:\n for (Activity activity : allActivity) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(activity.getUntilTime());\n int day = cal.get(Calendar.WEEK_OF_YEAR);\n int year = cal.get(Calendar.YEAR);\n String dayOfYear = WEEK + day + OF_YEAR + year;\n Integer steps = stepsByCategory.get(dayOfYear);\n if (steps == null) {\n steps = activity.getSteps();\n } else {\n steps += activity.getSteps();\n }\n stepsByCategory.put(dayOfYear, steps);\n }\n break;\n case MONTHLY:\n for (Activity activity : allActivity) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(activity.getUntilTime());\n int day = cal.get(Calendar.MONTH);\n int year = cal.get(Calendar.YEAR);\n String dayOfYear = MONTH + day + OF_YEAR + year;\n Integer steps = stepsByCategory.get(dayOfYear);\n if (steps == null) {\n steps = activity.getSteps();\n } else {\n steps += activity.getSteps();\n }\n stepsByCategory.put(dayOfYear, steps);\n }\n break;\n default:\n break;\n }\n List<Details> details = new ArrayList<Stats.Details>();\n if(stepsByCategory != null) {\n for (Entry entry : stepsByCategory.entrySet()) {\n Details stat = stats.new Details();\n stat.key = entry.getKey().toString();\n stat.steps = entry.getValue().toString();\n details.add(stat);\n }\n stats.setDetails(details);\n }\n //stats.setStepsByCategory(stepsByCategory);\n stats.setCategory(category);\n return stats;\n }", "public ArrayList<PomoDaily> getDaily(String userId) {\r\n PomoServer server = new PomoServer();\r\n String parameters = PomoServer.MODE_SELECT + \"&\" + \"userid=\" + userId;\r\n String url = PomoServer.DOMAIN_URL + PomoServer.SERVLET_DAILY;\r\n String data = server.get(url, parameters);\r\n ArrayList<PomoDaily> list = new ArrayList<>();\r\n if (data.equals(\"0\")) {\r\n return list;\r\n }\r\n String[] dailies = data.split(\";\");\r\n for (String d : dailies) {\r\n String[] attributes = d.split(\"&\");\r\n String id = attributes[0];\r\n String date = attributes[1];\r\n int plan = Integer.parseInt(attributes[2]);\r\n list.add(new PomoDaily(id, date, plan, userId));\r\n }\r\n return list;\r\n }", "@RequestMapping(value = \"report/estabelecimentos/date\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n @PreAuthorize(\"hasRole('ROLE_PUBLIC') or hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISOR')\")\n public ResponseEntity<?> reportByDate(@RequestBody Map<String, Object> jsonData) {\n verifyParamms(jsonData, new String[] { \"startDate\", \"endDate\" });\n try {\n LocalDate startDate = LocalDate.parse(jsonData.get(\"startDate\").toString(),\n DateTimeFormatter.ofPattern(\"dd/MM/yyyy\"));\n LocalDate endDate = LocalDate.parse(jsonData.get(\"endDate\").toString(),\n DateTimeFormatter.ofPattern(\"dd/MM/yyyy\"));\n List<Estabelecimento> listEstabelecimentos = repository.findByCreatedAtEstabelecimentos(startDate, endDate);\n byte[] bytes = jasperReportsService.generatePDFReport(listEstabelecimentos);\n return ResponseEntity.ok().header(\"Content-Type\", \"application/pdf; charset=UTF-8\")\n .header(\"Content-Disposition\", \"inline; filename=\\\"\" + \".pdf\\\"\").body(bytes);\n } catch (DateTimeParseException e) {\n throw new DateFormatterException(\"dd/MM/yyyy\");\n }\n }", "@Override\n\t\tprotected String doInBackground(String... args) {\n\t\t\tString title = inputName.getText().toString();\n\t\t\tString amount = inputAmount.getText().toString();\n\t\t\tint days = numOfDays.getInputType();\n\t\t\tString article = inputArticle.getText().toString();\n\n//\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\n//\t\t\tparams.add(new BasicNameValuePair(\"title\", title));\n//\t\t\tparams.add(new BasicNameValuePair(\"amount\", amount));\n//\t\t\tparams.add(new BasicNameValuePair(\"days\", days));\n//\t\t\tparams.add(new BasicNameValuePair(\"article\", article));\n//\n//\t\t\tJSONObject json = jsonParser.makeHttpRequest(url_create_campaign,\n//\t\t\t\t\t\"POST\", params);\n\t\t\tRestClient client =new RestClient(UrlLink.createCampaign);\n\t\t\tclient.AddParam(\"title\", title);\n\t\t\tclient.AddParam(\"goal\", amount);\n\t\t\tclient.AddParam(\"goalDuration\", Integer.toString(days));\n\t\t\tclient.AddParam(\"category\", Integer.toString(1));\n\t\t\tclient.AddParam(\"brief\", article);\n\t\t\ttry{\n\t\t\t\tclient.Execute(RequestMethod.POST);\n\t\t\t\tString response=client.getResponse();\n\t\t\t\treturn response;\n\t\t\t\t\n\t\t\t}catch(Exception ex){\n\t\t\t\tString response=client.getErrorMessage();\n\t\t\t\tLog.e(\"exception\",\"this\" ,ex);\n\t\t\t\treturn response;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "@GET(\"planetary/apod\")\n Call<APOD> getApod(\n @Query(\"date\") String date,\n @Query(\"api_key\") String API_KEY\n );", "@Test\n\t@When(\"posted with future date information\")\n\tpublic void posted_with_future_date_information() {\n\t\tRestAssured.baseURI = BASE_URL;\n\t\t RequestSpecification request = RestAssured.given();\n\t}", "private void getGoals() {\n goalsAdapter.clear();\n goalsReference.get()\n .addOnSuccessListener(success -> {\n List<DocumentSnapshot> documentSnapshots = success.getDocuments();\n\n if (documentSnapshots.size() == 0) {\n noGoalsMessage.setVisibility(View.VISIBLE);\n progressBar.hide();\n } else {\n noGoalsMessage.setVisibility(View.INVISIBLE);\n for (DocumentSnapshot documentSnapshot : documentSnapshots) {\n Map<String, Object> data = documentSnapshot.getData();\n\n if (data != null && data.containsKey(Goal.TYPE_KEY)) {\n GoalType type = GoalType.convertToGoalType((String) data.get(Goal.TYPE_KEY));\n Goal goal = null;\n\n switch (type) {\n case DISTANCE:\n goal = DistanceGoal.fromData(data);\n break;\n case ELEVATION:\n goal = ElevationGoal.fromData(data);\n break;\n case TIME:\n goal = TimeGoal.fromData(data);\n break;\n }\n\n goal.setDocumentReference(goalsReference.document(documentSnapshot.getId()));\n goalsAdapter.addGoal(goal);\n }\n }\n }\n\n progressBar.hide();\n })\n .addOnFailureListener(failure -> {\n failure.printStackTrace();\n Toast.makeText(this, \"An error occurred retrieving goals\", Toast.LENGTH_SHORT)\n .show();\n progressBar.hideBoth();\n });\n }", "@RequestMapping(value = \"/getTodayReport\", method = RequestMethod.GET)\r\n public @ResponseBody String getDayWiseReport() {\r\n logger.info(\"in ReportGenerationController getDayWiseReport()\");\r\n\r\n String reportDetails = reportGenerationService.getTodayReport();\r\n\r\n return reportDetails;\r\n }", "public static String sendLiveRequest(){\n\n // The following line initializes the HttpGet Object with the URL in order to send a request\n HttpGet get = new HttpGet(BASE_URL + ENDPOINT + \"?access_key=\" + ACCESS_KEY);\n\n try {\n CloseableHttpResponse response = httpClient.execute(get);\n HttpEntity entity = response.getEntity();\n\n // the following line converts the JSON Response to an equivalent Java Object\n JSONObject exchangeRates = new JSONObject(EntityUtils.toString(entity));\n \n Date timeStampDate = new Date((long)(exchangeRates.getLong(\"timestamp\")*1000)); \n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String formattedDate = dateFormat.format(timeStampDate);\n \n String USDUAH = \"1 \" + exchangeRates.getString(\"source\") + \" in UAH : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDUAH\") + \" (Date: \" + formattedDate + \")\";\n String USDEUR = \"1 \" + exchangeRates.getString(\"source\") + \" in EUR : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDEUR\") + \" (Date: \" + formattedDate + \")\"; \n String USDGBP = \"1 \" + exchangeRates.getString(\"source\") + \" in GBP : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDGBP\") + \" (Date: \" + formattedDate + \")\";\n String USDJPY = \"1 \" + exchangeRates.getString(\"source\") + \" in JPY : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDJPY\") + \" (Date: \" + formattedDate + \")\";\n return USDUAH+\"\\n\"+USDEUR+\"\\n\"+USDGBP+\"\\n\"+USDJPY;\n } catch (ClientProtocolException e) { \n e.printStackTrace();\n Main.logger.log(Level.SEVERE, \"Exception: \", e);\n } catch (IOException e) {\n e.printStackTrace();\n Main.logger.log(Level.SEVERE, \"Exception: \", e);\n } catch (ParseException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n Main.logger.log(Level.SEVERE, \"Exception: \", e);\n }\n\t\treturn null;\n }", "private static GetReportsResponse getReport(Analyticsreporting service) throws IOException {\n // Create the DateRange object.\n DateRange dateRange = new DateRange();\n dateRange.setStartDate(\"7DaysAgo\");\n dateRange.setEndDate(\"today\");\n\n // Create the Metrics object.\n Metric sessions = new Metric()\n .setExpression(\"ga:sessions\")\n .setAlias(\"sessions\");\n\n //Create the Dimensions object.\n Dimension browser = new Dimension()\n .setName(\"ga:browser\");\n\n // Create the ReportRequest object.\n ReportRequest request = new ReportRequest()\n .setViewId(VIEW_ID)\n .setDateRanges(Arrays.asList(dateRange))\n .setDimensions(Arrays.asList(browser))\n .setMetrics(Arrays.asList(sessions));\n\n ArrayList<ReportRequest> requests = new ArrayList<ReportRequest>();\n requests.add(request);\n\n // Create the GetReportsRequest object.\n GetReportsRequest getReport = new GetReportsRequest()\n .setReportRequests(requests);\n\n // Call the batchGet method.\n GetReportsResponse response = service.reports().batchGet(getReport).execute();\n\n // Return the response.\n return response;\n }", "@GET\n @Deprecated\n @Path(\"jobs\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response jobGet(@QueryParam(\"created_before\") String createdBefore,\n @QueryParam(\"created_after\") String createdAfter) throws Exception {\n //List<LGJob> jobs;\n boolean doCreatedBefore = false;\n boolean doCreatedAfter = false;\n Date beforeDate = null;\n Date afterDate = null;\n\n // Parse created_before if present\n if ((createdBefore != null) && (!createdBefore.equals(\"\"))) {\n Instant beforeInstant = null;\n try {\n beforeInstant = Instant.parse(createdBefore);\n } catch (DateTimeParseException e) {\n return Response.status(201).entity(\"Invalid created_on Date format [\" + createdBefore + \"]\").build();\n }\n beforeDate = Date.from(beforeInstant);\n doCreatedBefore = true;\n }\n\n // Parse created_after if present\n if ((createdAfter != null) && (!createdAfter.equals(\"\"))) {\n Instant afterInstant = null;\n try {\n afterInstant = Instant.parse(createdAfter);\n } catch (DateTimeParseException e) {\n return Response.status(201).entity(\"Invalid created_after Date format [\" + createdAfter + \"]\").build();\n }\n afterDate = Date.from(afterInstant);\n doCreatedAfter = true;\n }\n\n\n JSONObject graphJobs = new JSONObject();\n try {\n graphJobs = Utils.getLemongraphJob(request, \"\", null);//this considers createdBefore/createdAfter params\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n JSONArray ids = new JSONArray();\n Iterator<String> idIterator = graphJobs.keys();\n while (idIterator.hasNext()) {\n String id = idIterator.next();\n ids.put(id);\n }\n\n JSONObject ob = new JSONObject();\n if(ids.length() > 0) {\n // Build response\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMM dd,yyyy HH:mm:ss\");\n JSONObject mongoJobs = Utils.getMongoJobs(ids);\n Iterator iterator = mongoJobs.keySet().iterator();\n while (iterator.hasNext()) {\n String id = iterator.next().toString();\n try {\n JSONObject mongoJob = mongoJobs.getJSONObject(id);\n JSONObject job = new JSONObject();\n\n //Default value checks\n if (!mongoJob.has(\"reason\")) {\n mongoJob.put(\"reason\", \"\");\n }\n if (!mongoJob.has(\"endTime\")) {\n mongoJob.put(\"endTime\", 0);\n }\n if (!mongoJob.has(\"totalRunningTimeSeconds\")) {\n mongoJob.put(\"totalRunningTimeSeconds\", 0);\n }\n if (!mongoJob.has(\"approvedAdapterNames\")) {\n mongoJob.put(\"approvedAdapterNames\", new JSONArray());\n }\n if (!mongoJob.has(\"startTime\")) {\n mongoJob.put(\"startTime\", 0);\n }\n if (!mongoJob.has(\"jobErrors\")) {\n mongoJob.put(\"jobErrors\", new JSONArray());\n }\n if (!mongoJob.has(\"taskMap\")) {\n mongoJob.put(\"taskMap\", new JSONObject());\n }\n if (!mongoJob.has(\"jobConfig\")) {\n mongoJob.put(\"jobConfig\", new JSONObject());\n }\n if (!mongoJob.has(\"expireDate\")) {\n mongoJob.put(\"expireDate\", 0);\n }\n if (!mongoJob.has(\"graphActivity\")) {\n mongoJob.put(\"graphActivity\", 0);\n }\n if (!mongoJob.has(\"createDate\")) {\n mongoJob.put(\"createDate\", 0);\n }\n if (!mongoJob.has(\"status\")) {\n mongoJob.put(\"status\", 0);\n }\n\n job.put(\"reason\", mongoJob.get(\"reason\"));\n job.put(\"endtime\", sdf.format(mongoJob.get(\"endTime\")));\n job.put(\"runtime\", mongoJob.get(\"totalRunningTimeSeconds\"));\n job.put(\"approvedadapters\", mongoJob.getJSONArray(\"approvedAdapterNames\"));\n job.put(\"starttime\", sdf.format(mongoJob.get(\"startTime\")));\n job.put(\"error_count\", mongoJob.getJSONArray(\"jobErrors\").length());\n job.put(\"task_count\", mongoJob.getJSONObject(\"taskMap\").length());\n job.put(\"job_config\", new JSONObject(mongoJob.get(\"jobConfig\").toString()));\n job.put(\"expire_date\", sdf.format(mongoJob.get(\"expireDate\")));\n job.put(\"job_id\", id);\n job.put(\"graph_activity\", mongoJob.get(\"graphActivity\"));\n job.put(\"create_date\", sdf.format(mongoJob.get(\"createDate\")));\n int status = mongoJob.getInt(\"status\");\n job.put(\"status\", LGJob.getStatusString(status));\n\n int active = 0;\n try {\n if (status == LGJob.STATUS_PROCESSING) { //only processing jobs have non-zero active_task_count\n ArrayList<Document> docs = new MongoDBStore().getTasksFromJob(id);\n JSONObject tasks = MongoDBStore.toJSON(docs);\n active = LGJob.getActiveTaskCount(tasks);\n }\n } catch (Exception e) {\n log.debug(\"Couldn't fetch active task count for job:\" + id + \" Error:\" + e.getMessage());\n }\n\n job.put(\"active_task_count\", active);\n ob.put(id, job);\n } catch (Exception e) {\n log.info(\"Invalid job:\" + id + \" Error:\" + e.getMessage());\n }\n }\n }\n return Response.status(200).entity(ob.toString()).build();\n }", "@POST\n @Path(\"/{blahId}/report\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Response reportBlah(\n Map<String, String> entity,\n @PathParam(\"blahId\") String blahId,\n @Context HttpServletRequest request) {\n try {\n final long start = System.currentTimeMillis();\n final String userId = BlahguaSession.ensureAuthenticated(request, true);\n Integer reportType = Integer.parseInt(entity.get(\"type\"));\n getBlahManager().reportBlah(userId, blahId, reportType);\n getSystemManager().setResponseTime(REPORT_BLAH_OPERATION, (System.currentTimeMillis() - start));\n return RestUtilities.make204OKNoContentResponse();\n } catch (InvalidRequestException e) {\n return RestUtilities.make400InvalidRequestResponse(request, e);\n } catch (ResourceNotFoundException e) {\n return RestUtilities.make404ResourceNotFoundResponse(request, e);\n } catch (InvalidAuthorizedStateException e) {\n return RestUtilities.make401UnauthorizedRequestResponse(request, e);\n } catch (SystemErrorException e) {\n return RestUtilities.make500AndLogSystemErrorResponse(request, e);\n } catch (Exception e) {\n return RestUtilities.make500AndLogSystemErrorResponse(request, e);\n }\n }", "@GetMapping(\"/data/generate\")\n public ResponseEntity<String> dataGenerate() {\n\n \t// el metodo run es asincronico\n \tgeneraJob.run();\n \t\n return ResponseEntity.ok().build();\n }", "void createDailyMessageRaport(String stringCurrentDate);", "private void getDataFromApi() throws IOException {\n DateTime now = new DateTime(System.currentTimeMillis());\n Events events = mService.events().list(\"primary\")\n .setTimeMin(now)\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n List<Event> items = events.getItems();\n ScheduledEvents scheduledEvents;\n EventsList.clear();\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n if (start == null) {\n start = event.getStart().getDate();\n }\n DateTime end = event.getEnd().getDateTime();\n if (end == null) {\n end = event.getStart().getDate();\n }\n scheduledEvents = new ScheduledEvents();\n scheduledEvents.setEventId(event.getId());\n scheduledEvents.setDescription(event.getDescription());\n scheduledEvents.setEventSummery(event.getSummary());\n scheduledEvents.setLocation(event.getLocation());\n scheduledEvents.setStartDate(dateTimeToString(start));\n scheduledEvents.setEndDate(dateTimeToString(end));\n StringBuffer stringBuffer = new StringBuffer();\n if(event.getAttendees()!=null) {\n for (EventAttendee eventAttendee : event.getAttendees()) {\n if(eventAttendee.getEmail()!=null)\n stringBuffer.append(eventAttendee.getEmail() + \" \");\n }\n scheduledEvents.setAttendees(stringBuffer.toString());\n }\n else{\n scheduledEvents.setAttendees(\"\");\n }\n EventsList.add(scheduledEvents);\n }\n }", "@Override\n\tpublic void doGet(\n\t\tfinal HttpServletRequest req, \n\t\tfinal HttpServletResponse rsp\n\t) throws \n\t\tIOException \n\t{\n\t\tfinal String userId =\n\t\t\treq.getServletPath().split(\"/\")[1];\n\t\t\n\t\t// FIXME: when a pro is created it should also create ConsumerInformation\n\t\tfinal LoadResult<ConsumerInformation> informationResult =\n\t\t\tofy().load().key(Key.create(ConsumerInformation.class, userId));\n\t\t\n\t\tfinal LocalDate startDate =\n\t\t\tLocalDate.now();\n\t\t\n\t\tfinal int NUM_DAYS = 28;\n\t\t\n\t\t// initiate fetch for daily agendas and availiability\n\t\tfinal List<Key<DailyAgenda>> dailyAgendaKeysOne =\n\t\t\tBookingServlet.getProfessionalDailyAgenda(userId, startDate, NUM_DAYS);\n\n\t\tfinal Map<Key<DailyAgenda>, DailyAgenda> dailyAgendaResultOne =\n\t\t\tofy().load().keys(dailyAgendaKeysOne);\n\n\t\tfinal List<Key<ConsumerDailyAgenda>> dailyAgendaKeysTwo =\n\t\t\tBookingServlet.getConsumerDailyAgenda(userId, startDate, NUM_DAYS);\n\n\t\tfinal Map<Key<ConsumerDailyAgenda>, ConsumerDailyAgenda> dailyAgendaResultTwo =\n\t\t\tofy().load().keys(dailyAgendaKeysTwo);\t\n\t\t\n\t\tfinal ConsumerInformation info =\n\t\t\tinformationResult.safe();\n\n\t\tfinal Iterator<Key<DailyAgenda>> agendaIteratorOne =\n\t\t\tdailyAgendaKeysOne.iterator();\n\n\t\tfinal Iterator<Key<ConsumerDailyAgenda>> agendaIteratorTwo =\n\t\t\tdailyAgendaKeysTwo.iterator();\n\t\t\n\t\tint index = 0;\n\t\t\n\t\tfinal ICalBuilder ical = ICal\n\t\t\t.beginCalendar()\n\t\t\t\t.prodid(\"Luke Valenty\", \"bookstuf.com 1.0\")\n\t\t\t\t.version(\"2.0\")\n\t\t\t\t.calscale(\"GREGORIAN\")\n\t\t\t\t.method(\"PUBLISH\")\n\t\t\t\t.calname(\"bookstuf.com\");\n\n\t\twhile (\n\t\t\tagendaIteratorOne.hasNext() &&\n\t\t\tagendaIteratorTwo.hasNext()\n\t\t) {\n\t\t\tfinal LocalDate date = \n\t\t\t\tstartDate.plusDays(index);\n\t\t\t\n\t\t\tfinal DailyAgenda agendaOne = \n\t\t\t\tdailyAgendaResultOne.get(agendaIteratorOne.next());\n\t\t\t\n\t\t\tif (agendaOne != null) {\n\t\t\t\taddEvents(ical, date, agendaOne.getTimezone(), agendaOne.bookingMap());\n\t\t\t}\n\t\t\t\n\t\t\tfinal ConsumerDailyAgenda agendaTwo = \n\t\t\t\tdailyAgendaResultTwo.get(agendaIteratorTwo.next());\n\t\t\t\n\t\t\tif (agendaTwo != null) {\n\t\t\t\taddEvents(ical, date, agendaTwo.getTimezone(), agendaTwo.bookingMap());\n\t\t\t}\n\t\t\t\n\t\t\tindex++;\n\t\t}\n\n\t\tical.endCalendar().output(rsp.getWriter());\n\t}", "public void calculateFoodEmissions(String diet, double meatAmount, double dairyAmount, double plantAmount, Context context) {\n String urlString = \"https://ilmastodieetti.ymparisto.fi/ilmastodieetti/calculatorapi/v1/FoodCalculator\";\n AsyncHttpClient client = new AsyncHttpClient();\n RequestParams params = new RequestParams();\n //\"ilmastodieetti\" food calculator API accepts values from 0 to 200.\n //The value is calculated with given amount(in kg) divided with finnish average consumption amount(in kg).\n //The calculation is multiplied by 100 to get the percentage as integer between 0 and 200\n //if the percentage exceeds 200 the amount is reduced to 200 before requesting data from the FoodCalculator.\n int beefAverage = (int) ((meatAmount / FINNISH_AVERAGE_BEEF_CONSUMPTION) * 100);\n if (beefAverage > 200)\n beefAverage = 200;\n int dairyAverage = (int) ((dairyAmount / FINNISH_AVERAGE_DAIRY_CONSUMPTION) * 100);\n if (dairyAverage > 200)\n dairyAverage = 200;\n int plantAverage = (int) ((plantAmount / FINNISH_AVERAGE_PLANT_CONSUMPTION) * 100);\n if (plantAverage > 200)\n plantAverage = 200;\n params.put(\"query.diet\", diet);\n params.put(\"query.beefLevel\", beefAverage);\n params.put(\"query.dairyLevel\", dairyAverage);\n params.put(\"query.winterSaladLevel\", plantAverage);\n client.get(urlString, params, new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n try {\n //Parse json object response\n String dairy = response.getString(\"Dairy\");\n String meat = response.getString(\"Meat\");\n String plant = response.getString(\"Plant\");\n String total = response.getString(\"Total\");\n FoodEmissions emissionsData = new FoodEmissions(dairy, meat, plant, total);\n JSONObject emissionJson = new JSONObject();\n emissionJson.put(\"Meat\", emissionsData.getMeat());\n emissionJson.put(\"Dairy\", emissionsData.getDairy());\n emissionJson.put(\"Plant\", emissionsData.getPlant());\n emissionJson.put(\"Total\", emissionsData.getTotal());\n logEmissions(emissionJson, context);\n createBarChart(emissionsData, context);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String res, Throwable t) {\n Toast.makeText(context, \"Something went wrong trying to calculate emission data\", Toast.LENGTH_SHORT).show();\n System.out.println(\"FAILURE\");\n }\n\n });\n }", "private Void postDataToApi() throws IOException, ParseException {\r\n // List the next 10 events from the primary calendar.\r\n // Quick-add an event\r\n // Refer to the Java quickstart on how to setup the environment:\r\n // https://developers.google.com/google-apps/calendar/quickstart/java\r\n // Change the scope to CalendarScopes.CALENDAR and delete any stored\r\n // credentials.\r\n\r\n Event event = new Event()\r\n .setSummary(calendarText)\r\n .setLocation(martLocation)\r\n .setDescription(\"Reminder to eat healthy food!\");\r\n\r\n DateTime startDateTime = new DateTime(shoppingDateTime);\r\n EventDateTime start = new EventDateTime()\r\n .setDateTime(startDateTime)\r\n .setTimeZone(\"America/New_York\");\r\n event.setStart(start);\r\n DateTime endDateTime = new DateTime(shoppingDateTime);\r\n EventDateTime end = new EventDateTime()\r\n .setDateTime(endDateTime)\r\n .setTimeZone(\"America/New_York\");\r\n event.setEnd(end);\r\n String calendarId = \"primary\";\r\n event = mService.events().insert(calendarId, event).execute();\r\n System.out.printf(\"Event created: %s\\n\", event.getHtmlLink());\r\n return null;\r\n }", "private void addDailyFoodLog(User user, JSONObject foodLogObject) {\n DailyFoodLog dailyFoodLog = new DailyFoodLog();\n\n String date = foodLogObject.getString(\"date\");\n dailyFoodLog.setDate(date);\n\n JSONArray jsonArray = foodLogObject.getJSONArray(\"entries\");\n for (Object json : jsonArray) {\n JSONObject jsonEntry = (JSONObject) json;\n String meal = jsonEntry.getString(\"meal\");\n String food = jsonEntry.getString(\"food\");\n int calories = jsonEntry.getInt(\"calories\");\n int protein = jsonEntry.getInt(\"protein\");\n int fat = jsonEntry.getInt(\"fat\");\n int carbs = jsonEntry.getInt(\"carbs\");\n\n Entry entry = new Entry(meal,food,calories);\n entry.setMacros(protein,fat,carbs);\n dailyFoodLog.addEntry(entry);\n }\n user.addDailyFoodLog(dailyFoodLog);\n }", "public void submitRequest(String location, WebViewModel vmodel) {\n String weatherUrl = \"https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/\" + location + \"?key=QZ2CJDXT7CYASXM6598KXSPDX\";\n //URL below is free API testing\n //String weatherUrl = \"https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/%22%20+%20location%20+%20%22?key=QZ2CJDXT7CYASXM6598KXSPDX\";\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest\n (Request.Method.GET, weatherUrl, null, new Response.Listener<JSONObject>() {\n\n @RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n public void onResponse(JSONObject response) {\n String cityName = \"\";\n String countryName = \"\";\n String time = \"\";\n String temperature = \"\";\n String maxTemp = \"\";\n String minTemp = \"\";\n String skyCondition = \"\";\n String humidity = \"\";\n String tomorrow = \"\";\n String tonight = \"\";\n JSONArray daysArray;\n SimpleDateFormat dateProperFormat;\n\n try {\n location_splicer(response.getString(\"resolvedAddress\"));\n } catch(JSONException e) {\n System.out.println(\"Error gathering location\");\n }\n try {\n cityName = cityName + cityName_holder;\n } catch (Exception e) {\n System.out.println(\"Error gathering cityName\");\n }\n try {\n countryName = countryName + countryName_holder;\n } catch (Exception e) {\n System.out.println(\"Error gathering countryName\");\n }\n\n //Let's get weather objects for each day.\n try {\n daysArray = response.getJSONArray(\"days\");\n } catch (JSONException e) {\n e.printStackTrace();\n daysArray = null;\n System.out.println(\"ERROR DAYSARRAY\");\n }\n\n try {\n Date currentTime = Calendar.getInstance().getTime();\n Locale locale = Locale.getDefault();\n dateProperFormat =\n new SimpleDateFormat (\"yyyy-MM-dd\", locale);\n\n time = daysArray.getJSONObject(0).getString(\"datetime\");\n\n }catch (JSONException e) {\n System.out.println(\"Error gathering time\");\n }\n\n try {\n temperature = daysArray.getJSONObject(0).getString(\"temp\");\n //temperature = response.getJSONObject(\"currentConditions\").getString(\"temp\");\n if (temperature.length() > 2) {\n temperature = temperature.substring(0,2);\n }\n //temperature = response.getJSONArray(\"days\").getJSONObject(0).getString(\"temp\");\n }catch (JSONException e) {\n System.out.println(\"Error gathering temperature\");\n }\n try {\n maxTemp = daysArray.getJSONObject(0).getString(\"tempmax\");\n } catch (JSONException e) {\n System.out.println(\"Error getting max temperature\");\n }\n try {\n minTemp = daysArray.getJSONObject(0).getString(\"tempmin\");\n } catch (JSONException e) {\n System.out.println(\"Error getting max temperature\");\n }\n try {\n skyCondition = daysArray.getJSONObject(0).getString(\"icon\");\n\n //response.getJSONObject(\"currentConditions\").getString(\"conditions\");\n } catch (JSONException e) {\n System.out.println(\"Error gathering conditions\");\n }\n try {\n humidity = daysArray.getJSONObject(0).getString(\"humidity\");\n } catch (JSONException e) {\n System.out.println(\"Error gathering humidity\");\n }\n try {\n JSONArray hours = daysArray.getJSONObject(0).getJSONArray(\"hours\");\n tonight = \"unknown\";\n for (int i = 0; i < hours.length(); i++) {\n if (hours.getJSONObject(i).getString(\"datetime\").equals(\"23:00:00\")) {\n tonight = hours.getJSONObject(i).getString(\"temp\");\n }\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n try {\n tomorrow = daysArray.getJSONObject(1).getString(\"tempmax\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n WeatherReport newReport = new WeatherReport(cityName, countryName);\n\n newReport.updateWeatherReport(time, temperature, condition_parcer(skyCondition), humidity, maxTemp, minTemp, tomorrow, tonight);\n System.out.println(\"***JSON DATA***\");\n System.out.println(time);\n System.out.println(cityName);\n System.out.println(countryName);\n System.out.println(temperature);\n System.out.println(skyCondition);\n System.out.println(newReport.getHumidity());\n vmodel.addWeatherReport(newReport, context);\n System.out.println(\"Checking vmodel: \" +\n vmodel.getRecentReport().getLocationName_city() +\n \" is set as current city\");\n\n }\n }, error -> System.out.println(\"ERROR GETTING WEATHER\"));\n\n\n // Access the RequestQueue through your singleton class.\n this.addToRequestQueue(jsonObjectRequest);\n\n }", "public JSONObject buildJson() {\n Map<String, String> reqData = new HashMap<>();\n reqData.put(\"id\", id);\n reqData.put(\"summary\", summary);\n reqData.put(\"location\", location);\n reqData.put(\"description\", description);\n reqData.put(\"color\", color);\n reqData.put(\"emailReminderMinutes\", Integer.toString(emailReminderMinutes));\n reqData.put(\"repetitionInterval\", Integer.toString(repetitionInterval));\n reqData.put(\"startDate\", startDate);\n reqData.put(\"endDate\", endDate);\n return new JSONObject(reqData);\n }", "@Override\n\tpublic void saveDayEndData(DailyRequest dailyRequest) {\n\t\tint reportDay = dailyRequest.getBalanceDate().getDate();\n\t\tint reportYear = dailyRequest.getBalanceDate().getYear();\n\t\tint reportMonth = dailyRequest.getBalanceDate().getMonth();\n\t\tString epochString = String.valueOf(reportYear).concat(String.valueOf(reportMonth))\n\t\t\t\t.concat(String.valueOf(reportDay));\n\t\tint epochMonth = Integer.valueOf(epochString);\n\t\tDouble balance;\n\t\tint accountNo;\n\t\tint accountOpenDay;\n\t\tdouble interest;\n\t\tSavingRequest[] savingRequest = dailyRequest.getSavingRequest();\n\t\tfor (SavingRequest r : savingRequest) {\n\t\t\tbalance = r.getBalance();\n\t\t\taccountNo = r.getIdentification();\n\t\t\tAccount accountData = getAccountOpenDate(accountNo);\n\t\t\tif (null != accountData && accountData.getStatus().equalsIgnoreCase(\"Active\")) {\n\t\t\t\taccountOpenDay = accountData.getOpeningDate().getDate();\n\t\t\t\tinterest = computeSimpleInterest(balance, reportDay - accountOpenDay);\n\n\t\t\t\tdealsRepository.saveAccount(accountNo, epochMonth, interest);\n\t\t\t} else {\n\t\t\t\tLOGGER.info(\n\t\t\t\t\t\t\"Account no. \" + accountNo + \" is not Created and hence skippingf this for Saving Calculation\");\n\t\t\t}\n\n\t\t}\n\n\t}", "@FormUrlEncoded\n @POST(Service.PATH_TIME_PLAN_BY_DATE)\n Call<ApiTimePlanByDateObject> postTimePlanByDate(\n @Field(\"UserId\") int doctorId,\n @Field(\"DateTimeSelect\") String date\n );", "@Override\n\t\tprotected Void doInBackground(Void... params) {\n\n\t\t\tSessionManager session = new SessionManager(getBaseContext());\n\t\t\tString user = session.GetUserIdFromSharedPreferences();\n\n\t\t\taJSONObject = new JSONObject();\n\n\t\t\tRestAPI api = new RestAPI();\n\n\t\t\ttry {\n\t\t\t\taJSONObject = api.ReportOfTheMonth(user);\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\n\t\t\treturn null;\n\t\t}", "private static JSONObject getJsonDate(Task task) {\n DueDate myDueDate = task.getDueDate();\n return dueDateToJson(myDueDate);\n }", "@GetMapping(\"/{symbol}/{date}\")\n public ModelAndView daily(@PathVariable(\"symbol\") String symbol, @PathVariable(\"date\") String date) throws ParseException {\n\n Date sdf = new SimpleDateFormat(\"yyyy-MM-dd\").parse(date);\n\n String beginOfTheMonth = date.substring(0, 7) + \"-00\";\n String endOfTheMonth = date.substring(0,7) + \"-31\";\n Map<String, Object> model = new HashMap<>();\n\n try{\n String[] resp = quoteRepository.daily(symbol, sdf).split(\",\");\n Double closingResp = quoteRepository.closingDay(symbol, sdf);\n String[] monthResp = quoteRepository.monthly(symbol, beginOfTheMonth, endOfTheMonth).split(\",\");\n Double closingMonth = quoteRepository.closingMonth(symbol, beginOfTheMonth, endOfTheMonth);\n\n DayRecord dr = new DayRecord(Double.parseDouble(resp[0]), Double.parseDouble(resp[1]), Integer.parseInt(resp[2]), date, symbol);\n DayRecord mr = new DayRecord(Double.parseDouble(monthResp[0]), Double.parseDouble(monthResp[1]), Integer.parseInt(monthResp[2]), beginOfTheMonth, symbol);\n\n model.put(\"daily\", dr);\n model.put(\"closing\", closingResp);\n model.put(\"monthly\", mr);\n model.put(\"closingMonthly\", closingMonth);\n\n\n return new ModelAndView(\"main\", model);\n\n } catch (Exception e) {\n return new ModelAndView(\"error\", model);\n }\n }", "@GET\n @Path(\"{thingName}/{status}\")\n @Produces(MediaType.APPLICATION_JSON)\n public String recieveAlarm(@PathParam(\"thingName\") String thingName, \n @PathParam(\"status\") String status,@Context UriInfo info) {\n\n MultivaluedMap queryMap = info.getQueryParameters();\n Iterator itr = queryMap.keySet().iterator();\n HashMap<String, String> dataMap = new HashMap<>(); \n while(itr.hasNext()){\n Object key = itr.next();\n Object value = queryMap.getFirst(key);\n dataMap.put(key.toString(), value.toString());\n }\n ThingInfoMap thingInfoMap = new ThingInfoMap(thingName, new Timestamp(new Date().getTime()).toString(),status);\n thingInfoMap.setContent(dataMap);\n \n int alarmID = database.addAlarm(thingInfoMap);\n Dweet newDweet;\n if(alarmID != -1){\n thingInfoMap.setAlarmID(alarmID);\n newDweet = new Dweet(\"succeeded\", \"sending\", \"alarm\", thingInfoMap);\n newDweet.setTo(\"myMobileA\"); // it's not included in database\n String warningMsg = gson.toJson(newDweet);\n //send alarm to mobile use GCM\n sendToMobileByGCM(warningMsg);\n return warningMsg;\n } else {\n newDweet = new Dweet(\"failed\", \"alarm is failed to added\");\n return gson.toJson(newDweet);\n }\n\n }", "@Override\n public String execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n log.debug(START_COMMAND);\n MeetingService meetingService = new MeetingServiceImpl(new MeetingDaoImpl());\n //inserts meeting with new time and deletes previous\n if (Constant.POST_METHOD.equalsIgnoreCase(request.getMethod())) {\n log.debug(START_CASE_POST);\n long previousMeetingId = Long.parseLong(request.getParameter(MEETING_ID));\n log.debug(MEETING_ID + Constant.POINTER + previousMeetingId);\n Meeting previousMeeting = meetingService.getById(previousMeetingId);\n LocalDateTime dateTime = LocalDateTime.parse(request.getParameter(Constant.SLOT));\n log.debug(SLOT_DATETIME + Constant.POINTER + dateTime);\n //create meeting with new parameters\n Meeting newMeeting = new Meeting();\n newMeeting.setCondition(Condition.ACTIVE);\n newMeeting.setCatalog(previousMeeting.getCatalog());\n newMeeting.setClient(previousMeeting.getClient());\n newMeeting.setDateTime(dateTime);\n log.debug(String.format(NEW_MEETING_PARAMETERS,\n newMeeting.getCondition(),\n newMeeting.getCatalog(),\n newMeeting.getClient().getName(),\n newMeeting.getDateTime()));\n //delete old meeting\n if (meetingService.insert(newMeeting) != null) {\n meetingService.deleteById(previousMeetingId);\n }\n log.debug(END_CASE_POST);\n return Path.COMMAND_ADMIN_CABINET;\n\n } else {\n //create schedule\n log.debug(START_CASE_GET);\n long meetingId = Long.parseLong(request.getParameter(SLOT_ID));\n Meeting meeting = meetingService.getById(meetingId);\n List<Meeting> meetingList = meetingService.getAll();\n Master master = meeting.getCatalog().getMaster();\n long masterId = master.getId();\n meetingList.removeIf(nextMeeting -> nextMeeting.getCatalog().getMaster().getId() != masterId);\n List<LocalDateTime> emptySchedule = createEmptyFutureSchedule(Constant.MAX_DAYS_FOR_REGISTER);\n Iterator<LocalDateTime> timeIterator = emptySchedule.iterator();\n while (timeIterator.hasNext()) {\n LocalDateTime time = timeIterator.next();\n for (Meeting m : meetingList) {\n if (time.equals(m.getDateTime())) {\n log.debug(DELETED_TIME_SLOT + Constant.POINTER + time);\n timeIterator.remove();\n }\n }\n }\n\n request.setAttribute(Constant.SCHEDULE, emptySchedule);\n request.setAttribute(Constant.MEETING, meeting);\n log.debug(END_CASE_GET);\n log.debug(END_COMMAND);\n return Path.CHANGE_TS_PATH;\n }\n }", "void dailyLife() {\n\t\tString action = inputPrompt.dailyOptions(dailyTime).toLowerCase();\r\n\t\tswitch(action) {\r\n\t\tcase \"exercise\":\tthis.exercise();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"study\":\t\tthis.study();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"rocket\":\t\tthis.buildRocket();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"eat\":\t\t\tthis.eat();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"meds\":\t\tthis.getEnergised();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"fun\":\t\t\tthis.haveFun();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tdefault:\t\t\tdailyLife();\r\n\t\t}\t\r\n\t}", "private AppoinmentCompleteRequest appoinmentCompleteRequest() {\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy hh:mm aa\", Locale.getDefault());\n String currentDateandTime = sdf.format(new Date());\n\n AppoinmentCompleteRequest appoinmentCompleteRequest = new AppoinmentCompleteRequest();\n appoinmentCompleteRequest.set_id(appoinmentid);\n appoinmentCompleteRequest.setCompleted_at(currentDateandTime);\n appoinmentCompleteRequest.setAppoinment_status(\"Completed\");\n appoinmentCompleteRequest.setDiagnosis(DiagnosisType);\n appoinmentCompleteRequest.setSub_diagnosis(SubDiagnosisType);\n appoinmentCompleteRequest.setDoctor_comment(Doctor_Comments);\n Log.w(TAG,\"appoinmentCompleteRequest\"+ \"--->\" + new Gson().toJson(appoinmentCompleteRequest));\n return appoinmentCompleteRequest;\n }", "public void CreateGetBadgeData()\n {\n new SendGetBadgeData().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, \"\");\n }", "@Test\n public void createBillingLineTestHappyPath() {\n\n Billinglines BillingLineObj = new Billinglines();\n\n BillingLineObj.setOrderId(\"b1375915-6c3d-4df5-aac2-aaf400e3ebab\");\n BillingLineObj.setPlannerId(\"90C44CAE-2A4A-4B5D-A5EC-AA9500A6C839\");\n BillingLineObj.setProductId(\"3B50FC9A-26B1-42C7-A7B4-AACB0084B9E4\");\n BillingLineObj.setStartMonth(\"2019-11-30\");\n BillingLineObj.setDurationInMonths(2);\n\n // final JSONArray arr = new JSONArray();\n\n /*for(int i = 0 ; i< list.size() ; i++) {\n final JSONObject obj = new JSONObject();\n p = list.get(i);\n obj.add(\"id\", p.getId());\n arr.add(obj);\n }\n\n\n for(int i = 0 ; i< list.size() ; i++) {\n final JSONObject obj = new JSONObject();\n p = list.get(i);\n obj.add(\"date\", new MyDateFormatter().getStringFromDateDifference(p.getCreationDate()));\n obj.add(\"value\", p.getValue());\n }*/\n\n BillingLineObj.setBillingLineBuyingAreaRevenues(Arrays.asList(new String[]{\"id\",\"8798f1f5-cd1b-455e-b44a-aacb00845536\"}));\n BillingLineObj.setMonthBuyingAreaRevenues(Arrays.asList(new String[]{\"date\",\"2019-11-30\"}));\n //BillingLineObj.setValue(444);\n BillingLineObj.setRevenue(444);\n String json = Utilities.createJsonObject(BillingLineObj);\n System.out.println(\">>>>>>>\\n\\n\\n\" + json);\n\n Response response = APIRequests.PostAPI(path, json);\n Assert.assertEquals(\"Check status codes for successful response \", 200,response.getStatusCode());\n System.out.println(\">>>>> \" + response.getStatusCode());\n\n }", "public static void createEvent(String token){\n ensureGraphClient(token);\n\n LinkedList<Option> requestOptions = new LinkedList<Option>();\n //requestOptions.add(new HeaderOption(\"Authorization\", \"Bearer nupl9.C5rb]aO5:yvT:3L.TKcH7tB1Im\" ));\n\n // Participantes:\n LinkedList<Attendee> attendeesList = new LinkedList<Attendee>();\n Attendee mentor = new Attendee();\n Attendee mentorado = new Attendee();\n\n EmailAddress mentorMail = new EmailAddress();\n mentorMail.address = \"[email protected]\";\n mentorMail.name = \"Daniell Wagner\";\n mentor.emailAddress = mentorMail;\n\n EmailAddress mentoradoMail = new EmailAddress();\n mentoradoMail.address = \"[email protected]\";\n mentoradoMail.name = \"Guilherme Carneiro\";\n mentorado.emailAddress = mentoradoMail;\n\n mentor.type = AttendeeType.REQUIRED;\n mentorado.type = AttendeeType.REQUIRED;\n\n attendeesList.add(mentor);\n attendeesList.add(mentorado);\n\n // Evento:\n Event event = new Event();\n event.subject = \"Mentoria com \" + mentor.emailAddress.name;\n\n ItemBody body = new ItemBody();\n body.contentType = BodyType.HTML;\n body.content = \"\" +\n \"<b>Mentoria sobre SCRUM</b> <br>\" +\n \"Olá, \" + mentorado.emailAddress.name + \" <br> \" +\n \"Você tem uma mentoria marcada com o mentor \"\n + mentor.emailAddress.name + \"!!\";\n\n event.body = body;\n\n DateTimeTimeZone start = new DateTimeTimeZone();\n start.dateTime = \"2020-03-26T16:00:00\";\n start.timeZone = \"Bahia Standard Time\";\n event.start = start;\n\n DateTimeTimeZone end = new DateTimeTimeZone();\n end.dateTime = \"2020-03-26T18:00:00\";\n end.timeZone = \"Bahia Standard Time\";\n event.end = end;\n\n Location location = new Location();\n location.displayName = \"Stefanini Campina Grande\";\n event.location = location;\n\n event.attendees = attendeesList;\n\n try {\n graphClient.me().calendar().events()\n .buildRequest()\n .post(event);\n }catch(Exception e) {\n\n System.out.println(\"Deu águia: \");\n e.printStackTrace();\n }\n }", "private String sendToGoogle(IGoogleRequest request, String url, boolean withProjectId) throws IOException {\n HttpClient client = HttpClientBuilder.create().build();\n HttpPost httpPost = new HttpPost(url);\n\n // set header\n httpPost.addHeader(\"Authorization\", \"key=\" + authKey);\n if(withProjectId) httpPost.addHeader(\"project_id\", project_id);\n httpPost.addHeader(\"Content-Type\", \"application/json\");\n // set body\n httpPost.setEntity(new StringEntity(request.toJson(),\n ContentType.create(\"application/json\", \"UTF-8\")));\n log.info(\"Google Request Data: \" + request.toJson());\n // execute request\n log.info(\"send google notification request \" + httpPost.toString());\n HttpResponse response = client.execute(httpPost);\n String res = EntityUtils.toString(response.getEntity());\n\n log.info(\"received google notification response: \" + res);\n\n return res;\n }", "public void downloadDay(){\n\n}", "private static String sendPOST(final long wineId, final Date tasted, final Integer rating) {\n return \"\";\r\n }", "@Scheduled(initialDelayString = \"${jobs.daily.trigger.init.seconds:3600}000\", fixedDelayString = \"${jobs.daily.trigger.delay.seconds:86400}000\")\n\tpublic void dailyPolling() {\n\t\tif (jazzPartnerTrackingJobEnabled) {\n\t\t\tlog.info(\"Scheduled Daily Jazz Polling Launched\");\n\t\t\tSet<JazzApplicantPollConfiguration> configs = jazzPolling.getDailyPollingConfigs();\n\t\t\tfor (JazzApplicantPollConfiguration config : configs) {\n\t\t\t\tif (\"hired\".equalsIgnoreCase(config.getStatus())) {\n\t\t\t\t\tjazzPolling.pollJazzHires(config);\n\t\t\t\t} else {\n\t\t\t\t\tjazzPolling.pollJazzApplicantsByStatus(config);\t\t\n\t\t\t\t}\n\t\t\t} \n\t\t} else {\n\t\t\tlog.info(\"Jazz Daily polling disabled.\");\t\t\t\t\n\t\t}\n\t}", "private void GetCreatedContest() {\n\n\t\ttry {\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tasName.add(\"userid\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tLocalData data = new LocalData(context);\n\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\t\t\tasValue.add(data.GetS(\"userid\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\n\t\t\tString sUrl = StringURLs.CREATED_CONTEST;\n\n\t\t\tsUrl = StringURLs.getQuery(sUrl, asName, asValue);\n\n\t\t\tConnectServer connectServer = new ConnectServer();\n\t\t\tconnectServer.setContext(context);\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (sJSON.length() == 0) {\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(context,\n\t\t\t\t\t\t\t\t\t\t\t\"c100\"), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tShowContestDeatails(sJSON, \"createdcontest\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(context, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sUrl);\n\n\t\t} catch (Exception exp) {\n\n\t\t}\n\t}", "@Override\r\n protected Map<String, Object> executeImpl(SiteInfo singleSite, String eventName,\r\n WebScriptRequest req, JSONObject json, Status status, Cache cache) \r\n {\n Date fromDate = parseDate(req.getParameter(\"from\"));\r\n Date toDate = parseDate(req.getParameter(\"to\"));\r\n \r\n // What should we do about repeating events? First or all?\r\n boolean repeatingFirstOnly = true;\r\n String repeatingEvents = req.getParameter(\"repeating\");\r\n if (repeatingEvents != null)\r\n {\r\n if (\"first\".equals(repeatingEvents))\r\n {\r\n repeatingFirstOnly = true;\r\n }\r\n else if (\"all\".equals(repeatingEvents))\r\n {\r\n repeatingFirstOnly = false;\r\n }\r\n }\r\n else\r\n {\r\n // Fall back to the icky old way of guessing it from \r\n // the format of the from date, which differs between uses!\r\n if (fromDate != null)\r\n {\r\n String fromDateS = req.getParameter(\"from\");\r\n if (fromDateS.indexOf('-') != -1)\r\n {\r\n // Apparently this is the site calendar dashlet...\r\n repeatingFirstOnly = true;\r\n }\r\n if (fromDateS.indexOf('/') != -1)\r\n {\r\n // This is something else, wants all events in range\r\n repeatingFirstOnly = false;\r\n }\r\n }\r\n }\r\n \r\n // One site, or all the user's ones?\r\n List<SiteInfo> sites = new ArrayList<SiteInfo>();\r\n if (singleSite != null)\r\n {\r\n // Just one\r\n sites.add(singleSite);\r\n }\r\n else\r\n {\r\n // All their sites (with optional limit)\r\n int max = 0;\r\n String strMax = req.getParameter(\"size\");\r\n if (strMax != null && strMax.length() != 0)\r\n {\r\n max = Integer.parseInt(strMax);\r\n }\r\n sites = siteService.listSites(AuthenticationUtil.getRunAsUser(), max);\r\n }\r\n \r\n // We need to know the Site Names, and the NodeRefs of the calendar containers\r\n String[] siteShortNames = new String[sites.size()];\r\n Map<NodeRef, SiteInfo> containerLookup = new HashMap<NodeRef, SiteInfo>();\r\n for (int i=0; i<sites.size(); i++)\r\n {\r\n SiteInfo site = sites.get(i);\r\n siteShortNames[i] = site.getShortName();\r\n \r\n try\r\n {\r\n containerLookup.put(\r\n siteService.getContainer(site.getShortName(), CalendarServiceImpl.CALENDAR_COMPONENT), \r\n site);\r\n }\r\n catch (AccessDeniedException e)\r\n {\r\n // You can see the site, but not the calendar, so skip it\r\n // This means you won't have any events in it anyway\r\n }\r\n }\r\n \r\n \r\n // Get the entries for the list\r\n PagingRequest paging = buildPagingRequest(req);\r\n PagingResults<CalendarEntry> entries = \r\n calendarService.listCalendarEntries(siteShortNames, fromDate, toDate, paging);\r\n\r\n boolean resortNeeded = false;\r\n List<Map<String, Object>> results = new ArrayList<Map<String,Object>>();\r\n for (CalendarEntry entry : entries.getPage())\r\n {\r\n // Build the object\r\n Map<String, Object> result = new HashMap<String, Object>();\r\n result.put(RESULT_NAME, entry.getSystemName());\r\n result.put(RESULT_TITLE, entry.getTitle());\r\n result.put(\"description\", entry.getDescription());\r\n result.put(\"where\", entry.getLocation());\r\n result.put(RESULT_START, entry.getStart());\r\n result.put(RESULT_END, entry.getEnd());\r\n result.put(\"duration\", buildDuration(entry));\r\n result.put(\"tags\", entry.getTags());\r\n result.put(\"isoutlook\", entry.isOutlook());\r\n result.put(\"allday\", CalendarEntryDTO.isAllDay(entry));\r\n \r\n // Identify the site\r\n SiteInfo site = containerLookup.get(entry.getContainerNodeRef());\r\n result.put(\"site\", site);\r\n result.put(\"siteName\", site.getShortName());\r\n result.put(\"siteTitle\", site.getTitle());\r\n \r\n // Replace nulls with blank strings for the JSON\r\n for (String key : result.keySet())\r\n {\r\n if (result.get(key) == null)\r\n {\r\n result.put(key, \"\");\r\n }\r\n }\r\n \r\n // Save this one\r\n results.add(result);\r\n \r\n // Handle recurring as needed\r\n boolean orderChanged = handleRecurring(entry, result, results, fromDate, repeatingFirstOnly);\r\n if (orderChanged)\r\n {\r\n resortNeeded = true;\r\n }\r\n }\r\n \r\n // If the recurring events meant dates changed, re-sort\r\n if (resortNeeded)\r\n {\r\n Collections.sort(results, new Comparator<Map<String, Object>>() \r\n {\r\n public int compare(Map<String, Object> resultA,\r\n Map<String, Object> resultB) \r\n {\r\n Date startA = (Date)resultA.get(RESULT_START);\r\n Date startB = (Date)resultB.get(RESULT_START);\r\n \r\n int cmp = startA.compareTo(startB);\r\n if (cmp == 0)\r\n {\r\n Date endA = (Date)resultA.get(RESULT_END);\r\n Date endB = (Date)resultB.get(RESULT_END);\r\n cmp = endA.compareTo(endB);\r\n if (cmp == 0)\r\n {\r\n String nameA = (String)resultA.get(RESULT_NAME);\r\n String nameB = (String)resultB.get(RESULT_NAME);\r\n return nameA.compareTo(nameB);\r\n }\r\n return cmp;\r\n }\r\n return cmp;\r\n }\r\n });\r\n }\r\n \r\n // All done\r\n Map<String, Object> model = new HashMap<String, Object>();\r\n model.put(\"events\", results);\r\n return model;\r\n }", "public void generatePlan(Integer id,Date fromDate, Date toDate) throws Exception;", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //response.setContentType(\"text/html;charset=UTF-8\");\n response.setContentType(\"application/json\");\n response.setCharacterEncoding(\"UTF-8\");\n Date today = new java.util.Date();\n if (today.getDay() == 0 || today.getDay() == 7){\n //its the weekend everything is closed\n }\n Date currentTime = new Time(today.getTime()); \n Session session = HibernateUtil.getSessionFactory().openSession();\n Query q = session.createQuery(\"from Truck t where t.openingTime <=:time and t.closingTime >:time\");\n q.setParameter(\"time\", currentTime);\n List<Truck> results = q.list();\n //List<Truck> results = Truck.getAllTrucks();\n JsonArray jsonArray = new JsonArray();\n for (Truck t: results) {\n JsonObject jsonObject = new JsonObject();\n jsonObject.addProperty(\"name\", t.getTruckName());\n jsonObject.addProperty(\"lat\", t.getLatitude());\n jsonObject.addProperty(\"lng\", t.getLongitude());\n jsonObject.addProperty(\"id\", t.getId()); \n jsonArray.add(jsonObject);\n }\n try (PrintWriter out = response.getWriter()) {\n out.print(jsonArray); \n }\n }", "public Date getRequestDate();", "public void getData(String lat, String lon) {\n // Instantiate the RequestQueue.\n RequestQueue queue = Volley.newRequestQueue(this);\n String url = \"https://api.openweathermap.org/data/2.5/air_pollution?lat=\"+lat+\"&lon=\"+lon+\"&appid=2bcdd94a20ae1c5acd2f35b063bb3a0f\";\n String forecast_url = \"https://api.openweathermap.org/data/2.5/air_pollution/forecast?lat=\"+lat+\"&lon=\"+lon+\"&appid=2bcdd94a20ae1c5acd2f35b063bb3a0f\";\n\n //*****************GET THE CURRENT VALUES***********************\n // Request a JSON response for the current values from the provided URL.\n JsonObjectRequest stringRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n JSONObject details = response.getJSONArray(\"list\").getJSONObject(0);\n\n //Get day of the week\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"EEEE\");\n Date date = new java.util.Date(Long.valueOf(details.getInt(\"dt\"))*1000);\n String day = dateFormat.format(date );\n System.out.println(day);\n\n //Insert the retrieved to an object in order to be visualized\n Pollutants data = new Pollutants(day,\n details.getJSONObject(\"main\").getString(\"aqi\"),\n details.getJSONObject(\"components\").getString(\"pm2_5\"),\n details.getJSONObject(\"components\").getString(\"pm10\"),\n details.getJSONObject(\"components\").getString(\"o3\"),\n details.getJSONObject(\"components\").getString(\"co\"),\n details.getJSONObject(\"components\").getString(\"so2\"),\n details.getJSONObject(\"components\").getString(\"no2\"));\n\n //sending the data to be visualized\n visualizeUp(data);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(MainActivity.this, \"An error occurred!\", Toast.LENGTH_SHORT).show();\n Log.i(\"error\", String.valueOf(error));\n }\n }\n );\n\n // Add the request to the RequestQueue.\n queue.add(stringRequest);\n\n\n //***********************GET THE FORECAST VALUES**************************\n Pollutants[] forecast = new Pollutants[5];\n // Request a JSON response for the current values from the provided URL.\n JsonObjectRequest stringRequestF = new JsonObjectRequest(Request.Method.GET, forecast_url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n for (int i = 0; i<5; i++) {\n JSONObject details = response.getJSONArray(\"list\").getJSONObject(132+(i*24)); //calculate date numbers by adding 24 hours per day\n\n //Get day of the week\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"EEEE\");\n Date date = new java.util.Date(Long.valueOf(details.getInt(\"dt\"))*1000);\n String day = dateFormat.format(date );\n System.out.println(day);\n\n forecast[i] = new Pollutants(day,\n details.getJSONObject(\"main\").getString(\"aqi\"),\n details.getJSONObject(\"components\").getString(\"pm2_5\"),\n details.getJSONObject(\"components\").getString(\"pm10\"),\n details.getJSONObject(\"components\").getString(\"o3\"),\n details.getJSONObject(\"components\").getString(\"co\"),\n details.getJSONObject(\"components\").getString(\"so2\"),\n details.getJSONObject(\"components\").getString(\"no2\"));\n }\n //Call visualize function to view the results\n visualizeForecast(forecast);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(MainActivity.this, \"An error occurred!\", Toast.LENGTH_SHORT).show();\n Log.i(\"error\", String.valueOf(error));\n }\n }\n );\n\n // Add the request to the RequestQueue.\n queue.add(stringRequestF);\n }", "public synchronized void updateTransdailyData() {\n Instant startTime = Instant.now();\n log.debug(\"start updateTransdailyData startTime:{}\", startTime.toEpochMilli());\n try {\n\n // query all group statistical info\n List<StatisticalGroupTransInfo> groupStatisticalList = groupService\n .queryLatestStatisticalTrans();\n\n // traverse group list\n traverseNetList(groupStatisticalList);\n\n } catch (Exception ex) {\n log.error(\"fail updateTransdailyData\", ex);\n }\n log.debug(\"end updateTransdailyData useTime:{}\",\n Duration.between(startTime, Instant.now()).toMillis());\n }", "public void getSeedEntryCount(String mVarietyMstID,\n String mGradeId,String CurrentDate,\n String HeapNo,\n\n final HttpResponseListener<JSONObject> hhtpResponseListener) {\n CurrentDate = AllUtils.getFormattedDateForSql(CurrentDate);\n String url = ConstantPath.BASE_URL_NEW + \"Mahacott/CallTrackingRequest?action=getSeedEntryCount&CommodityMstId=2\"\n + \"&CommoVarietyMstId=\" + mVarietyMstID\n + \"&Grade=\" + mGradeId\n + \"&PressingDate=\" +CurrentDate\n + \"&HeapNo=\" + HeapNo + \"\";\n\n System.out.println(\"URL==\" + url);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(\n Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n System.out.println(\"GET SEED STOCK QTY RESPONSE: \" + response.toString());\n hhtpResponseListener.getResponse(response);\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n // TODO Auto-generated method stub\n error.printStackTrace();\n }\n });\n\n RequestConnection.getRequestConnection(context).addRequestQue(jsonObjectRequest);\n\n }", "public void timeTrip(View view){\n String URL = \"http://172.18.35.160:9080/CarpoolingTECServer/connect/request\";\n String ptoSalida = txtInicio.getText().toString();\n String ptoDestino = txtFin.getText().toString();\n\n String all = ptoSalida + \",\" + ptoDestino;\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n JsonObjectRequest objectRequest = new JsonObjectRequest(\n Request.Method.GET,\n URL,\n null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"Vivihola\", response.toString());\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Vivihola\", error.toString());\n }\n }\n );\n requestQueue.add(objectRequest);\n\n }", "@RequestMapping(value = \"workoutOfToday\", method= RequestMethod.POST)\n\tpublic String getSpecificDayPost(HttpSession session, HttpServletRequest request, ModelMap model){\n\n\t\tString username = (String)session.getAttribute(\"username\");\n\t\tString date = (String)session.getAttribute(\"date\");\n\t\tint numberOfInputs = (Integer)session.getAttribute(\"numberOfInputs\");\n\t\tDay day = workoutService.getSpecificDay(username,date);\n\t\tArrayList<Exercises> exercises = day.getExercises();\n\t\tArrayList<Double> inputs = new ArrayList<Double>();\n\n\n\t\t//Gets weights inputs from user\n\t\tfor(int i=1; i<=numberOfInputs;i++){\n\t\t\tString number = Integer.toString(i);\n\t\t\tinputs.add(Double.parseDouble(request.getParameter(number)));\n\t\t}\n\n\t\t//Adds input into day object.\n\t\tint index = 0;\n\t\tfor(int i=0; i<exercises.size(); i++){\n\t\t\tExercises exercise = exercises.get(i);\n\t\t\tArrayList<Set> sets = exercise.getSet();\n\t\t\tfor(int j=0; j<sets.size();j++){\n\t\t\t\tSet set = sets.get(j);\n\t\t\t\tDouble input = inputs.get(index);\n\t\t\t\tset.setWeight(input);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\t//Add input into databse\n\t\tworkoutService.updateDay(day, username);\n\n\n\t\tVIEW_INDEX = \"homepage\";\n\t\treturn \"redirect:/\"+VIEW_INDEX;\n\t}", "public static String getJsonData(String baseURL, String biExportURL, String jSessionID, String analysisStartDate, String analysisEndDate){\n String jsonData = \"\";\n try {\n URL url = new URL(baseURL + biExportURL + \"?startDate=\" + analysisStartDate + \"&endDate=\" + analysisEndDate);\n //URL url = new URL(baseURL + \"api/2/issue/picker\" + \"?currentJQL=assignee%3Dadmin\");\n String cookie = \"JSESSIONID=\" + jSessionID;\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Content-Type\", \"application/json\");\n conn.setRequestProperty(\"Cookie\", cookie);\n if(conn.getResponseCode() == 200)\n {\n BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n String output = \"\";\n while((output = br.readLine()) != null){\n jsonData += output;\n }\n conn.disconnect();\n }\n } catch (Exception ex){\n System.out.println(\"Error in getJsonData: \" + ex.getMessage());\n jsonData = \"ERROR\";\n }\n \n System.out.println(\"\\njsonData:\");\n System.out.println(jsonData);\n return jsonData;\n }", "public String createTask(JSONRequest request, long delay, boolean interval, boolean sequential);", "private void hitApiForCreateDeal() {\n appUtils.showProgressDialog(mActivity,false);\n\n HashMap<String, String> params = new HashMap<>();\n params.put(ApiKeys.DEAL_TITLE, etTitle.getText().toString().trim());\n params.put(ApiKeys.DEAL_DESCRIPTION, etDescription.getText().toString().trim());\n params.put(ApiKeys.TOTAL_ITEMS, etTotalItems.getText().toString().trim());\n params.put(ApiKeys.ORIGINAL_PRICE, etOriginalPrice.getText().toString().trim());\n params.put(ApiKeys.NEW_PRICE, tvNewPrice.getText().toString());\n params.put(ApiKeys.START_DATE_TIME, parseTime(etBeginTime.getText().toString().trim()));\n params.put(ApiKeys.END_DATE_TIME, parseTime(etEndTime.getText().toString().trim()));\n\n ApiInterface service = RestApi.createService(ApiInterface.class);\n Call<ResponseBody> call = service.createDeal(AppSharedPrefs.getInstance(mActivity).\n getString(AppSharedPrefs.PREF_KEY.ACCESS_TOKEN, \"\"), appUtils.encryptData(params));\n ApiCall.getInstance().hitService(mActivity, call, new NetworkListener() {\n @Override\n public void onSuccess(int responseCode, String response) {\n CreateDealModel createDealModel = new Gson().fromJson(response, CreateDealModel.class);\n if (createDealModel.getCODE() == 200) {\n /*Intent intent = new Intent(mActivity, MerchantActivity.class);\n startActivity(intent);*/\n setResult(Constants.CREATE_DEAL_REQ_CODE);\n\n Intent intent1 = new Intent(Constants.REFRESH_RECCEIVER_KEY);\n // You can also include some extra data.\n intent1.putExtra(\"refresh\", true);\n LocalBroadcastManager.getInstance(mActivity).sendBroadcast(intent1);\n\n mActivity.finish();\n\n } else if (createDealModel.getCODE() == ApiKeys.UNAUTHORISED_CODE) {\n appUtils.logoutFromApp(mActivity, createDealModel.getMESSAGE());\n } else {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), createDealModel.getMESSAGE());\n }\n\n appUtils.hideProgressDialog(mActivity);\n }\n\n @Override\n public void onSuccessErrorBody(String response) {\n\n }\n\n @Override\n public void onFailure() {\n appUtils.hideProgressDialog(mActivity);\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.txt_something_went_wrong));\n\n }\n });\n\n }", "void startReportingTask();", "private String GetDataForUser(String uuid, String startDate, String endDate) {\n\n final String[] uuidString = {\"\"};\n // Create the JSON Object and the request queue to add it to\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n JSONObject jsonBodyObj = new JSONObject();\n // Specify URL to send the request to\n String url = \"http://81.109.61.10/manage\";\n try{\n jsonBodyObj.put(\"action\", \"get_fall\");\n jsonBodyObj.put(\"uuid\", uuid);\n jsonBodyObj.put(\"start_date\", startDate);\n jsonBodyObj.put(\"end_date\", endDate);\n }catch (JSONException e){\n e.printStackTrace();\n }\n\n final String requestBody = jsonBodyObj.toString();\n\n // Send POST request to the script\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST,\n url, null, new Response.Listener<JSONObject>(){\n\n @Override\n public void onResponse(JSONObject response){\n // What to do with response\n //uuidString[0] = response.optString(\"uuid\");\n Log.i(\"Response\",String.valueOf(response));\n }\n\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.e(\"Error: \", error.getMessage());\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }\n\n\n @Override public byte[] getBody() {\n byte[] bytes = requestBody.getBytes();\n return bytes;\n }\n };\n\n // Add request to the queue\n requestQueue.add(jsonObjectRequest);\n return uuidString[0];\n }", "@PostMapping(path = \"/submit\")\n ResponseEntity<UUID> submit (@RequestBody JSONObject incidentJson){\n JSONObject description = incidentJson.getJSONObject(\"description\");\n String eventOpened = description.getString(\"event_opened\");\n Timestamp timestamp = new Timestamp((Instant.from(dtf.parse(eventOpened))).getEpochSecond());\n JSONObject address = incidentJson.getJSONObject(\"address\");\n String lat = address.getString(\"latitude\");\n String lon = address.getString(\"longitude\");\n JSONObject weather = WeatherIntegration.getWeather(lat, lon, timestamp);\n Incident.Builder builder = new Incident.Builder();\n Incident incident = builder.withId(UUID.randomUUID())\n .withIncidentJson(incidentJson)\n .withWeather(weather)\n .withTimestamp(timestamp)\n .build();\n return ResponseEntity.status(HttpStatus.ACCEPTED).body(incident.getId());\n }", "private void submit()\n {\n ownerSelected = ownersDropDown.getSelectedItemPosition();\n dogSelected = dogsDropDown.getSelectedItemPosition();\n\n dog_id = dogID.get(dogSelected).toString();\n human_id = ownerID.get(ownerSelected).toString();\n\n String jsonBody = \"{}\";\n\n mOkHttpClient = new OkHttpClient();\n\n HttpUrl reqURL = HttpUrl.parse(\"https://final-project-saldanaj.appspot.com/dogs/\" + dog_id + \"/owner/\" + human_id);\n\n RequestBody body = RequestBody.create(JSON, jsonBody);\n\n Request request = new Request.Builder()\n .url(reqURL)\n .put(body)\n .build();\n\n mOkHttpClient.newCall(request).enqueue(new Callback(){\n\n @Override\n public void onFailure(Call call, IOException e)\n {\n e.printStackTrace();\n }\n\n\n @Override\n public void onResponse(Call call, Response response) throws IOException\n {\n String r = response.body().string();\n\n System.out.print(r);\n }\n\n }); // end of the newCall.enqueue callback\n\n }", "protected void onGetDailyTimerSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public Breakdown generateDiurnalReport(Date startDate, String[] demoArr) {\n\n Breakdown result = new Breakdown();\n AppUsageDAO auDAO = new AppUsageDAO();\n Date startHour = startDate;\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:00\");\n //for each hour (for 24 loop)\n for (int i = 0; i < 24; i++) {\n\n HashMap<String, Breakdown> miniMap = new HashMap<String, Breakdown>();\n result.addInList(miniMap);\n\n Date endHour = new Date(startHour.getTime() + 1000 * 60 * 60);\n miniMap.put(\"period\", new Breakdown(sdf.format(startHour) + \"-\" + sdf.format(endHour)));\n\n //get number of targetted users\n Date endDate = new Date(startDate.getTime() + 1000 * 60 * 60 * 24);\n ArrayList<User> targetList = auDAO.retrieveUserByDemo(startDate, endDate, demoArr);\n int targetCount = targetList.size();\n //get userList for this hour, filtered by demo\n ArrayList<User> userList = auDAO.retrieveUserByDemo(startHour, endHour, demoArr);\n double secondsThisHour = 0;\n\n //for each user\n for (User user : userList) {\n\n //retrieve appUsageList\n ArrayList<AppUsage> auList = auDAO.retrieveByUserHourly(user.getMacAddress(), startHour, endHour);\n\n Date oldTime = null;\n if (auList.size() > 0) {\n oldTime = auList.get(0).getDate();\n }\n\n //For each appusage in appUsageList\n for (int j = 1; j < auList.size(); j++) {\n Date newTime = auList.get(j).getDate();\n\n //calculate usageTime and add to secondsThisHour\n //difference between app usage timing\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n secondsThisHour += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n secondsThisHour += 10;\n }\n\n oldTime = newTime;\n\n }\n //Add 10 seconds for the last appusage in the list\n if (auList.size() > 0) {\n Date lastTime = auList.get(auList.size() - 1).getDate();\n\n long difference = Utility.secondsBetweenDates(lastTime, endHour);\n\n if (difference > 10) {\n difference = 10;\n }\n secondsThisHour += difference;\n\n }\n\n }\n //divide by all users in this hour to get average usage time in this hour\n if (targetCount > 0) {\n secondsThisHour /= targetCount;\n\n }\n\n //store in breakdown\n long time = Math.round(secondsThisHour);\n miniMap.put(\"duration\", new Breakdown(\"\" + time));\n\n startHour = endHour;\n }\n\n return result;\n }", "@Override\n public DataObjectResponse<Agenda> handlePOST(DataObjectRequest<Agenda> request)\n {\n if(getRequestValidator() != null) getRequestValidator().validatePOST(request);\n\n Agenda agendaToPersist = request.getDataObject();\n final String customerID = agendaToPersist.getCustomerId();\n\n ObjectTrackerManager trackerManager = new ObjectTrackerManager();\n trackerManager.register(new EndpointObjectTracker<>(agendaProgressClient, AgendaProgress.class, customerID));\n trackerManager.register(new EndpointObjectTracker<>(operationProgressClient, OperationProgress.class, customerID));\n trackerManager.register(new PersisterObjectTracker<>(getObjectPersister(), Agenda.class));\n\n // verify we have a valid insight for this agenda\n Insight insight = null;\n try\n {\n insight = getInsightSelector().select(agendaToPersist);\n } catch (ValidationException e)\n {\n return new DefaultDataObjectResponse<>(ErrorResponseFactory.buildErrorResponse(e, e.getResponseCode(), request.getCID()));\n }\n if(insight == null)\n {\n return new DefaultDataObjectResponse<>(ErrorResponseFactory.objectNotFound(\n \"No available insights for processing agenda\",\n request.getCID()));\n }\n\n // The Agenda id is generated up front for use on other object updates/creates\n agendaToPersist.setId(UUID.randomUUID().toString());\n AgendaInsight agendaInsight = new AgendaInsight();\n agendaInsight.setInsightId(insight.getId());\n agendaInsight.setResourcePoolId(insight.getResourcePoolId());\n agendaToPersist.setCid(agendaToPersist.getCid() == null ? UUID.randomUUID().toString() : agendaToPersist.getCid());\n agendaToPersist.setAgendaInsight(agendaInsight);\n agendaToPersist.setParams(agendaToPersist.getParams() == null ? new ParamsMap() : agendaToPersist.getParams());\n\n DataObjectResponse<AgendaProgress> progressResponse =\n agendaToPersist.getProgressId() == null ? postAgendaProgress(agendaToPersist, request.getCID()) : putAgendaProgress(agendaToPersist);\n if (progressResponse.isError())\n {\n trackerManager.cleanUp();\n return new DefaultDataObjectResponse<>(progressResponse.getErrorResponse());\n }\n final String agendaProgressId = progressResponse.getFirst().getId();\n trackerManager.track(progressResponse.getFirst());\n agendaToPersist.setProgressId(agendaProgressId);\n\n // always create new OperationProgress objects\n if (agendaToPersist.getOperations() != null)\n {\n DataObjectResponse<OperationProgress> persistResponse = persistOperationProgresses(agendaToPersist, request.getCID(), trackerManager);\n if (persistResponse.isError())\n {\n trackerManager.cleanUp();\n return new DefaultDataObjectResponse<>(persistResponse.getErrorResponse());\n }\n }\n\n DataObjectResponse<Agenda> agendaPersistResponse = super.handlePOST(request);\n if (agendaPersistResponse.isError())\n {\n trackerManager.cleanUp();\n return agendaPersistResponse;\n }\n\n Agenda agendaResp = agendaPersistResponse.getFirst();\n trackerManager.track(agendaResp);\n\n if (!(agendaToPersist.getParams().containsKey(GeneralParamKey.doNotRun)))\n {\n DataObjectResponse<ReadyAgenda> readyAgendaResponse = persistReadyAgenda(insight.getId(), agendaResp.getId(), agendaResp.getCustomerId(), request.getCID());\n if (readyAgendaResponse.isError())\n {\n trackerManager.cleanUp();\n return new DefaultDataObjectResponse<>(readyAgendaResponse.getErrorResponse());\n }\n }\n\n return agendaPersistResponse;\n }", "public void updateDaily() throws IOException {\n String lResponse = null;\n try{\n lResponse = new HTTPRequest().execute( \"http://192.168.1.100:8080\" ).get();\n\n }catch(Exception e){}\n\n String input;\n// input = in.readLine();\n if(lResponse != null) {\n dailyValue = Double.parseDouble(lResponse);\n }\n }", "private void displayCalorieData(JSONObject[] jsonObjects) {\r\n int[] caloriesOut = {};\r\n boolean displayGoal = false;\r\n\r\n try {\r\n // Get calories burned for each day\r\n JSONArray caloriesArray = jsonObjects[0].getJSONArray(\"activities-calories\");\r\n caloriesOut = new int[caloriesArray.length()];\r\n\r\n for(int i = 0; i < caloriesArray.length(); i++) {\r\n int calsOut = Integer.parseInt(caloriesArray.getJSONObject(i)\r\n .getString(\"value\"));\r\n caloriesOut[i] = calsOut;\r\n }\r\n\r\n // Get calorie burn goal, if it was requested\r\n if(jsonObjects.length > 1) {\r\n displayGoal = true;\r\n JSONObject jsonObject = jsonObjects[1];\r\n caloriesOutGoal = Integer.parseInt(jsonObject.getJSONObject(\"goals\")\r\n .getString(\"caloriesOut\"));\r\n }\r\n\r\n } catch(JSONException | NullPointerException e) {\r\n fitbitRequestError();\r\n return;\r\n }\r\n\r\n BarChart chart = findViewById(R.id.chart);\r\n\r\n ArrayList<BarEntry> entries = new ArrayList<>();\r\n int[] barColours = new int[7];\r\n\r\n // For each day in the week create a bar showing the data\r\n // If there is no data create a bar with value 0 so the day is still shown on the graph\r\n for (int i = 0; i < 7; i++) {\r\n float yValue = 0f;\r\n if (i < caloriesOut.length) {\r\n yValue = (float) caloriesOut[i];\r\n }\r\n\r\n entries.add(new BarEntry((float) i, yValue));\r\n\r\n barColours[i] = getResources().getColor(getProgressColour((int) yValue,\r\n caloriesOutGoal));\r\n }\r\n\r\n // Show data on chart\r\n BarDataSet dataSet = new BarDataSet(entries, \"\");\r\n dataSet.setColors(barColours);\r\n dataSet.setDrawValues(false);\r\n BarData barData = new BarData(dataSet);\r\n\r\n chart.setData(barData);\r\n chart.getLegend().setEnabled(false);\r\n\r\n chart.invalidate();\r\n\r\n if(displayGoal) {\r\n // Show calorie burn goal\r\n String unit = getResources().getString(R.string.cal_burn_unit);\r\n TextView textViewSummary = findViewById(R.id.tv_goal_summary);\r\n if(caloriesOutGoal > 0) {\r\n textViewSummary.setText(getResources().getString(R.string.goal_value_unit,\r\n caloriesOutGoal, unit));\r\n } else {\r\n textViewSummary.setText(getResources().getString(R.string.no_goal_set));\r\n }\r\n }\r\n }", "@RequestMapping(value = \"/getReportByNameDay\", method = RequestMethod.POST)\r\n public @ResponseBody String getReportByDay(@RequestParam(\"employeeId\") String employeeId,\r\n @RequestParam(\"attendanceDate\") String attendanceDate) {\r\n logger.info(\"inside ReportGenerationController getReportByDay()\");\r\n\r\n return reportGenerationService.getReportByDay(employeeId,\r\n new Date(Long.valueOf(attendanceDate)));\r\n }", "@GetMapping(\"/workout\")\n\tpublic String getDailyWorkout() {\n\t\treturn \"Run a hard 5KM\";\n\t}", "protected void runEachDay() {\n \n }", "public void toPunish() {\n\n //// TODO: 24/03/2017 delete the following lines\n// dalDynamic.addRowToTable2(\"23/03/2017\",\"Thursday\",4,walkingLength,deviation)\n\n\n\n int dev,sum=0;\n long id;\n id=dalDynamic.getRecordIdAccordingToRecordName(\"minutesWalkTillEvening\");\n Calendar now = Calendar.getInstance();//today\n Calendar calendar = Calendar.getInstance();\n SimpleDateFormat dateFormat=new SimpleDateFormat(\"dd/MM/yyyy\");\n String date;\n for (int i = 0; i <DAYS_DEVIATION ; i++) {\n date=dateFormat.format(calendar.getTime());\n Log.v(\"Statistic\",\"date \"+date);\n dev = dalDynamic.getDeviationAccordingToeventTypeIdAnddate(id,date);\n sum+=dev;\n calendar.add(Calendar.DATE,-1);//// TODO: -1-i????\n }\n if(sum==DAYS_DEVIATION){\n Intent intent = new Intent(context,BlankActivity.class);\n context.startActivity(intent);\n //todo:punishment\n }\n\n }", "private String fakeBooking(int userid, int requestid) {\n long issuance = System.currentTimeMillis();\n String time = getVaryingDate();\n\n String booking = \"{\\n \\\"userid\\\": \" + userid + \",\\n\\\"requestid\\\": \" + requestid +\n \",\\n\\\"dentistid\\\": \" + DENTIST_ID + \",\\n\\\"issuance\\\": \" + issuance +\n \",\\n\\\"time\\\": \\\"\" + time + \"\\\" \\n}\";\n\n System.out.println(booking);\n return booking;\n }", "public void sendInformation() throws IOException {\n\t\tURL url = new URL(\"http://localhost:8082/EmergencyWebService/addAlert/\" + this.localisation.x + \"/\" + this.localisation.y + \"/\" + this.range); \n\t\tHttpURLConnection connection = (HttpURLConnection) url.openConnection(); \n\t\tconnection.setRequestMethod(\"POST\"); \n\t\tconnection.setRequestProperty(\"Content-Type\", \"application/json; charset=UTF-8\"); \n\t\tconnection.setDoOutput(true); \n\t\t\n\t\tOutputStream os = connection.getOutputStream(); \n\t\tOutputStreamWriter osw = new OutputStreamWriter(os, \"UTF-8\"); \n\t\tosw.write(Tools.toJsonString(this.alerte)); \n\t\tosw.flush(); \n\t\tosw.close();\n\t\t\n\t\tconnection.getInputStream();\n\t\t\n\t\tBufferedReader in = new BufferedReader( new InputStreamReader(connection.getInputStream()));\n\t\tString inputLine;\n\t\tStringBuffer response = new StringBuffer(); \n\t\twhile ((inputLine = in.readLine()) != null) { \n\t\t\tresponse.append(inputLine); \n\t\t} \n\t\tin .close();\n\t\t\n\n\n\t}", "@RequestMapping(value = CREATE_API_JOB_SCHEDULED_SIMPLE, method = POST)\n @ResponseBody\n @ResponseStatus(ACCEPTED)\n public ResponseEntity<String> createScheduledApiSimpleTriggeredJob(@RequestBody final QuartzDTO quartzDTO, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {\n return quartzService.createScheduledApiSimpleTriggeredJob(quartzDTO, getCookie(httpServletRequest, X_AUTH_TOKEN));\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n Facebook facebook = (Facebook) request.getSession().getAttribute(\"facebook\");\n \n // get the post data and process it\n // make sure to validate it one more time to ensure all of it is there\n // and that the goal end time is after the current time.\n \n if (facebook == null) {\n response.sendRedirect(\"./welcome.jsp\");\n }\n \n // get the variables\n String userid = null;\n try {\n userid = facebook.getId();\n } catch (Exception ex) {\n Logger.logMsg(1, \"Unable to access userid from Facebook session. Aborting goal creation.\");\n }\n \n if (userid == null) {\n response.sendRedirect(\"./welcome.jsp\");\n }\n // validate said variables\n // endDate, endTime, name, failure\n \n String endDate = request.getParameter(\"endDate\");\n String endTime = request.getParameter(\"endTime\");\n String name = request.getParameter(\"name\");\n String failure = request.getParameter(\"failure\");\n \n // redirect if anything is missing\n if (name == null || failure == null || endDate == null || endTime == null) {\n response.sendRedirect(\"./welcome.jsp\");\n }\n \n // format the datetime\n int year = Integer.parseInt(endDate.substring(0,4));\n int month = Integer.parseInt(endDate.substring(5,7)) - 1;\n int day = Integer.parseInt(endDate.substring(8,10));\n int hour = Integer.parseInt(endTime.substring(0,2));\n int minute = Integer.parseInt(endTime.substring(3,5));\n \n Calendar calendar = Calendar.getInstance();\n \n calendar.set(year, month, day, hour, minute, 0);\n \n \n // compile the data into a goal object\n Goal goal = new Goal(userid, name, failure, calendar, 0);\n \n // Send the goal object to the database class\n new MySQLFacebookDao().addGoal(goal);\n \n \n response.sendRedirect(\"./welcome.jsp\");\n }", "private String urlBuilder(){\n String timelineURL = \"curgas/timeline.json\";\n final RequestBuilder.UrlBuilder url = new RequestBuilder.UrlBuilder();\n url.setUrl(timelineURL);\n url.appendUrlQuery(\"apikey\", Constants.API_KEY);\n url.appendUrlQuery(\"sort\", SORT_TYPE);\n url.appendUrlQuery(\"jumlah\",TOTAL_POSTS);\n url.appendUrlQuery(\"page\",Integer.toString(PAGE_LOADED));\n\n String buildURL = url.build();\n\n return buildURL;\n }", "private void createAndStartTimer() {\n CountDownTimer timer = new CountDownTimer(INTERVAL, SECOND) {\n @Override\n public void onTick(long millisUntilFinished) { }\n\n @Override\n public void onFinish() {\n /* Get the saved JSON file and store in variable */\n /* will be implemented later */\n\n /* Get the new JSON file */\n Log.d(\"timer\", \"finished one timer cycle\");\n new DownloadDataTask().execute(USGS_URL);\n try {\n // get the most recent earthquake\n mostRecentEarthquake = getFirstEarthquakeFromJson();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n // notify user of earthquake\n Intent i = new Intent(getBaseContext(), EarthquakeWatchService.class);\n i.putExtra(\"earthquake\", mostRecentEarthquake);\n startService(i);\n createAndStartTimer();\n }\n };\n\n timer.start();\n }", "private static String fireAt(Request req) {\n\n if(req.params(\"Version\").equals(\"Updated\")) {\n\n // Generate model from json, get coordinates from fire request\n BattleshipModelUpdated model = (BattleshipModelUpdated) getModelFromReq( req );\n\n model.resetArrayUpdated( model );\n model = model.Fire( model, req );\n model.resetArrayUpdated( model );\n\n Gson gson = new Gson();\n return gson.toJson( model );\n\n }else{\n\n // Generate model from json, get coordinates from fire request\n BattleshipModelNormal model = (BattleshipModelNormal) getModelFromReq( req );\n\n model.resetArrayNormal( model );\n model = model.Fire( model, req );\n model.resetArrayNormal( model );\n\n Gson gson = new Gson();\n return gson.toJson( model );\n\n }\n }", "public interface DailyReportService {\n /**\n * 通过时间获取日报表\n * @param dailyRportQueryDTO\n * @return\n */\n List<DailyReportDO> getDailyReportByTime(DailyRportQueryDTO dailyRportQueryDTO);\n}", "@FormUrlEncoded\n @POST(Service.PATH_MASTER_TIME_PLAN_BY_DATE)\n Call<ApiTimePlanObject> postMasterTimePlanByDate(\n @Field(\"UserId\") int userId,\n @Field(\"DateTimeSelect\") String Date\n );", "public static void createDailyReminderAlarm(Context context) {\n String prefWeekendDayStart = PreferenceUtils.readString(PreferenceUtils.SNOOZE_WEEKEND_DAY_START, context);\n int weekendDayStartHour = TimePreference.getHour(prefWeekendDayStart);\n int weekendDayStartMinute = TimePreference.getMinute(prefWeekendDayStart);\n\n // Create reminders intent.\n PendingIntent alarmIntent = getRemindersIntent(context, Intents.DAILY_REMINDER);\n\n // Trigger the alarm.\n triggerDailyAlarm(context, weekendDayStartHour, weekendDayStartMinute, alarmIntent);\n }", "public void exportJSON()\n {\n Gson JSONConverter = new Gson();\n FileWriter writer;\n\n try\n {\n // wipe the file\n PrintWriter write = new PrintWriter(new File(fp));\n write.print(\"\");\n write.close();\n\n // Initialize FileWriter to write Strings into JSON file.\n writer = new FileWriter(fp + \"/queue.json\");\n\n Iterator<ComparableCalendar> iter = this.queue.iterator();\n // Loop through the PQ.\n while(iter.hasNext())\n {\n ComparableCalendar nextObject = iter.next();\n // Convert an issue object into a JSON-formatted representation of it, as a String.\n String representationJSON = JSONConverter.toJson(nextObject);\n\n // Write that String to the file.\n writer.write(representationJSON + \"\\n\");\n }\n // Close the FileWriter to conserve system resources.\n writer.close();\n\n }\n catch (Exception e)\n {\n // Print any error messages that results to the console.\n e.printStackTrace();\n }\n\n }", "public void makeRequest() {\n Request newRequest = new Request();\n\n if (mProduct == null) {\n Toast.makeText(getContext(), \"BAD\", Toast.LENGTH_LONG).show();\n return;\n }\n\n newRequest.setClient(ParseUser.getCurrentUser());\n newRequest.setProduct(mProduct);\n newRequest.setBeaut(mBeaut);\n\n Date dateTime = new Date(selectedAppointmet.appDate.getTimeInMillis());\n newRequest.setDateTime(dateTime);\n // TODO: uncomment below line when dataset is clean and products have lengths\n// newRequest.setLength(mProduct.getLength());\n newRequest.setLength(1);\n newRequest.setSeat(selectedAppointmet.seatId);\n newRequest.setDescription(rComments.getText().toString());\n\n sendRequest(newRequest);\n }", "private void getInfoShipment() {\n // Registro del LocalDateTime Converter\n Gson gson = new GsonBuilder()\n\n .registerTypeAdapter(LocalDateTime.class, new JsonDeserializer<LocalDateTime>() {\n @Override\n public LocalDateTime deserialize(JsonElement json, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {\n return LocalDateTime.parse(json.getAsString());\n //return LocalDateTime.parse(json.getAsString(), DateTimeFormatter.ofPattern(\"yyyy::MM::dd HH::mm::ss\"));\n }\n }).create();\n // creacion de Instacia RETROFIT\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(\"https://api.busterminal.octword.net\") // OCTWORD AP\n .addConverterFactory(GsonConverterFactory.create(gson)) // GSON CONVERRTER\n .build(); // Llama a la clase INTERFAZ\n JasonPlaceHolder jsonPlaceHolder = retrofit.create(JasonPlaceHolder.class);\n\n\n Call<Shipment> call = jsonPlaceHolder.getShipmentInfo();\n call.enqueue(new Callback<Shipment>() {\n @Override\n public void onResponse(Call<Shipment> call, Response<Shipment> response) {\n if (!response.isSuccessful()) {\n // mesaje de Error\n mJsoTxtView.setText(\"Codigo: \" + response.code());\n return;\n }\n // response del servidor0\n\n String content = \"\";\n\n content = \"XKey:\" + response.body().getXKey() +\n \"\\n SenderCustomerXKey:\" + response.body().getSenderCustomerXKey() +\n \"\\n ReceiverFullName:\" + response.body().getReceiverFullName() +\n \"\\n ReceiverMobilPhone:\" + response.body().getReceiverMobilPhone() +\n \"\\n ReceiverEmail:\" + response.body().getReceiverEmail() +\n \"\\n XPassword:\" + response.body().getXPassword() +\n \"\\n TrackingNumber:\" + response.body().getTrackingNumber() +\n \"\\n XDate:\" + response.body().getXDate()+\n \"\\n XFrom:\" + response.body().getXFrom() +\n \"\\n XTo:\" + response.body().getXTo() +\n \"\\n XContent:\" + response.body().getXContent() +\n \"\\n DeclaredAmount:\" + response.body().getDeclaredAmount() +\n \"\\n Fee:\" + response.body().getFee() +\n \"\\n PayWhenReceived:\" + response.body().getPayWhenReceived() +\n \"\\n PaymentStatus:\" + response.body().getPaymentStatus() +\n \"\\n InvoiceXValue:\" + response.body().getInvoiceXValue() +\n \"\\n ShipmentStatus:\" + response.body().getShipmentStatus() +\n \"\\n BusXKey:\" + response.body().getBusXKey() +\n \"\\n BusDriverXKey:\" + response.body().getBusDriverXKey();\n\n\n mJsoTxtView.append(content);\n\n\n }\n\n @Override\n public void onFailure(Call<Shipment> call, Throwable t) {\n mJsoTxtView.setText(t.getMessage());\n }\n });\n {\n\n }\n\n }", "private void getWeekActiveTimeData(String accessToken) {\r\n String[] taskParams = new String[3];\r\n\r\n taskParams[0] = accessToken;\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n // Fairly active and very active minutes are added to get active minutes total\r\n taskParams[1] = \"https://api.fitbit.com/1/user/-/activities/minutesFairlyActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n taskParams[2] = \"https://api.fitbit.com/1/user/-/activities/minutesVeryActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "@GetMapping(\"/day-times\")\n @Timed\n public List<DayTime> getAllDayTimes() {\n log.debug(\"REST request to get all DayTimes\");\n List<DayTime> dayTimes = dayTimeRepository.findAll();\n return dayTimes;\n }", "private ReportRequest getAdGroupReport(Calendar from, Calendar to) {\r\n\t\tAdGroupPerformanceReportRequest request = new AdGroupPerformanceReportRequest();\r\n\t\trequest.setFormat(ReportFormat.CSV);\r\n\t\trequest.setReportName(\"Ad Group Report\");\r\n\t\trequest.setAggregation(ReportAggregation.HOURLY);\r\n\t\trequest.setReturnOnlyCompleteData(false);\r\n\r\n\t\tAccountThroughAdGroupReportScope scope = new AccountThroughAdGroupReportScope();\r\n\t\tArrayOflong accountIds = new ArrayOflong();\r\n\t\taccountIds.getLongs().add(authorizationData.getAccountId());\r\n\t\tscope.setAccountIds(accountIds);\r\n\t\tscope.setCampaigns(null);\r\n\t\tscope.setAdGroups(null); \r\n\t\trequest.setScope(scope);\r\n\r\n\t\tArrayOfAdGroupPerformanceReportColumn value = new ArrayOfAdGroupPerformanceReportColumn();\r\n\t\tList<AdGroupPerformanceReportColumn> columns = value.getAdGroupPerformanceReportColumns();\r\n\t\tString adFields = adsProperties.getProperty(\"api.bing.adGroupPerformanceReport.fields\");\r\n\t\tif (adFields != null && adFields.length() > 2) {\r\n\t\t\tfor (String fieldId : adFields.split(\",\")) {\r\n\t\t\t\tcolumns.add(AdGroupPerformanceReportColumn.fromValue(fieldId));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcolumns.add(AdGroupPerformanceReportColumn.AD_GROUP_ID);\r\n\t\t\tcolumns.add(AdGroupPerformanceReportColumn.AD_GROUP_NAME);\r\n\t\t\tcolumns.add(AdGroupPerformanceReportColumn.CAMPAIGN_ID);\r\n\t\t\tcolumns.add(AdGroupPerformanceReportColumn.CAMPAIGN_NAME);\r\n\t\t\tcolumns.add(AdGroupPerformanceReportColumn.TIME_PERIOD);\r\n\t\t\tcolumns.add(AdGroupPerformanceReportColumn.CLICKS);\r\n\t\t\tcolumns.add(AdGroupPerformanceReportColumn.COST_PER_CONVERSION);\r\n\t\t\tcolumns.add(AdGroupPerformanceReportColumn.SPEND);\r\n\t\t\tcolumns.add(AdGroupPerformanceReportColumn.CONVERSION_RATE);\r\n\t\t\tcolumns.add(AdGroupPerformanceReportColumn.IMPRESSIONS);\r\n\t\t}\r\n\t\trequest.setColumns(value);\r\n\r\n\t\tReportTime reportTime = new ReportTime();\r\n\t\tDate start = new Date();\r\n\t\tDate end = new Date();\r\n\t\tstart.setDay(from.get(Calendar.DAY_OF_MONTH));\r\n\t\tstart.setMonth(from.get(Calendar.MONTH)+1);\r\n\t\tstart.setYear(from.get(Calendar.YEAR));\r\n\t\tend.setDay(to.get(Calendar.DAY_OF_MONTH));\r\n\t\tend.setMonth(to.get(Calendar.MONTH)+1);\r\n\t\tend.setYear(to.get(Calendar.YEAR));\r\n\t\treportTime.setCustomDateRangeStart(start);\r\n\t\treportTime.setCustomDateRangeEnd(end);\r\n\t\trequest.setTime(reportTime);\r\n\r\n\t\treturn request;\r\n\t}", "private void generateOutgoingReport() {\r\n\r\n\t\tStringBuilder stringBuilder = new StringBuilder();\r\n\t\tstringBuilder.append(\"\\n----------------------------------------\\n\")\r\n\t\t\t\t.append(\" Outgoing Daily Amount \\n\")\r\n\t\t\t\t.append(\"----------------------------------------\\n\")\r\n\t\t\t\t.append(\" Date | Trade Amount \\n\")\r\n\t\t\t\t.append(\"-----------------+----------------------\\n\");\r\n\t\tallOutgoings.entrySet().forEach(\r\n\t\t\t\tkey -> stringBuilder.append(key.getKey() + \" | \" + key.getValue().get() + \"\\n\"));\r\n\t\tdataWriter.write(stringBuilder.toString());\r\n\t}", "private void getDate() {\t// use the date service to get the date\r\n String currentDateTimeText = theDateService.getDateAndTime();\r\n this.send(currentDateTimeText);\r\n }", "public String getOneDayStatistic(String unitId, String groupId,\n\t\t\tString deptId, Date queryDate) {\n\t\tMap<String,String> allAttendance = new HashMap<String,String>();\n\t\tList<OfficeAttendanceGroup> groupList = officeAttendanceGroupService.listOfficeAttendanceGroupByUnitId(unitId);\n\t\tString[] groupIds = new String[groupList.size()];\n\t\tfor(int m=0;m<groupList.size();m++){\n\t\t\tgroupIds[m] = groupList.get(m).getId();\n\t\t}\n\t\tMap<String,List<OfficeAttendanceGroupUser>> groupUserMap = officeAttendanceGroupUserService.getOfficeAttendanceGroupUserMap(groupIds);\n\t\tList<OfficeAttendanceExcludeUser> excludeUsers = officeAttendanceExcludeUserService.getOfficeAttendanceExcludeUserByUnitId(unitId);\n\t\tSet<String> excludeSet = new HashSet<String>();\n\t\tfor(OfficeAttendanceExcludeUser exclude:excludeUsers){\n\t\t\texcludeSet.add(exclude.getUserId());\n\t\t}\n\t\tif(StringUtils.isNotEmpty(groupId)){\n\t\t\tList<OfficeAttendanceGroupUser> groupUserList = groupUserMap.get(groupId);\n\t\t\tallAttendance = covertOfficeAttendanceInfoMap(groupUserList , excludeUsers);\n\t\t\t\n\t\t}else if(StringUtils.isNotEmpty(deptId)){\n\t\t\tList<User> deptUser = userService.getUsersByDeptId(deptId);\n\t\t\tallAttendance = covertUserMap(deptUser,excludeUsers);\n\t\t}else{\n\t\t\tList<User> unitUser = userService.getUserListByUnitId(unitId, null, User.TEACHER_LOGIN, null);\n\t\t\tallAttendance = covertUserMap(unitUser ,excludeUsers);\n\t\t}\n\t\tSet<String> userSet = allAttendance.keySet();\n\t\tint i =0;\n\t\tString[] userIds = new String[userSet.size()];\n\t\tfor(String s:userSet){\n\t\t\tuserIds[i++] = s;\n\t\t}\n\t\t\n\t\tJSONObject json = new JSONObject();\n//\t\tJSONArray jsonArr = new JSONArray();\n//\t\tJSONObject json2 = null;\n\t\tString[] attendancename = new String[11];\n\t\tInteger[] attendanceNum = new Integer[11];\n//\t\t取该单位下 迟到早退List\n\t\tList<OfficeAttendanceInfo> later = listOfficeAttendanceInfoByDateAndState(unitId, null,null,AttendanceConstants.ATTENDANCE_CLOCK_STATE_1, queryDate);\n\t\tList<OfficeAttendanceInfo> leaveEarly = listOfficeAttendanceInfoByDateAndState(unitId,null,null, AttendanceConstants.ATTENDANCE_CLOCK_STATE_2, queryDate);\n\n\t\tint laterSum = 0;\n\t\tint leaveEarlySum =0;\n\t\tlaterSum = sumLeaveOrLater(allAttendance,later);\n\t\tleaveEarlySum = sumLeaveOrLater(allAttendance,leaveEarly);\n\n\t\tattendancename[0] = \"迟到人数\";\n\t\tattendanceNum[0] = laterSum;\n\t\t\n\n\t\tattendancename[1] = \"早退人数\";\n\t\tattendanceNum[1] = leaveEarlySum;\n\t\tMap<String,String> costomAttendance = getOfficeAttendanceInfoByDateAndState(AttendanceConstants.ATTENDANCE_CLOCK_STATE_DEFAULT, queryDate, unitId,null,null);\n\t\tMap<String,String> outWork = getOfficeAttendanceInfoByDateAndState(AttendanceConstants.ATTENDANCE_CLOCK_STATE_3, queryDate, unitId,null,null);\n\t\t\n\t\n\t\tint customSum=0;\n\t\tint outWorkSum=0;\n\t\tcustomSum =sumPeople(allAttendance,costomAttendance);\n\t\toutWorkSum =sumPeople(allAttendance,outWork);\n\n\t\tattendancename[2] = \"正常考勤人数\";\n\t\tattendanceNum[2] = customSum;\n\n\t\tattendancename[3] = \"外勤考勤人数\";\n\t\tattendanceNum[3] = outWorkSum;\n\t\n//\t\tList<Teacher> teacherList = teacherService.getTeachers(unitId);\n//\t\tList<OfficeAttendanceExcludeUser> notAddAttendance = officeAttendanceExcludeUserService.getOfficeAttendanceExcludeUserByUnitId(unitId);\n//\t\tint sumNotAddAttencedance = sumNotAttendance(allAttendance,notAddAttendance,flag);\n//\t\t\n//\t\tint attendanceNum = allAttendance.size() - sumNotAddAttencedance;\n\n\t\tattendancename[5] = \"考勤人数\";\n\t\tattendanceNum[5] = allAttendance.size();\n\t\n\t\tSet<String> applySet = new HashSet<String>();\n\t\tList<OfficeTeacherLeave> leaveList = officeTeacherLeaveService.getQueryList(unitId, userIds, queryDate, queryDate, null, true);\n\t\tint leaveSum =0;\n\t\tfor(OfficeTeacherLeave l:leaveList){\n\t\t\tif(userSet.contains(l.getApplyUserId())){\n\t\t\t\tapplySet.add(l.getApplyUserId());\n\t\t\t\tleaveSum++;\n\t\t\t}\n\t\t}\n\n\t\tattendancename[7] = \"请假人数\";\n\t\t\n\t\tattendanceNum[7] = leaveSum;\n\t\tList<OfficeGoOut> gooutList = officeGoOutService.getListByStarttimeAndEndtime(queryDate, DateUtils.addDay(queryDate, 1), userIds);\n\t\tint goOutSum=0;\n\t\tfor(OfficeGoOut g:gooutList){\n\t\t\tif(userSet.contains(g.getApplyUserId())){\n\t\t\t\tapplySet.add(g.getApplyUserId());\n\t\t\t\tgoOutSum++;\n\t\t\t}\n\t\t}\n\t\tattendancename[8] = \"外出人数\";\n\t\tattendanceNum[8] = goOutSum;\n\t\tList<OfficeBusinessTrip> tripList = officeBusinessTripService.getListByStarttimeAndEndtime(queryDate, queryDate, userIds);\n\t\t\n\t\tMap<String,Set<String>> jtGoOutMap = officeJtGooutService.getMapStatistcGoOutSum(unitId, userIds, queryDate, DateUtils.addDay(queryDate, 1));\n\t\tint tripSum = 0;\n\t\tfor(OfficeBusinessTrip t:tripList){\n\t\t\tif(userSet.contains(t.getApplyUserId())){\n\t\t\t\tapplySet.add(t.getApplyUserId());\n\t\t\t\ttripSum++;\n\t\t\t}\n\t\t}\n\n//\t\tMap<String,Integer> jtGoOutMap = officeJtGooutService.getMapStatistcGoOutSum(unitId, userIds, queryDate, queryDate);\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n//\t\tint jtGoOutNum = jtGoOutMap.get(format.format(queryDate));\n\t\tattendancename[9] = \"出差人数\";\n\t\tattendanceNum[9] = tripSum;\n\t\tSet<String> jtSet = jtGoOutMap.get(format.format(queryDate));\n\t\tif(jtSet == null) jtSet = new HashSet<String>();\n\t\tattendancename[10] = \"集体外出人数\";\n\t\tattendanceNum[10] = jtSet.size();\n\t\tapplySet.addAll(jtSet);\n\t\t\n\t\tMap<String,String> missCard = getMissingCard(queryDate, unitId, AttendanceConstants.ATTENDANCE_CLOCK_STATE_98 ,null,null);\n\t\tMap<String,String> moreOneCard = getMissingCard(queryDate, unitId, null,null,null);\n\t\t\n\t\t\n\t\tSet<String> missCardSet = missCard.keySet();\n\t\t\n\t\tSet<String> oneMoreCardSet = moreOneCard.keySet();\n\t\tDateInfo info = dateInfoService.getDateInfo(unitId, queryDate);\n\t\tattendancename[4] = \"缺卡人数\";\n\t\tattendancename[6] = \"旷工人数\";\n\t\tif(info != null && \"N\".equals(info.getIsfeast())){\n\t\t\t\n\t\t\t//得到符合条件的 缺卡人数\n\t\t\tmissCardSet.retainAll(userSet);\n\t\t\tSet<String> missRetain = new HashSet<String>(missCardSet);\n\t\t\tmissRetain.retainAll(applySet);\n\t\t\tmissCardSet.removeAll(missRetain);\n\t\t\t\n\t\t\tattendanceNum[4] = missCardSet.size();\n\t\t\t\n\t\t\tapplySet.addAll(oneMoreCardSet);\n\t\t\tint allSum = userSet.size();\n\t\t\tuserSet.retainAll(applySet);\n\t\t\tint notWorkNum = allSum - userSet.size();\n\t\t\tattendanceNum[6] = notWorkNum;\n\t\t}else{\n\t\t\tattendanceNum[4] = 0;\n\t\t\tattendanceNum[6] = 0;\n\t\t}\n//\t\tjson.put(\"yInterval\",max_ds);\n\t\tjson.put(\"legendData\", new String[]{\"人数\"});\n\t\tjson.put(\"xAxisData\", attendancename);\n\t\tjson.put(\"loadingData\", new Integer[][]{attendanceNum});\n\t\treturn json.toString();\n\t}", "public String ajaj() {\n try {\n monthlyExpends = MonthlyExpenditureCache.getCache();\n monthlyExpendsJson = new JSONArray();\n for (MonthlyExpenditure monthlyExpend : monthlyExpends) {\n JSONObject monthlyExpendJson = new JSONObject();\n JSONArray cateExpendsJson = new JSONArray();\n JSONArray statExpendsJson = new JSONArray();\n monthlyExpendJson.put(\"total\", monthlyExpend.total());\n monthlyExpendJson.put(\n \"date\",\n CalendarUtils.toString(CalendarUtils.YM,\n monthlyExpend.getDate()));\n monthlyExpendJson.put(\"expenditures\", cateExpendsJson);\n monthlyExpendJson.put(\"statisticalExpenditures\",\n statExpendsJson);\n monthlyExpendsJson.add(monthlyExpendJson);\n // expenditures - category : list[expend]\n for (String cateName : monthlyExpend.getExpenditures().keySet()) {\n JSONArray expendsJson = new JSONArray();\n for (Expenditure expend : monthlyExpend.getExpenditures()\n .get(cateName)) {\n JSONObject expendJson = new JSONObject();\n expendJson.put(\"category\", expend.getCategory()\n .getName());\n expendJson.put(\"date\", CalendarUtils.toString(\n CalendarUtils.YMD, expend.getDate()));\n expendJson.put(\"name\", expend.getName());\n expendJson.put(\"howMuch\", expend.getHowMuch());\n expendsJson.add(expendJson);\n }\n cateExpendsJson.add(expendsJson);\n }\n // statisticalExpenditures - category : statistical expend\n for (String cateName : monthlyExpend\n .getStatisticalExpenditures().keySet()) {\n Expenditure statExpend = monthlyExpend\n .getStatisticalExpenditures().get(cateName);\n JSONObject statExpendJson = new JSONObject();\n statExpendJson.put(\"category\", statExpend.getCategory()\n .getName());\n statExpendJson.put(\"date\", CalendarUtils.toString(\n CalendarUtils.YMD, statExpend.getDate()));\n statExpendJson.put(\"howMuch\", statExpend.getHowMuch());\n statExpendJson.put(\"average\", statExpend.getAverage());\n statExpendsJson.add(statExpendJson);\n }\n }\n } catch (Exception e) {\n PrintUtils.error(this.getClass(), e);\n return ERROR;\n }\n return SUCCESS;\n }", "@RequestMapping(value = \"/getDailyReportsInfo\", method = RequestMethod.GET )\r\n\tpublic @ResponseBody Response getDailyReportsInfo(@RequestParam(value=\"projectName\") String project,\r\n\t\t\t@RequestParam(value=\"releaseName\") String release){\r\n\t\t\r\n\t\ttry{\r\n\t\t\r\n\t\tlog.info(\"project :\"+project);\r\n\t\tlog.info(\"Release :\"+release);\r\n\t\t\r\n\t\tlog.info(\"Inside getTrendingInfo method :\");\r\n\t\tSystem.out.println(\"Inside getTrendingInfo method\");\r\n\t\t//log.debug(dashboardService);\r\n\t\treturn dailyReportsService.getDailyReportsInfo(project,release);\r\n } \r\n\t\t\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ In Catch\");\r\n\t\t\tlog.error(\"Exception ocurred : \",e);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@GetMapping(\"/preparedToday\")\n\tpublic ResponseEntity<List<Food>> findAllPreparedToday() {\n\n\t\tList<Food> food = foodService.findAllPreparedTodayFood();\n\n\t\tif (food.isEmpty()) {\n\n\t\t\treturn new ResponseEntity<>(HttpStatus.NO_CONTENT);\n\t\t}\n\n\t\treturn new ResponseEntity<>(food, HttpStatus.OK);\n\t}", "public interface GrafanaService {\n @GET(\"/render\")\n Call<List<ParsedStatElement>> getData(@Query(\"from\") String from, @Query(\"until\") String until, @Query(\"target\") String target, @Query(\"format\") String format);\n}", "@GET // Fetches available flights from a specific location, given a date\r\n @Path(\"/{from}/{date}/{tickets}\")\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public String fromDate(@PathParam(\"from\") String from, @PathParam(\"date\") String date, @PathParam(\"tickets\") int tickets) {\r\n Airline airline = new Airline(\"Kaffemænd Tours\");\r\n for(Flight x : flightList) {\r\n if(x.getDate().equals(date) && x.getOrigin().equals(from)) {\r\n airline.addFlight(x);\r\n }\r\n }\r\n String res = gson.toJson(airline);\r\n return res;\r\n }" ]
[ "0.581421", "0.5311068", "0.5293046", "0.52745426", "0.51544774", "0.5151782", "0.514538", "0.5046631", "0.50244635", "0.49809986", "0.49770015", "0.49507907", "0.49412864", "0.49093866", "0.48898318", "0.48855022", "0.48539442", "0.4849933", "0.4830823", "0.48269215", "0.48193818", "0.4801769", "0.47905374", "0.47431296", "0.47407147", "0.47181374", "0.4685586", "0.46819162", "0.46711272", "0.46617526", "0.4658097", "0.46318337", "0.46264806", "0.46171418", "0.45973054", "0.45948902", "0.4594638", "0.45896617", "0.45551324", "0.45418465", "0.45377746", "0.45209286", "0.45148474", "0.45078063", "0.44987312", "0.4493843", "0.44923022", "0.4489403", "0.44865778", "0.44780007", "0.44735745", "0.44658142", "0.44620374", "0.4459696", "0.44544032", "0.44534308", "0.44489458", "0.44487166", "0.44390783", "0.44327065", "0.4432313", "0.44310188", "0.4428281", "0.44274235", "0.4426384", "0.4423991", "0.4421428", "0.44190285", "0.44168815", "0.441531", "0.44114518", "0.44107687", "0.44104612", "0.44085205", "0.44076625", "0.44069567", "0.4406374", "0.44014373", "0.43989658", "0.4394755", "0.43937373", "0.43919802", "0.43895924", "0.43831888", "0.43802723", "0.43784818", "0.43778044", "0.43777153", "0.43768868", "0.43742612", "0.43734568", "0.4372934", "0.43725577", "0.43696368", "0.4365595", "0.43606955", "0.43575943", "0.43530008", "0.43475604", "0.43474463" ]
0.45329034
41
Returns calorie data from a specific date.
public double getElevationData(String date){ JSONArray array = new JSONArray(elevHistory); for(int i = 0; i<array.length();i++){ JSONObject json = array.getJSONObject(i); if(json.get("dateTime").equals(date)) return Double.parseDouble(json.get("value").toString()); } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Date getForDate();", "public Calendar calendario(Date date) {\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.setTime(date);\r\n return calendar;\r\n }", "Date getDataIns();", "public List<Serie> getCaloriesByDate(){\r\n\t\t\r\n\t\treturn daoEjercicio.getCaloriesByDate();\r\n\t\t\r\n\t}", "public Calendar forDate(Date date) {\r\n\r\n\t\tCalendar c2 = Calendar.getInstance(baseCalendar.getTimeZone());\r\n\t\tc2.setTime(date);\r\n\r\n\t\treturn c2;\t\t\r\n\t}", "@Override\n\tpublic Calendar getDate(){\n\t\treturn date;\n\t}", "public Calendar getDate(){\n return date;\n }", "public String retornaData(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn df.format(calendar.getTime());\n\t}", "public Calendar getDate()\n {\n return date;\n }", "@Override\n\tpublic List<DailyData> getFoodData(String username, String date) {\n\t\treturn mobileDao.getFoodData(username,date);\n\t}", "public static Date getData(Date data) {\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\r\n\t\tcalendar.setTime(data);\r\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\r\n\t\tcalendar.set(Calendar.MINUTE, 0);\r\n\t\tcalendar.set(Calendar.SECOND, 0);\r\n\t\tcalendar.set(Calendar.MILLISECOND, 0);\r\n\r\n\t\treturn calendar.getTime();\r\n\t}", "public StockDate GetCalendar()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public void getData() {\n\t\tcurrentDate = model.getCurrentDate();\n\t\tLocalDate firstDateOfMonth = LocalDate.of(currentDate.getYear(), currentDate.getMonthValue(), 1);\n\t\tevents = EventProcessor.filterEvents(model.getEvents(), firstDateOfMonth, firstDateOfMonth.plusMonths(1).minusDays(1));\n\t}", "public DaySummary getSummaryForDay(String date){\n String[] values = date.split(\"-\");\n int day = Integer.parseInt(values[0]);\n int month = Integer.parseInt(values[1]);\n int year = Integer.parseInt(values[2]);\n\n LocalDateTime localDateTime1 = LocalDateTime.of(year,month,day,0,0);\n LocalDateTime localDateTime2 = LocalDateTime.of(year,month,day+1,0,0);\n\n Date date1 = Date.from( localDateTime1.atZone( ZoneId.systemDefault()).toInstant());\n Date date2 = Date.from( localDateTime2.atZone( ZoneId.systemDefault()).toInstant());\n return daySummaryRepository.findAllBySummaryDateBetween(date1, date2).get(0);\n }", "public Calendar getDate() {\n\treturn date;\n }", "public static Calendar getCalender(Date date) {\n\n Calendar calendar = Calendar.getInstance();\n\n if (date != null) {\n long millis = date.getTime();\n calendar.setTimeInMillis(millis);\n }\n\n return calendar;\n }", "@Override\n @Cacheable(value=AccountingPeriod.CACHE_NAME, key=\"'date='+#p0\")\n public AccountingPeriod getByDate(Date date) {\n Map<String,Object> primaryKeys = new HashMap<String, Object>();\n primaryKeys.put(OLEPropertyConstants.UNIVERSITY_DATE, date);\n UniversityDate universityDate = businessObjectService.findByPrimaryKey(UniversityDate.class, primaryKeys);\n primaryKeys.clear();\n primaryKeys.put(OLEPropertyConstants.UNIVERSITY_FISCAL_YEAR, universityDate.getUniversityFiscalYear());\n primaryKeys.put(OLEPropertyConstants.UNIVERSITY_FISCAL_PERIOD_CODE, universityDate.getUniversityFiscalAccountingPeriod());\n return businessObjectService.findByPrimaryKey(AccountingPeriod.class, primaryKeys);\n }", "public void readDayData() {\n\t\tlogger.info(\"Reading data for date: \" + date);\n\t}", "public static Calendar dateToCalendar(Date date){ \r\n Calendar cal = Calendar.getInstance();\r\n cal.setTime(date);\r\n return cal;\r\n }", "abstract public Date getServiceAppointment();", "public String getDataMain(){\n\n calendar = Calendar.getInstance();\n thisYear = calendar.get(Calendar.YEAR);\n Log.d(TAG, \"# thisYear : \" + thisYear);\n\n thisMonth = calendar.get(Calendar.MONTH);\n Log.d(TAG, \"@ thisMonth : \" + thisMonth);\n\n thisDay = calendar.get(Calendar.DAY_OF_MONTH);\n Log.d(TAG, \"$ thisDay : \" + thisDay);\n\n mese = monthIntToString(thisMonth);\n\n /*\n switch (thisMonth){\n case 0:\n mese = \"Gennaio\";\n break;\n case 1:\n mese = \"Febbraio\";\n break;\n case 2:\n mese = \"Marzo\";\n break;\n case 3:\n mese = \"Aprile\";\n break;\n case 4:\n mese = \"Maggio\";\n break;\n case 5:\n mese = \"Giugno\";\n break;\n case 6:\n mese = \"Luglio\";\n break;\n case 7:\n mese = \"Agosto\";\n break;\n case 8:\n mese = \"Settembre\";\n break;\n case 9:\n mese = \"Ottobre\";\n break;\n case 10:\n mese = \"Novembre\";\n break;\n case 11:\n mese = \"Dicembre\";\n break;\n }\n */\n return mese;\n }", "public void get_fecha(){\n //Obtenemos la fecha\n Calendar c1 = Calendar.getInstance();\n fecha.setCalendar(c1);\n }", "public static Calendar extractDate(int date){\n Calendar c = Calendar.getInstance();\n String d = date+\"\";\n int year = Integer.parseInt(d.substring(0, 4));\n int month = Integer.parseInt(d.substring(4, 6))-1;\n int day = Integer.parseInt(d.substring(6, 8));\n c.set(year, month, day);\n return c;\n }", "@Override\r\n\tpublic CinemaCondition getByDate(Date date) {\n\t\tString hql = \"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\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<CinemaCondition> cinemaConditions = query.list();\r\n\t\tif(cinemaConditions!=null&&!cinemaConditions.isEmpty()){\r\n\t\t\treturn cinemaConditions.get(0);\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public ArrayList<PomoDaily> getDaily(String userId) {\r\n PomoServer server = new PomoServer();\r\n String parameters = PomoServer.MODE_SELECT + \"&\" + \"userid=\" + userId;\r\n String url = PomoServer.DOMAIN_URL + PomoServer.SERVLET_DAILY;\r\n String data = server.get(url, parameters);\r\n ArrayList<PomoDaily> list = new ArrayList<>();\r\n if (data.equals(\"0\")) {\r\n return list;\r\n }\r\n String[] dailies = data.split(\";\");\r\n for (String d : dailies) {\r\n String[] attributes = d.split(\"&\");\r\n String id = attributes[0];\r\n String date = attributes[1];\r\n int plan = Integer.parseInt(attributes[2]);\r\n list.add(new PomoDaily(id, date, plan, userId));\r\n }\r\n return list;\r\n }", "public static Calendar getCalendar(Date date) {\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tif (date != null) {\r\n\t\t\tcal.setTime(date);\r\n\t\t} else {\r\n\t\t\tcal.setTime(new Date());\r\n\t\t}\r\n\t\treturn cal;\r\n\t}", "public Calendar getDate() {\r\n\t\treturn date;\r\n\t}", "public Date getDate(){\n\t\treturn day.date;\n\t}", "public java.util.Calendar getDate() {\n return date;\n }", "public java.util.Calendar getDate() {\n return date;\n }", "HashMap<String, Double> getPortfolioData(String date);", "@GET\n @Path(\"/{nom}/{date}\")\n @Produces(MediaType.APPLICATION_JSON)\n public EvenementDto getNomDate(@PathParam(\"nom\") String nom, @PathParam(\"date\") String date) {\n DataAccess dataAccess = DataAccess.begin();\n List<EvenementEntity> li = dataAccess.getEventByDate(date);\n dataAccess.closeConnection(true);\n return li.stream().filter(e -> e.getNom().equals(nom)).map(EvenementEntity::convertToDto).collect(Collectors.toList()).get(0);\n }", "private Calendar convertDateToCalendar(Date date) {\n Calendar calendar = GregorianCalendar.getInstance();\n calendar.setTime(date);\n return calendar;\n }", "public ReactorResult<java.util.Calendar> getAllDate_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), DATE, java.util.Calendar.class);\r\n\t}", "public Calendar getDate() {\n\t\treturn date;\n\t}", "Date getDate();", "Date getDate();", "Date getDate();", "public Date getdate() {\n\t\treturn new Date(date.getTime());\n\t}", "public static Calendar getCalendar(Date date) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n return cal;\n }", "public CustomDate getDate() {\n return new CustomDate(date.getTime());\n }", "java.lang.String getFromDate();", "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 }", "@Override\n public Date getDate() {\n return date;\n }", "public GainDTO getgainday(String date) {\n\t\tString days = date.substring(2,4) +\"/\"+ date.substring(5,7)+\"/\"+date.substring(8);\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tString sql = \"select Atype, Btype, Ctype, Dtype, Etype, (Atype *100000+Btype*200000+Ctype*300000+Dtype*400000+Etype*500000) as sum from (select count(case when sp.type = 'a상품' then 1 end) as Atype, count(case when sp.type = 'b상품' then 1 end) as Btype, count(case when sp.type = 'c상품' then 1 end) as Ctype, count(case when sp.type = 'd상품' then 1 end) as Dtype, count(case when sp.type = 'e상품' then 1 end) as Etype from tblServiceproduct sp inner join tblPayment pm on sp.serviceProductSeq = pm.serviceProductSeq where to_char(pm.paydate,'yy/mm/dd') = ?)\";\n\t\t\t\n\t\t\tpstat = conn.prepareStatement(sql);\n\t\t\tpstat.setString(1, days);\n\t\t\t\n\t\t\trs = pstat.executeQuery();\n\t\t\t\n\t\t\t\n\t\t\n\t\t\t\n\t\t\tGainDTO dto = new GainDTO();\n\n\t\t\tif(rs.next()) {\n\t\t\t\n\t\t\t\tdto.setA(rs.getString(\"Atype\"));\n\t\t\t\tdto.setB(rs.getString(\"Btype\"));\n\t\t\t\tdto.setC(rs.getString(\"Ctype\"));\n\t\t\t\tdto.setD(rs.getString(\"Dtype\"));\n\t\t\t\tdto.setE(rs.getString(\"Etype\"));\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn dto;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn null;\n\t}", "public Data() {\n\t\tCalendar now = new GregorianCalendar();\n\t\tthis.anno = now.get(Calendar.YEAR);\n\t\tthis.giorno = now.get(Calendar.DAY_OF_MONTH);\n\t\tthis.mese = Data.MESI[now.get(Calendar.MONTH)];\n\t}", "Date getInvoicedDate();", "private Date getDataInizio() {\n return (Date)this.getCampo(DialogoStatistiche.nomeDataIni).getValore();\n }", "public Calendar getDate() {\n\n\t\treturn _date;\n\t}", "public Date getDate(){\n\t\treturn date;\n\t}", "private void getDate() {\t// use the date service to get the date\r\n String currentDateTimeText = theDateService.getDateAndTime();\r\n this.send(currentDateTimeText);\r\n }", "public Date getDateObject(){\n \n Date date = new Date(this.getAnio(), this.getMes(), this.getDia());\n return date;\n }", "@HippoEssentialsGenerated(internalName = \"katharsisexampleshippo:date\")\n public Calendar getDate() {\n return getProperty(DATE);\n }", "public void getDateEvents(Connection connection, StoreData data){\n\t\t//The following code is used to prepare a sql statement to get all the events\n\t\tdata.resetSingle();\n\t\tPreparedStatement preStmt=null;\n\t\tString stmt = \"SELECT * FROM Event\";\n\t\t//prepares the date given to this method to be used to get the correct events \n\t\tString passedDate = data.getDate();\n\t\tSimpleDateFormat displayDate = new SimpleDateFormat(\"MM-dd-yyyy\");\n\t\tSimpleDateFormat dbDate = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tSimpleDateFormat theDay = new SimpleDateFormat(\"dd\");\n\t\tSimpleDateFormat month = new SimpleDateFormat(\"MM\");\n\t\tSimpleDateFormat year = new SimpleDateFormat(\"yyyy\");\n\t\tString formatSDate = null;\n\t\tString formatEDate = null;\n\t\tString sMonth = null;\n\t\tString eMonth = null;\n\t\tString sDay = null;\n\t\tString eDay = null;\n\t\tString curDay = null;\n\t\tString curMonth = null;\n\t\tint startD = 0;\n\t\tint endD = 0;\n\t\tint curD = 0;\n\t\tint startM = 0;\n\t\tint curM = 0;\n\t\tint endM = 0;\n\t\t\n\t\t//This try catch block is used to get the events that are returned based on\n\t\t//the dates that the event has\n\t\ttry{\n\t\t\tpreStmt = (PreparedStatement) connection.prepareStatement(stmt);\n\t\t\tResultSet rs = preStmt.executeQuery();\n\t\t\tStoreData newDay;\n\t\t\t//loops through all of the events storing the ones that have the matching dates\n\t\t\twhile(rs.next()){\n\t\t\t\tnewDay = new StoreData();\n\t\t\t\tString name = rs.getString(\"Name\");\n\t\t\t\tString description = rs.getString(\"Description\");\n\t\t\t\tString location = rs.getString(\"Location\");\n\t\t\t\tString date = rs.getString(\"Start_Date\");\n\t\t\t\tString endDate = rs.getString(\"End_Date\");\n\t\t\t\t//This try catch formats the dates to be used to check to see if they are correct\n\t\t\t\ttry {\n\n\t\t\t\t\tformatSDate = displayDate.format(dbDate.parse(date));\n\t\t\t\t\tformatEDate = displayDate.format(dbDate.parse(endDate));\n\t\t\t\t\tsDay = theDay.format(dbDate.parse(date));\n\t\t\t\t\teDay = theDay.format(dbDate.parse(endDate));\n\t\t\t\t\tcurDay = theDay.format(displayDate.parse(passedDate));\n\t\t\t\t\tsMonth = month.format(dbDate.parse(date));\n\t\t\t\t\teMonth = month.format(dbDate.parse(endDate));\n\t\t\t\t\tcurMonth = month.format(displayDate.parse(passedDate));\n\t\t\t\t\tstartD = Integer.parseInt(sDay);\n\t\t\t\t\tendD = Integer.parseInt(eDay);\n\t\t\t\t\tcurD = Integer.parseInt(curDay);\n\t\t\t\t\tstartM = Integer.parseInt(sMonth);\n\t\t\t\t\tcurM = Integer.parseInt(curMonth);\n\t\t\t\t\tendM = Integer.parseInt(eMonth);\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tString sTime = rs.getString(\"Start_Time\");\n\t\t\t\tString eTime = rs.getString(\"End_Time\");\n\t\t\t\tnewDay.setName(name);\n\t\t\t\tnewDay.setDescription(description);\n\t\t\t\tnewDay.setLocation(location);\n\t\t\t\tnewDay.setDate(date);\n\t\t\t\tnewDay.setEndDate(endDate);\n\t\t\t\tnewDay.setSTime(sTime);\n\t\t\t\tnewDay.setETime(eTime);\n\t\t\t\t//stores the events that match the date that was given\n\t\t\t\tif(curD >= startD && curD <= endD && curM == startM){\n\t\t\t\t\tdata.addDayEvent(newDay);\n\t\t\t\t}else if(startM < curM && curM == endM && curD <= endD){\n\t\t\t\t\tdata.addDayEvent(newDay);\n\t\t\t\t}else if(curD < startD || curD > endD){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Man you got problems now\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Date getDate()\n {\n return date;\n }", "public ArrayList<String> getVacationDay(GregorianCalendar date) throws IOException {\r\n\t\tArrayList<String> vacation = new ArrayList<String>();\r\n\t\tif (calendar.existsVacationDay(date)) {\r\n\t\t\t// getting shifts\r\n\t\t\tArrayList<Turno> shifts = calendar.getShiftsOfADay(date);\r\n\t\t\tfor (Turno t : shifts) {\r\n\t\t\t\t// adding number of doctors\r\n\t\t\t\tvacation.add(Integer.toString(t.getNumberOfDoctors()));\r\n\t\t\t}\r\n\t\t\t// adding special date\r\n\t\t\tvacation.add(shifts.get(0).getSpecialDate());\r\n\t\t\treturn vacation;\r\n\t\t}\r\n\t\telse throw new IOException(\"La fecha no corresponde a ningun dia vacacional \");\t\r\n\t}", "public DateInfo getDate() {\r\n\t\treturn new DateInfo(super.getDate());\r\n\t\t//return new DateInfo(maturityDate);\r\n\t}", "public GregorianCalendar getDate() { return date; }", "public DailyReport genDailyReport(GregorianCalendar date) \n\t\t\tthrows SQLException, ClassNotFoundException, IOException\n\t{\n\t\tif(this.conn == null)\n\t\t\tthis.conn = JDBCConnection.getConnection();\n\n\t\tString sql = \"SELECT I.upc, \\n\" +\n\t\t\t\t \t \" I.category, \\n\" +\n\t\t\t\t \t \" I.price, \\n\" +\n\t\t\t\t \t \" PI.quantity, \\n\" +\n\t\t\t\t \t \" I.price * PI.quantity \\n\" +\n\t\t\t\t \t \"FROM Purchase P, PurchaseItem PI, Item I \\n\" +\n\t\t\t\t \t \"WHERE P.receiptId = PI.receiptId AND \\n\" +\n\t\t\t\t \t \" PI.upc = I.upc AND \\n\" +\n\t\t\t\t \t \" P.pDate = ? \\n\" +\n\t\t\t\t \t \"ORDER BY I.category \\n\";\n\t\tPreparedStatement stmt = conn.prepareStatement(sql);\n\t\tDate temp = new Date(date.get(Calendar.YEAR) - 1900, \n\t\t\t\t\t\t\t date.get(Calendar.MONTH) - 1, \n\t\t\t\t\t\t\t date.get(Calendar.DAY_OF_MONTH));\n\t\tstmt.setDate(1, temp);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tResultSet result = stmt.executeQuery();\n\t\t\tArrayList<Triple<String, ArrayList<ReportItem>, Double>>\n\t\t\t\ttuples = new ArrayList<Triple<String, ArrayList<ReportItem>, Double>>();\n\n\t\t\tif(!result.next())\n\t\t\t//if empty resultset, return empty report\n\t\t\t\treturn new DailyReport(tuples);\n\t\t\t\n\t\t\t//3 Passes:\n\t\t\t//1st: Store everything on the list\n\t\t\tArrayList<ReportItem> raw_list = new ArrayList<ReportItem>();\n\t\t\tdo\n\t\t\t{\n\t\t\t\tString upc = result.getString(1);\n\t\t\t\tString cat = result.getString(2);\n\t\t\t\tdouble price_$ = result.getDouble(3);\n\t\t\t\tint qty_sold = result.getInt(4);\n\t\t\t\tdouble total_$ = result.getDouble(5);\n\n\t\t\t\tReportItem item = new ReportItem(upc, cat, price_$, qty_sold, total_$);\n\t\t\t\traw_list.add(item);\t\n\t\t\t}while(result.next());\n\t\t\t\n\t\t\t//2nd: combine any duplicate item\n\t\t\tArrayList<ReportItem> lst_no_dup = new ArrayList<ReportItem>();\n\t\t\tfor(int row = 0; row < raw_list.size(); row++)\n\t\t\t{\n\t\t\t\tString current_upc = raw_list.get(row).getUPC();\n\t\t\t\tint unit_sold = raw_list.get(row).getUnits();\n\t\t\t\tdouble item_total = raw_list.get(row).getTotalSale();\n\t\t\t\tfor(int fol_row = row + 1; \n\t\t\t\t\tfol_row < raw_list.size() && \n\t\t\t\t\t\t\traw_list.get(fol_row).getUPC().equals(current_upc); \n\t\t\t\t\tfol_row++)\n\t\t\t\t{\n\t\t\t\t\tunit_sold += raw_list.get(fol_row).getUnits();\n\t\t\t\t\titem_total += raw_list.get(fol_row).getTotalSale();\n\t\t\t\t\trow = fol_row;\n\t\t\t\t}\n\t\t\t\tReportItem itm = new ReportItem(raw_list.get(row).getUPC(),\n\t\t\t\t\t\t\t\t\t\t\t\traw_list.get(row).getCategory(),\n\t\t\t\t\t\t\t\t\t\t\t\traw_list.get(row).getUnitPrices(),\n\t\t\t\t\t\t\t\t\t\t\t\tunit_sold, item_total);\n\t\t\t\tlst_no_dup.add(itm);\n\t\t\t}\n\t\t\t\n\t\t\t//3rd: accounting for each category\n\t\t\tfor(int row = 0; row < lst_no_dup.size(); row++)\n\t\t\t{\n\t\t\t\tString current_cat = lst_no_dup.get(row).getCategory();\n\t\t\t\tdouble cat_total = lst_no_dup.get(row).getTotalSale();\n\t\t\t\tint start_ind = row;\n\t\t\t\tint end_ind = row;\n\t\t\t\tfor(int fol_row = row + 1; \n\t\t\t\t\tfol_row < lst_no_dup.size() && \n\t\t\t\t\tlst_no_dup.get(fol_row).getCategory().equals(current_cat);\n\t\t\t\t\tfol_row++)\n\t\t\t\t{\n\t\t\t\t\tcat_total += lst_no_dup.get(fol_row).getTotalSale();\n\t\t\t\t\trow = fol_row;\n\t\t\t\t\tend_ind++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//make a sublist:\n\t\t\t\tArrayList<ReportItem> sublist = new ArrayList<ReportItem>();\n\t\t\t\tfor(int col = start_ind; col <= end_ind; col++)\n\t\t\t\t\tsublist.add(lst_no_dup.get(col));\n\t\t\t\t\n\t\t\t\tTriple<String, ArrayList<ReportItem>, Double>\n\t\t\t\ta_tuple = new Triple<String, ArrayList<ReportItem>, Double>\n\t\t\t\t\t\t\t\t(current_cat, sublist, new Double(cat_total));\n\t\t\t\ttuples.add(a_tuple);\n\t\t\t}\n\t\t\t\n\t\t\treturn new DailyReport(tuples);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tstmt.close();\n\t\t}\n\t}", "public void setDate(Calendar date)\n {\n this.date = date;\n }", "@WebMethod\t\r\n\tpublic Vector<Event> getEvents(Date date) {\r\n\t\tDataAccess dbManager=new DataAccess();\r\n\t\tVector<Event> events=dbManager.getEvents(date);\r\n\t\tdbManager.close();\r\n\t\treturn events;\r\n\t}", "public static void main(String[] args) {\n\t\tDate data = new Date();\n\t\tSystem.out.println(1900 + data.getYear());\n\t\t\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSystem.out.println(cal);\n\t\t\n\t\tDate data2 = cal.getTime();\n\t\tSystem.out.println(\"data 2 - \" +data2);\n\t\t\n\t\t//cal.add(Calendar.DAY_OF_MONTH, 1);//acrescenta +1 dia\n\t\t\n\t\t//verificar roll(Calendar.DAY_MONTH, -10)\n\t\t\n\t\tdata2 = cal.getTime();\n\t\tSystem.out.println(\"data 2 - \" +data2);\n\t\t\n\t\tSimpleDateFormat formatador = new SimpleDateFormat(\n\t\t\t\t\"'manaus 'EEEE dd 'de' MMMM 'de' yyyy \");\n\t\tSystem.out.println(formatador.format(cal.getTime()));\n\t\t\n\t\t\n\t\tString dataDigitada = \"17/02/2015\";\n\t\t\n\t\tSimpleDateFormat parser = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\ttry {\n\t\t\tCalendar cal2 = Calendar.getInstance();\n\t\t\tcal2.setTime(parser.parse(dataDigitada));\n\t\t\tSystem.out.println(\"data formatada: \" + formatador.format(cal2.getTime()));\n\t\t} catch (ParseException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public MainList getDetailForcast(String date) {\n\t\t\t\n\t\t\tMainList mainLists = new MainList();\n\t\t\tList<Forcast> forcasts = new ArrayList<>();\n\t\t\tList<Forcast> forcastLists = this.mainList.getListItem();\n\t\t\t\n\t\t\tSystem.out.println(\"date>> \"+date);\n\t\t\t\n\t\t\tforcasts = forcastLists.stream().filter(p -> (formatData(p.getDt_txt())).equals(formatData(date))).collect(Collectors.toList());\n\t\t\t\n\t\t\tmainLists.setListItem(forcasts);\n\t\t\tmainLists.setCity(this.mainList.getCity());\n\t\t\t\n\t\t\treturn mainLists;\n\t\t}", "public Date getDate() {\r\n return date;\r\n }", "public Date getDate() {\r\n return date;\r\n }", "public Date getDate() {\r\n return date;\r\n }", "public ArrayList<Event> getAllEventsFromDate(Calendar date)\r\n\t{\r\n\t\tArrayList<Event> eventsList = new ArrayList<Event>();\r\n\t\t\r\n\t\tfor(Event event : this.getAllEvents() )\r\n\t\t{\t\t\t\r\n\t\t\tif (event.getCalendar().get(Calendar.YEAR) == date.get(Calendar.YEAR) && \r\n\t\t\t\tevent.getCalendar().get(Calendar.MONTH)\t== date.get(Calendar.MONTH) && \r\n\t\t\t\tevent.getCalendar().get(Calendar.DATE) == date.get(Calendar.DATE))\r\n\t\t\t{\r\n\t\t\t\teventsList.add(event);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\treturn eventsList;\r\n\t}", "public Date getDataConsegna() {\n\t\t\treturn dataConsegna;\n\t\t}", "public Date getDate() {\n return date;\n }", "public int getDate(){\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public List<Service> getServiceFromDateNPlate(String date,String plate){\n \n List<Service> lista = new ArrayList<>(); \n \n try {\n stmt = conn.createStatement();\n rs = stmt.executeQuery(\"SELECT QNT,DESC,PRICE FROM \" + plate + \" WHERE DATA = '\" + date + \"';\" );\n \n while(rs.next()){\n lista.add(new Service( rs.getDouble(\"QNT\"), rs.getString(\"DESC\"), rs.getDouble(\"PRICE\") ) ); \n }\n \n stmt.close();\n rs.close();\n } catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n return lista;\n }", "private Date getDataFine() {\n return (Date)this.getCampo(DialogoStatistiche.nomeDataFine).getValore();\n }", "public final synchronized Date getDate(int parameterIndex, Calendar cal) \n throws SQLException\n {\n return getCallableStatement().getDate(parameterIndex, cal);\n }", "public List<NewsBaseInfo> getNewsListByDate(Date date) throws DataAccessException {\n return null;\n }", "public void setDate(Calendar date) {\n\tthis.date = date;\n }", "public void setDate(java.util.Calendar date) {\n this.date = date;\n }", "public void setDate(java.util.Calendar date) {\n this.date = date;\n }", "java.lang.String getFoundingDate();", "public static Calendar dateToCalendar(Date date) {\r\n Calendar cal = Calendar.getInstance();\r\n cal.clear();\r\n cal.setTimeInMillis(date.getTime());\r\n return cal;\r\n }", "public StoredDay(LocalDate date) {\n this.date = date;\n this.recipes = new StoredRecipe[0];\n }", "@Override\n public Date getDate(Calendar cal) throws SQLException {\n if (isNull()) return null;\n return getDatatypeCoder().decodeDate(getDate(), cal);\n }", "public Date getDataCreazione() {\n\t\treturn dataCreazione;\n\t}", "public int getDate() {\n return date ;\n }", "public Date getDate() {\n\t\n\t\treturn date;\n\t\n\t}", "public ArrayList<ArrayList<Double>> getReportsFromServer(LocalDate date)\n {\n\t //Go to DB and ask for reports of a specific date\n\t return null;\n }", "public Date getDate()\n\t{\n\t\treturn date;\n\t}", "public Date getDate()\n {\n return this.date;\n }" ]
[ "0.6762252", "0.6728341", "0.6576603", "0.651115", "0.63389987", "0.6321007", "0.6279307", "0.62514347", "0.6212287", "0.6201274", "0.61575073", "0.6155857", "0.6143856", "0.6124674", "0.6104081", "0.6089662", "0.6048322", "0.6009964", "0.5990576", "0.5967053", "0.59588397", "0.59467745", "0.5932891", "0.5926889", "0.5889173", "0.5882969", "0.58762884", "0.5860487", "0.5859164", "0.5859164", "0.5858868", "0.5853491", "0.58529586", "0.58350235", "0.5827367", "0.58169574", "0.58169574", "0.58169574", "0.581153", "0.5806326", "0.5790891", "0.578723", "0.57862073", "0.5765674", "0.57471013", "0.5741533", "0.57296956", "0.57283944", "0.5728264", "0.57263345", "0.5725507", "0.5713641", "0.5701642", "0.5688086", "0.5684435", "0.5679711", "0.5676606", "0.5672212", "0.5667226", "0.56575245", "0.56536543", "0.56392854", "0.5638249", "0.5626737", "0.5626737", "0.5626737", "0.5625508", "0.56244767", "0.56025875", "0.55952275", "0.55894434", "0.55894434", "0.55894434", "0.55894434", "0.55894434", "0.55894434", "0.55894434", "0.55894434", "0.55894434", "0.55894434", "0.55894434", "0.55894434", "0.55894434", "0.55894434", "0.5587861", "0.5586968", "0.5574836", "0.5567717", "0.5566522", "0.556585", "0.556585", "0.5561116", "0.5557669", "0.5554639", "0.5553218", "0.55486745", "0.5540467", "0.5535374", "0.5534743", "0.5533944", "0.55300885" ]
0.0
-1
Creates new form stock_view
public transact() { initComponents(); //String type=jComboBox1.getSelectedItem().toString(); //JOptionPane.showMessageDialog(null,type); try{ javaconnect connect=new javaconnect(); Connection conn=javaconnect.getConnection(); //Connection conn=null; ResultSet rs=null; Statement stmt=null; PreparedStatement pst=null; String sql6="select `id` as 'id',name as 'Name',detail as 'Description',quantity as 'Quantity',supplier as 'Supplier',price as 'Cost (Ksh)' from product"; pst=conn.prepareStatement(sql6); rs=pst.executeQuery(); //JOptionPane.showMessageDialog(null,rs.getString("Quantity")); jTable1.setModel(DbUtils.resultSetToTableModel(rs)); String sql2="select * from cart"; pst=conn.prepareStatement(sql2); rs=pst.executeQuery(); cart.setModel(DbUtils.resultSetToTableModel(rs)); TableColumnModel tcm=jTable1.getColumnModel(); tcm.removeColumn(tcm.getColumn(0)); TableColumnModel tcm1=cart.getColumnModel(); tcm1.removeColumn(tcm1.getColumn(0)); ResultSet rs2=null; PreparedStatement pst2=null; String sql4="select SUM(total_cost) from cart"; pst2=conn.prepareStatement(sql4); rs2=pst2.executeQuery(); while (rs2.next()) { int std = rs2.getInt(1); total_l.setText(String.valueOf(std)); } DateFormat dtf=new SimpleDateFormat("yyyy-MM-dd"); // Date date=new Date(); Date date=new Date(); dtf.format(date); sell_date.setDate(date); String sql_ps="select id,name,detail,quantity,total_cost,profit,date_sold,sold_by from sells where date_sold like '%"+dtf.format(date)+"%' order by date_sold desc"; pst=conn.prepareStatement(sql_ps); rs=pst.executeQuery(); t_sold.setModel(DbUtils.resultSetToTableModel(rs)); TableColumnModel tcm2=t_sold.getColumnModel(); tcm2.removeColumn(tcm2.getColumn(0)); } catch(Exception e){ JOptionPane.showMessageDialog(null,e); } //DateFormat dtf=new SimpleDateFormat("yyyy/MM/dd"); //Date date=new Date(); //dtf.format(date); // JOptionPane.showMessageDialog(null,dtf.format(date)); // sell_date.setDate(dtf.format(date)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IndividualStockDetailsPage() {\n this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n this.add(new JLabel(\"ENTER TICKER SYMBOL\"));\n this.add(ticker);\n this.add(new JLabel(\"ENTER AMOUNT\"));\n this.add(amount);\n this.add(new JLabel(\"ENTER YEAR\"));\n this.add(year);\n this.add(new JLabel(\"ENTER MONTH( Number between 1 - 12)\"));\n this.add(month);\n this.add(new JLabel(\"ENTER DAY( Number between 1 - 7)\"));\n this.add(day);\n this.add(new JLabel(\"ENTER COMMISSION\"));\n this.add(commission);\n buyStockButton.setActionCommand(\"IndividualStockDetailsPage:buyStockButton\");\n this.add(buyStockButton);\n backButton.setActionCommand(\"IndividualStockDetailsPage:backButton\");\n this.add(backButton);\n }", "@ModelAttribute(name = \"stock\")\n public Stock stockBean()\n {\n return new Stock();\n }", "public Stock createStock(Stock stock){\n this.open();\n ContentValues stockEntry = new ContentValues();\n stockEntry.put(SQLiteHelper.COL_ITEM_NAME, stock.getItemName());\n stockEntry.put(SQLiteHelper.COL_ITEM_QUANTITY, stock.getItemQuantity());\n stockEntry.put(SQLiteHelper.COL_ITEM_PRICE, stock.getItemPrice());\n stockEntry.put(SQLiteHelper.COL_CREATED_ON, stock.getCreatedOn());\n stockEntry.put(SQLiteHelper.COL_CREATED_BY, stock.getCreatedBy());\n stockEntry.put(SQLiteHelper.COL_MODIFIED_ON, stock.getModifiedOn());\n stockEntry.put(SQLiteHelper.COL_MODIFIED_BY, stock.getModifiedBy());\n stockEntry.put(SQLiteHelper.COL_OBJECT_ID, stock.getObjectId());\n Log.e(\"Stock object Id\", stock.getObjectId());\n\n long insertId = database.insert(SQLiteHelper.TABLE_STOCK,null, stockEntry);\n\n Cursor cursor = database.query(SQLiteHelper.TABLE_STOCK, allColumns\n , SQLiteHelper.COL_ID + \" =? \"\n , new String[]{String.valueOf(insertId)}\n , null, null, null\n );\n \n cursor.moveToFirst();\n Stock newStock = cursorToStock(cursor); \n cursor.close();\n this.close();\n \n return newStock;\n }", "Stock()\n {\n super();\n }", "protected void addStock(ActionEvent ae) {\n\t\tStockFrm sca=new StockFrm(); \n\t\tsca.setVisible(true);\n\t\tdesktopPane.add(sca);\n\t}", "stockFilePT102.StockDocument.Stock insertNewStock(int i);", "public void addStock(ActionEvent actionEvent) throws IOException {\r\n //Creates the add stock scene and displays it.\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"AddStock.fxml\"));\r\n Parent addStockParent = loader.load();\r\n Scene addStockScene = new Scene(addStockParent);\r\n\r\n //Passes in the controller.\r\n AddStockController addStockController = loader.getController();\r\n addStockController.initData(controller);\r\n\r\n Stage window = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow();\r\n window.hide();\r\n window.setScene(addStockScene);\r\n window.show();\r\n }", "public TbStock() {\r\n\t\tsuper();\r\n\t}", "public StockDetails viewStock() {\n\t\tint availableStock = 0;\n\t\tStockDetails stockDetails = new StockDetails(); \n\t\t \n\t\ttry {\n\t\t\tcon = ConnectionUtil.getConnection();\n\t\t\tString sql = \"select * from stock_details\";\n\t\t\tPreparedStatement pst = con.prepareStatement(sql);\n\t\t\tResultSet rs = pst.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\t stockDetails.setStockAvailability(rs.getInt(\"stock_availability\"));\n\t\t\t\t Date date = rs.getDate(\"inserted_date\");\n\t\t\t\t stockDetails.setStockAddedDate(date.toLocalDate());\n\t \n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\tConnectionUtil.close(con, pst);\n\t\t}\n\t\treturn stockDetails;\n\t}", "stockFilePT102.StockDocument.Stock addNewStock();", "public Stock() {\n }", "public void createNewStock(Stock stock) throws DuplicateEntry, InvalidDateEntry {\n\t\tif (!validateDate(stock.getDate())) {\n\t\t\tlog.error(\"Date entered is a future date for:\" + stock.getStock() + \"date given : \" + stock.getDate());\n\t\t\tthrow new InvalidDateEntry(\n\t\t\t\t\t\"Date entered is a future date for: \" + stock.getStock() + \" date given : \" + stock.getDate());\n\t\t}\n\n\t\tif (checkForDuplicates(new StockId(stock.getStock(), stock.getDate()))) {\n\t\t\tlog.error(\"Duplcate Record for :\" + stock.getStock() + \"on \" + stock.getDate());\n\t\t\tthrow new DuplicateEntry(\"Duplcate Record for : \" + stock.getStock() + \" on \" + stock.getDate());\n\t\t}\n\n\t\tstockRepo.save(stock);\n\n\t}", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "@Override\n public void onClick(View view) {\n String name = getResources().getString(R.string.stock_shopping_list) + \": \" + productList.getName();\n StockShoppingList stockShoppingList = ((Stock)productList).generateShoppingList(name);\n StockShoppingListDao dao = new StockShoppingListDao(getDaoProductList().getBDConnection());\n if(((Stock)productList).getAssociatedListId() != -1) {\n // Si ya tiene una lista de la compra asociada la eliminamos para crear la nueva\n stockShoppingList.setID(((Stock) productList).getAssociatedListId());\n dao.remove(stockShoppingList);\n }\n int shoppingListId = dao.insert(stockShoppingList);\n\n // Actualizamos el id del stock\n ((Stock) productList).setAssociatedListId(shoppingListId);\n getDaoProductList().update((Stock)productList);\n\n // Mostramos un mensaje de exito\n Toast.makeText(getContext(),String.format(getResources().getString(R.string.info_msg_stock_shopping_list_created),name),Toast.LENGTH_LONG).show();\n }", "@Override\n public StockRecyclerViewAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,\n int viewType) {\n // create a new view\n View v = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.item_stock, parent, false);\n // set the view's size, margins, paddings and layout parameters\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }", "@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }", "public ViewStockDetailsJPanel(ArrayList<StockDetails> listStockDetailses, ResourceBundle bundle) {\n initComponents();\n this.bundle = bundle;\n stockDetailsTableModel = (DefaultTableModel) jtbViewStockDetails.getModel();\n addColumnTable();\n this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n for (StockDetails sd : listStockDetailses) {\n stockDetailsTableModel.addRow(new Object[]{\n sd.getStockId(), sd.getStockDetailsId(), sd.getProductCode(), sd.getQuantity()\n });\n }\n setUpUILanguage();\n }", "public void buttonNew(View view) {\n Intent intent = new Intent(this, ProductNewActivity.class);\n startActivity(intent);\n }", "public UpdateStockDetailBean() {\n }", "@PostMapping(\"/addNewTrader\")\r\n\tpublic int createNewPortfolio(@Valid @RequestBody List<Stock> stockPortfolioList){\r\n return stockPortfolioService.addNewTrader(stockPortfolioList);\r\n\t }", "public StockController(final StockService<RetailStock, StockResponse> stockService) {\n super();\n this.stockService = stockService;\n }", "stockFilePT102.StockFileDocument.StockFile addNewStockFile();", "public Builder addStocks(\n int index, com.sbytestream.samples.grpc.stockservice.Stock value) {\n if (stocksBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureStocksIsMutable();\n stocks_.add(index, value);\n onChanged();\n } else {\n stocksBuilder_.addMessage(index, value);\n }\n return this;\n }", "@Override\n public void onClick(View v) {\n NewBucketDialogFragment newBucketDialogFragment = NewBucketDialogFragment.newInstance();\n newBucketDialogFragment.setTargetFragment(BucketListFragment.this, REQ_CODE_NEW_BUCKET);\n newBucketDialogFragment.show(getFragmentManager(), NewBucketDialogFragment.TAG);\n }", "public void addStoreStock(String name, int amount);", "LiveStockDatabase(LiveStock liveStock){\r\n\t\tthis.liveStock = liveStock;\r\n\t}", "@GetMapping(\"/add\")\r\n\tpublic String newSave(Model model) {\r\n\t\tmodel.addAttribute(\"trainee\", new Trainee());\r\n\t\treturn \"add-trainee\";\r\n\t}", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tGUIViewTransactionHistory h = new GUIViewTransactionHistory(true);\n\t\t\t}", "@Override\r\n\tpublic void stockInsert(adminStockVO vo) {\n\t\tadminDAO.stockInsert(vo);\r\n\t}", "@Override\n public void Create() {\n\n initView();\n }", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\r\n\t\t\t\tvenEditarPacks.init(\"NEW\",null);\r\n\t\t\t\tUI.getCurrent().addWindow(venEditarPacks);\r\n\t\t\t\t\r\n\t\t\t}", "@RequestMapping(value = \"create-catalog\", method = RequestMethod.GET)\n public String createCatalogs(HttpSession session, RedirectAttributes attributes, Model model) {\n if (session.getAttribute(\"InfoAdmin\") == null) {\n attributes.addFlashAttribute(\"error\", \"Vui lòng đăng nhập để tiếp tục !!\");\n return \"redirect:login.htm\";\n }\n List<Feedbacks> listFeedback = feedbacksDAO.notifyFeedback();\n int countNotifyFeedback = feedbacksDAO.countNotifyFeedback();\n if (countNotifyFeedback >= 0) {\n model.addAttribute(\"countNotifyFeedback\", countNotifyFeedback);\n }\n List<Orders> listOrder = ordersDAO.notifyOrder();\n int countNotifyOrder = ordersDAO.countNotifyOrder();\n if (countNotifyOrder >= 0) {\n model.addAttribute(\"countNotifyOrder\", countNotifyOrder);\n }\n model.addAttribute(\"listOrder\", listOrder);\n List<Catalogs> catalogses = dao.getAllCatalogsNoParent();\n Catalogs catalogs = new Catalogs();\n model.addAttribute(\"listFeedback\", listFeedback);\n model.addAttribute(\"catalogs\", catalogs);\n model.addAttribute(\"catalogses\", catalogses);\n return \"admin/catalog-insert\";\n }", "@RequestMapping(\"/book/new\")\n public String newBook(Model model){\n model.addAttribute(\"book\", new Book ());\n return \"bookform\";\n }", "public void createItem(View view) {\n \t\n String[] temp = getCurrentItemTypes();\n \n Intent intent = new Intent(this, CreateItem.class);\n intent.putExtra(EDIT, \"no\");\n intent.putExtra(TYPES, temp);\n startActivityForResult(intent, 1);\n }", "public StockExchange()\n {\n stocks = new ArrayList<Stock>();\n }", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\r\n\t\t\t\t\t\tvenObjectsByPack.init(\"NEW\");\r\n\t\t\t\t\t\tUI.getCurrent().addWindow(venObjectsByPack);\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t}", "public New_shipment() {\n initComponents();\n init();\n \n }", "@Override\r\n\tpublic StockResponseModel stockAdded(StockRequestModel stockRequestModel) {\n\t\tStockResponseModel response = new StockResponseModel();\r\n\r\n\t\tboolean isIDExits = CommonUtills.idExistOrNot(stockRequestModel);\r\n\t\tif(!isIDExits)\r\n\t\t{\r\n\t\t\tStockEntities stockEntity = new StockEntities();\r\n\t\t\tstockEntity = CommonUtills.mapConvert(stockRequestModel, stockEntity);\r\n\t\t\t\r\n\t\t\tstockRepository.save(stockEntity);\r\n\t\t\t\tresponse.setResponseCode(HttpStatus.CREATED.toString());\r\n\t\t\t\tresponse.setResponseMsg(HttpStatus.CREATED.getReasonPhrase());\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tresponse.setResponseCode(HttpStatus.CONFLICT.toString());\r\n\t\t\tresponse.setResponseMsg(\"Stock ID Already Exists\");\r\n\t\t}\r\n\t\t\r\n\t\treturn response;\r\n\t}", "public void setStock(int stock) {\n this.stock = stock;\n }", "public void setStock(int stock) {\n this.stock = stock;\n }", "public void setStock(String stock) {\n this.stock = stock;\n }", "public void setStock(String stock) {\n this.stock = stock;\n }", "public void addWarehouseStock(String name, int amount);", "public static AddNewScheduleDialog createInstance(int quantity){\n AddNewScheduleDialog frag = new AddNewScheduleDialog();\n frag.quantity = quantity;\n return frag;\n }", "public StockManager()\n {\n stock = new ArrayList<>();\n }", "private void makeStockMenu() {\r\n\t\tJMenu stockMnu = new JMenu(\"Inventario\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Inventario\")) {\r\n\t\t\tisAccesible = true;\r\n\r\n\t\t\tif (StoreCore.getAccess(\"AgregarInventario\")) {\r\n\t\t\t\tJMenuItem addItem = new JMenuItem(\"Agregar Articulo\");\r\n\t\t\t\taddItem.setMnemonic('a');\r\n\t\t\t\taddItem.setToolTipText(\"Agregar rapidamente un nuevo articulo\");\r\n\t\t\t\taddItem.addActionListener(new ActionListener() {\r\n\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t\tnew AddStockItem(\"\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t\tstockMnu.add(addItem);\r\n\t\t\t}\r\n\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Listar Inventario\",\r\n\t\t\t\t\timageLoader.getImage(\"world.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'v', \"Ver el inventario\",\r\n\t\t\t\t\tKeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), Stock.class);\r\n\t\t\tstockMnu.add(menuItem);\r\n\t\t\tstockMnu.addSeparator();\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Kardex\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Ver Kardex\", \r\n\t\t\t\t\timageLoader.getImage(\"kardexSingle.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'k', \"Ver el kardex\", null,\r\n\t\t\t\t\tKardex.class);\r\n\t\t\tstockMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tstockMnu.setMnemonic('i');\r\n\t\t\tadd(stockMnu);\r\n\t\t}\r\n\t}", "@Kpi(\"ID_KPI_AGENCY_EXPORT_STOCK_CREATE_UNDER_LYING\")\n @Secured(\"@\")\n public void doCreateUnderlyingStock() {\n try {\n //validate ngay nhap phai la dinh dang so, va phai la so nguyen duong\n List<StockTransDetailDTO> lsDetailDTOs = Lists.newArrayList();\n List<StockTransFullDTO> lsStockTransFull = listProductTag.getLsStockTransFull();\n Long totalDepositPrice = 0L;\n for (StockTransFullDTO stockTransFullDTO : lsStockTransFull) {\n StockTransDetailDTO stockTransDetailDTO = new StockTransDetailDTO();\n stockTransDetailDTO.setStockTransDetailId(stockTransFullDTO.getStockTransDetailId());\n stockTransDetailDTO.setProdOfferId(stockTransFullDTO.getProdOfferId());\n stockTransDetailDTO.setStateId(stockTransFullDTO.getStateId());\n stockTransDetailDTO.setQuantity(stockTransFullDTO.getQuantity());\n stockTransDetailDTO.setLstStockTransSerial(stockTransFullDTO.getLstSerial());\n stockTransDetailDTO.setTableName(stockTransFullDTO.getTableName());\n stockTransDetailDTO.setProdOfferTypeId(stockTransFullDTO.getProductOfferTypeId());\n stockTransDetailDTO.setDepositPrice(stockTransFullDTO.getDepositPrice());\n lsDetailDTOs.add(stockTransDetailDTO);\n if (!DataUtil.isNullObject(stockTransFullDTO.getDepositPrice())) {\n totalDepositPrice += stockTransFullDTO.getDepositPrice() * stockTransFullDTO.getQuantity();\n }\n }\n StockTransActionDTO stockTransActionDTO = orderStockTag.getStockTransActionDTO();\n StockTransDTO stockTransDTO = orderStockTag.getStockTransDTO();\n stockTransDTO.setStockTransActionId(getStockTransActionId());\n stockTransDTO.setCreateUserIpAdress(BccsLoginSuccessHandler.getIpAddress());\n stockTransDTO.setDepositPrice(totalDepositPrice);\n stockTransDTO.setProcessOffline(checkOffline ? Const.PROCESS_OFFLINE : \"\");\n stockTransDTO.setShopId(staffDTO.getShopId());\n BaseMessage message = executeStockTransService.executeStockTrans(Const.STOCK_TRANS.EXPORT_AGENT, Const.STOCK_TRANS_TYPE.EXPORT, stockTransDTO, stockTransActionDTO, lsDetailDTOs, requiredRoleMap);\n if (!DataUtil.isNullOrEmpty(message.getErrorCode())) {\n throw new LogicException(message.getErrorCode(), message.getKeyMsg(), message.getParamsMsg());\n }\n doSearchStockTrans();\n canPrint = true;\n reportSuccess(\"frmExportNote:msgExport\", \"export.stock.success\");\n } catch (LogicException ex) {\n logger.error(ex.getMessage(), ex);\n reportError(\"frmExportNote:msgExport\", ex);\n topPage();\n } catch (Exception ex) {\n logger.error(ex.getMessage(), ex);\n reportError(\"frmExportNote:msgExport\", \"common.error.happened\", ex);\n topPage();\n }\n\n }", "@RequestMapping(\"/recipe/new\")\n public String newRecipe(Model model){\n model.addAttribute(\"recipe\", new RecipeCommand());\n \n return \"recipe/recipeForm\";\n }", "@Override\n\tpublic void create(StockDataRecord bo) throws SQLException, BusinessObjectException {\n\t\tthis.addRecord( bo.getPapername().toString(), bo.getDate().toString(), bo.getTime().toString(), Double.toString(bo.getClose()), Double.toString(bo.getVolume()) );\n\t\tbo.get();\n\t\t\n\t}", "public TbStock(Integer stockId, String stockCode, String stockName, String industryCode, String createUser, Date created,\r\n\t\t\tString updateUser, Date updated, Boolean deleted) {\r\n\t\tthis.stockId = stockId;\r\n\t\tthis.stockCode = stockCode;\r\n\t\tthis.stockName = stockName;\r\n\t\tthis.industryCode = industryCode;\r\n\t\tthis.createUser = createUser;\r\n\t\tthis.created = created;\r\n\t\tthis.updateUser = updateUser;\r\n\t\tthis.updated = updated;\r\n\t\tthis.deleted = deleted;\r\n\t}", "@Override\n public void Create() {\n initView();\n initData();\n }", "public void create_new_package(View V) {\n make_request();\r\n progressDialog.show();\r\n }", "public interface StocksView {\n void showStocks(List<Stock> stocksList);\n void showMessage(int message);\n void loading(boolean show);\n}", "@Override\n public void onClick(View view) {\n Fragment newFragment = new QuestFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.container, newFragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }", "@Override\n\tpublic void createItem(Object result) {\n\t\t\n\t\tunloadform();\n\t\tif (result != null) {\n\t\t\tIOTransactionLogic tr = (IOTransactionLogic) result;\n\t\t\tint year = Calendar.getInstance().get(Calendar.YEAR);\n\t\t\tint month = Calendar.getInstance().get(Calendar.MONTH);\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.setTime(tr.getDate());\n\t\t\tint trYear = cal.get(Calendar.YEAR);\n\t\t\tint trMonth = cal.get(Calendar.MONTH);\n\t\t\t\n\t\t\tif ((year == trYear) && (month == trMonth)\n\t\t\t\t\t&& tr.getBankAccountID() == bal.getId()) {\n\t\t\t\ttransactionDisplayer trDisplayer = new transactionDisplayer(tr);\n\t\t\t\tsetDataLineChart();\n\t\t\t\tsetDataPieChart();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public Stock(Stock stock){\n\t\tthis.setSymbol(new String (stock.getSymbol()));\n\t\tthis.setAsk(stock.getAsk());\n\t\tthis.setBid(stock.getBid());\n\t\tthis.date=new Date(stock.getDate().getTime());\n\t\tthis.recommendation=stock.getRecommendation();\n\t\tthis.stockQuantity=stock.getStockQuantity();\n\t}", "@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}", "@Test\n public void createdWithSucessAndReturn201() throws Exception {\n List<Double> quotes = new ArrayList<>();\n StockRequest stockRequest = new StockRequest(\"StockI\", quotes);\n String request = objectMapper.writeValueAsString(stockRequest);\n String response = objectMapper.writeValueAsString(stockRequest);\n URI uri = UriComponentsBuilder.fromUriString(\"/stock\").build().toUri();\n String location = UriComponentsBuilder.fromUriString(\"/stock?name=StockI\").build().toUriString();\n mockMvc.perform(MockMvcRequestBuilders.post(uri)\n .contentType(MediaType.APPLICATION_JSON)\n .content(request))\n .andExpect(MockMvcResultMatchers.status().isCreated())\n .andExpect(MockMvcResultMatchers.content().json(response))\n .andExpect(MockMvcResultMatchers.header().string(\"location\", location));\n }", "@Override\n\tpublic void onCreate(SQLiteDatabase db) {\n db.execSQL(\"CREATE TABLE \" + TABLE_STOCK + \" (\"\n \t+ COLUMN_STOCK_ID + \" INTEGER PRIMARY KEY, \"\n \t+ COLUMN_STOCK_SYMBOL + \" TEXT UNIQUE, \" \n \t+ COLUMN_STOCK_NAME + \" TEXT, \"\n \t+ COLUMN_STOCK_MIN + \" REAL, \"\n \t+ COLUMN_STOCK_MAX + \" REAL, \"\n \t+ COLUMN_STOCK_AVG + \" REAL, \"\n \t+ COLUMN_STOCK_COUNT + \" INTEGER\"\n \t+\");\");\n \t\n // Create the \"price_info\" table\n db.execSQL(\"CREATE TABLE \" + TABLE_PRICE + \" (\" \n \t+ COLUMN_PRICE_ID + \" INTEGER PRIMARY KEY, \"\n \t+ COLUMN_PRICE_PRICE + \" REAL, \"\n \t+ COLUMN_PRICE_SEQUENCE + \" INTEGER, \"\n \t+ COLUMN_PRICE_STOCK_ID + \" INTEGER UNIQUE, FOREIGN KEY(\" + COLUMN_PRICE_STOCK_ID + \") REFERENCES \" + TABLE_STOCK + \"(\" + COLUMN_STOCK_ID + \")\" \n \t+ \");\");\n\t}", "@RequestMapping(value = { \"/newproduct\" }, method = RequestMethod.GET)\r\n\tpublic String newProduct(ModelMap model) {\r\n\t\tProduct product = new Product();\r\n\t\tmodel.addAttribute(\"product\", product);\r\n\t\tmodel.addAttribute(\"productTypes\", productTypeService.findAllProductTypes());\r\n\t\tmodel.addAttribute(\"brands\", brandService.findAllBrands());\r\n\t\tmodel.addAttribute(\"edit\", false);\r\n\t\treturn \"newproduct\";\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Bundle bundle = new Bundle();\n bundle.putString(\"objectID\", objects.get(position).getObjectId());\n bundle.putString(\"name\", objects.get(position).\n getParseObject(\"CentreStockObjectID\").getString(\"Name\"));\n bundle.putInt(\"quantity\", objects.get(position).getInt(\"Quantity\"));\n bundle.putDouble(\"amount\", objects.get(position).getInt(\"Amount\"));\n bundle.putString(\"orderDate\", objects.get(position).\n getDate(\"OrderDate\").toString());\n if (objects.get(position).getDate(\"ReceiveDate\") != null)\n bundle.putString(\"receiveDate\", objects.get(position).\n getDate(\"ReceiveDate\").toString());\n else\n bundle.putString(\"receiveDate\", null);\n\n OrderProfileFragment opf = new OrderProfileFragment();\n opf.setArguments(bundle);\n getFragmentManager().beginTransaction().replace(R.id.container, opf).\n addToBackStack(null).commit();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Bundle bundle = new Bundle();\n bundle.putString(\"objectID\", objects.get(position).getObjectId());\n bundle.putString(\"name\", objects.get(position).\n getParseObject(\"CentreStockObjectID\").getString(\"Name\"));\n bundle.putInt(\"quantity\", objects.get(position).getInt(\"Quantity\"));\n bundle.putDouble(\"amount\", objects.get(position).getInt(\"Amount\"));\n bundle.putString(\"orderDate\", objects.get(position).\n getDate(\"OrderDate\").toString());\n if (objects.get(position).getDate(\"ReceiveDate\") != null)\n bundle.putString(\"receiveDate\", objects.get(position).\n getDate(\"ReceiveDate\").toString());\n else\n bundle.putString(\"receiveDate\", null);\n\n OrderProfileFragment opf = new OrderProfileFragment();\n opf.setArguments(bundle);\n getFragmentManager().beginTransaction().replace(R.id.container, opf).\n addToBackStack(null).commit();\n }", "@Override\n\tpublic void AddOrUpdate(Stock model) {\n\t\tif (model.getId() == 0){\n\t\t\t_stockDao.insert(model);\n\t\t}\n\t\telse {\n\t\t\t_stockDao.updateByPrimaryKey(model);\n\t\t}\n\t}", "@RequestMapping(value = \"/new\", method = RequestMethod.POST)\n public Object newAuctionx(@ModelAttribute @Valid AuctionForm form, BindingResult result) throws SQLException {\n if(result.hasErrors()) {\n StringBuilder message = new StringBuilder();\n for(FieldError error: result.getFieldErrors()) {\n message.append(error.getField()).append(\" - \").append(error.getRejectedValue()).append(\"\\n\");\n }\n ModelAndView modelAndView = (ModelAndView)newAuction();\n modelAndView.addObject(\"message\", message);\n modelAndView.addObject(\"form\", form);\n return modelAndView;\n }\n String username = SecurityContextHolder.getContext().getAuthentication().getName();\n UserAuthentication userAuth = UserAuthentication.select(UserAuthentication.class, \"SELECT * FROM user_authentication WHERE username=#1#\", username);\n AuctionWrapper wrapper = new AuctionWrapper();\n wrapper.setDemandResourceId(form.getDemandedResourceId());\n wrapper.setDemandAmount(form.getDemandedAmount());\n wrapper.setOfferResourceId(form.getOfferedResourceId());\n wrapper.setOfferAmount(form.getOfferedAmount());\n wrapper.setSellerId(userAuth.getPlayerId());\n auctionRestTemplate.post(auctionURL + \"/new\", wrapper, String.class);\n return new RedirectView(\"/player/trading\");\n }", "public void createNewExpense(View view) {\n EditText newExpenseNameInput = (EditText) findViewById(R.id.newExpenseName);\n EditText newDateInput = (EditText) findViewById(R.id.addExpenseDateEditText);\n Spinner newWhoPaidSpinner = (Spinner) findViewById(R.id.addExpensePayerSpinner);\n\n String newExpenseName = newExpenseNameInput.getText().toString();\n Long newAmount = totalDebt;\n Date newDate = null;\n try {\n newDate = new SimpleDateFormat(\"dd/MM/yyyy\").parse(newDateInput.getText().toString());\n } catch (ParseException e) {\n e.printStackTrace();\n }\n String newWhoPaid = newWhoPaidSpinner.getSelectedItem().toString();\n List<String> newPayees = new ArrayList<String>();\n\n int payeeListItemHoldersSize = payeeListItemHolders.size();\n List<Long> newOwedAmounts = new ArrayList<Long>();\n\n for (int i = 0; i < payeeListItemHoldersSize; i++) {\n if (payeeListItemHolders.get(i).getCheckBox().isChecked()) {\n newPayees.add(payeeListItemHolders.get(i).getCheckBox().getText().toString());\n newOwedAmounts.add(payeeListItemHolders.get(i).getDebt());\n }\n }\n\n Expense newExpense = new Expense(newExpenseName, newAmount, newDate, newWhoPaid, newPayees, newOwedAmounts, group);\n\n try {\n newExpense.save();\n } catch (com.parse.ParseException e) {\n e.printStackTrace();\n }\n\n // finish activity\n Intent intent = setUpBackIntent();\n setResult(RESULT_OK, intent);\n finish();\n }", "stockFilePT102.StockHeaderDocument.StockHeader addNewStockHeader();", "@RequestMapping(\"/newRecipe\")\r\n\tpublic ModelAndView newRecipe() {\r\n\t\tModelAndView mav = new ModelAndView();\r\n\r\n\t\tmav.addObject(\"recipe\", new Recipe());\r\n\t\tmav.addObject(\"newFlag\", true);\r\n\t\tmav.setViewName(\"recipe/editRecipe.jsp\");\r\n\r\n\t\treturn mav;\r\n\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getActionCommand() == \"purchaser\") {\r\n ViewPurchaser viewPurchaser = new ViewPurchaser(purchaserDAO, purchaserBLL);\r\n }\r\n if (e.getActionCommand() == \"product\") {\r\n ViewProduct viewProduct = new ViewProduct(productBLL, productDAO, categoryBLL, categoryDAO, supplierBLL, supplierDAO);\r\n }\r\n if (e.getActionCommand() == \"category\") {\r\n ViewCategory viewCategory = new ViewCategory(categoryDAO, categoryBLL);\r\n }\r\n if (e.getActionCommand() == \"reforder\") {\r\n ViewReforder viewReforder = new ViewReforder(reforderDAO, reforderBLL);\r\n }\r\n if (e.getActionCommand() == \"order\") {\r\n ViewOrder viewOrder = new ViewOrder(orderDAO, orderBLL);\r\n }\r\n if (e.getActionCommand() == \"supplier\") {\r\n ViewSupplier viewSupplier = new ViewSupplier(supplierDAO, supplierBLL);\r\n }\r\n if (e.getActionCommand() == \"create\") {\r\n ViewCreateOrder viewCreateOrder=new ViewCreateOrder(purchaserBLL,purchaserDAO,productBLL,productDAO,orderBLL,orderDAO,reforderBLL,reforderDAO);\r\n }\r\n }", "@RequestMapping(\"/new\")\n public String newStudent(ModelMap view) {\n Student student = new Student();\n view.addAttribute(\"student\", student);\n view.addAttribute(\"listurl\", listurl);\n return(\"newstudent\");\n }", "public void add(Stock stock) {\n\t\tif(!isExist(stock.getSymbol())) {\n\t\t\tmItems.add(stock);\t\t\n\t\t\tnotifyDataSetChanged();\n\t\t}\n\t}", "private void addBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addBtnMouseClicked\n\n String id = pidTxt.getText().toString();\n String name = pnameTxt.getText().toString();\n String price = pperpriceTxt.getText().toString();\n String quantity = pquanityTxt.getText().toString();\n String date = pdateTxt.getText().toString();\n\n try {\n String Query = \"INSERT INTO `stock` (`Product_ID`, `Product_Name`,`Quantity`, `Entry_Date`,`Price`) VALUES (?, ?, ?, ?, ?)\";\n\n pstm = con.prepareStatement(Query);\n\n pstm.setInt(1, Integer.parseInt(id));\n pstm.setString(2, name);\n pstm.setInt(3, Integer.parseInt(quantity));\n pstm.setString(4, date);\n pstm.setInt(5, Integer.parseInt(price));\n pstm.executeUpdate();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Data Insertion Failed \");\n }\n refTable();\n\n\n }", "@Before\n public void openNewStockPage() {\n onView(withId(R.id.button3)).perform(click());\n }", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Bundle bundle = new Bundle();\n bundle.putString(\"objectID\", objects.get(position).getObjectId());\n bundle.putString(\"name\", objects.get(position).\n getParseObject(\"CentreStockObjectID\").getString(\"Name\"));\n bundle.putInt(\"quantity\", objects.get(position).getInt(\"Quantity\"));\n bundle.putDouble(\"amount\", objects.get(position).getInt(\"Amount\"));\n bundle.putString(\"orderDate\", objects.get(position).\n getDate(\"OrderDate\").toString());\n if (objects.get(position).getDate(\"ReceiveDate\") != null)\n bundle.putString(\"receiveDate\", objects.get(position).\n getDate(\"ReceiveDate\").toString());\n else\n bundle.putString(\"receiveDate\", null);\n\n OrderProfileFragment opf = new OrderProfileFragment();\n opf.setArguments(bundle);\n getFragmentManager().beginTransaction().replace(R.id.container, opf).\n addToBackStack(null).commit();\n }", "@RequestMapping(\"/cabaretier/toevoegen\")\n public String showNewProductPage(Model model) {\n Cabaretier cabaretier = new Cabaretier();\n model.addAttribute(\"cabaretier\", cabaretier);\n\n return \"CabaretierToevoegen\";\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_stockout, container, false);\n\n initView();\n initListener();\n return view;\n }", "@Override\n public void onClick(View v) {\n\n new DrinkDatabase(getBaseContext()).DrinkaddToCart(new DrinkOrder(\n// new Database(getBaseContext()).addToCart(new Order(\n drinkId,\n currentDrink.getDrinkName(),\n drink_numberButton.getNumber(), //null,//use null to check or to run the program\n currentDrink.getDrinkPrice(),\n currentDrink.getDrinkDiscount()\n\n\n ));\n\n Toast.makeText(DrinkDetail.this, \"Added to chart\", Toast.LENGTH_SHORT).show();\n }", "void chargerTabNewStock(ObservableList <Element> e) {\n \t\tthis.colCode.setCellValueFactory(\n new PropertyValueFactory<Element, String>(\"code\"));\n \t\tthis.colNom.setCellValueFactory(\n new PropertyValueFactory<Element, String>(\"nom\"));\n \t\tthis.colQuantite.setCellValueFactory(\n new PropertyValueFactory<Element, Double>(\"quantite\"));\n \t\tthis.colUnite.setCellValueFactory(\n new PropertyValueFactory<Element, String>(\"unite\"));\n \t\tthis.colPA.setCellValueFactory(\n new PropertyValueFactory<Element, Double>(\"achat\"));\n \t\tthis.colPV.setCellValueFactory(\n new PropertyValueFactory<Element, Double>(\"vente\"));\n \t\tthis.tabNewStock.setItems(e);\n }", "public void setStock(Integer stock) {\n this.stock = stock;\n }", "public com.sbytestream.samples.grpc.stockservice.Stock.Builder addStocksBuilder(\n int index) {\n return getStocksFieldBuilder().addBuilder(\n index, com.sbytestream.samples.grpc.stockservice.Stock.getDefaultInstance());\n }", "public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void setStock_num(Integer stock_num) {\n this.stock_num = stock_num;\n }", "@FXML\n private void onNewTransfer() {\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getClassLoader().getResource\n (\"main/resources/view/edit-stock-transfer.fxml\"));\n Stage stage = new Stage();\n stage.setScene(new Scene(loader.load()));\n stage.setResizable(false);\n stage.initModality(Modality.WINDOW_MODAL);\n stage.initOwner(container.getScene().getWindow());\n\n EditStockTransferController controller = loader.getController();\n controller.setStage(stage);\n\n stage.showAndWait();\n getData();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "@Override\n protected void commitCreates(ViewImpl view, ObjectInstance oi)\n {\n }", "public void saveDate(View view) {\n// create an object of order\n Order order = new Order(name, Integer.parseInt(price));\n dbHandler.addOrder(order);\n Toast.makeText(getApplicationContext(), \"Hooray! Data Saved in DB\", Toast.LENGTH_SHORT).show();\n }", "public Builder setStocks(\n int index, com.sbytestream.samples.grpc.stockservice.Stock value) {\n if (stocksBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureStocksIsMutable();\n stocks_.set(index, value);\n onChanged();\n } else {\n stocksBuilder_.setMessage(index, value);\n }\n return this;\n }", "@GetMapping(\"/restaurante/new\")\n\tpublic String newRestaurante(Model model) {\n\t\tmodel.addAttribute(\"restaurante\", new Restaurante());\n\t\tControllerHelper.setEditMode(model, false);\n\t\tControllerHelper.addCategoriasToRequest(categoriaRestauranteRepository, model);\n\t\t\n\t\treturn \"restaurante-cadastro\";\n\t\t\n\t}", "@Override\n\tpublic void addInStock(Stock s) {\n\t\n\t}", "@Override\n public String getID() {\n return \"StockGlance\";\n }", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "public ViewObjectImpl getFindYourStockistVO1() {\n return (ViewObjectImpl) findViewObject(\"FindYourStockistVO1\");\n }", "@RequestMapping(value = \"/newrecipe\", method = RequestMethod.GET)\n\tpublic String newRecipeForm(Model model) {\n\t\tmodel.addAttribute(\"recipe\", new Recipe()); //empty recipe object\n\t\tmodel.addAttribute(\"categories\", CatRepo.findAll());\n\t\treturn \"newrecipe\";\n\t}", "@RequestMapping(value=\"/{username}/index\", method = RequestMethod.POST)\n\tpublic User addIndex(@PathVariable String username, @RequestParam(value=\"stock\") String[] stocks){\n\t\tUser user = userService.getUserByName(username);\n\t\tStockIndex newStockIndex;\n\t\tfor(String stock: stocks){\n\t\t\tnewStockIndex = new StockIndex(stock);\n\t\t\tuser.addCustomIndex(newStockIndex.returnIndex());\n\t\t}\n\t\treturn userService.updateUser(user);\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tnewNote();//新建一条记录\n\t\t\t}", "@GetMapping(\"/service_requests/new\")\n public String newServiceRequest(Model model){\n String role = userService.getRole(userService.getCurrentUserName());\n model.addAttribute(\"role\", role);\n\n model.addAttribute(\"serviceRequest\", new ServiceRequest());\n\n return \"/forms/new_servicerequest.html\";\n }", "public void add(Stock s)\n {\n stocks.add(s);\n }", "@PostMapping(\"/stock-in-boxes\")\n @Timed\n public ResponseEntity<StockInBoxDTO> createStockInBox(@Valid @RequestBody StockInBoxDTO stockInBoxDTO) throws URISyntaxException {\n log.debug(\"REST request to save StockInBox : {}\", stockInBoxDTO);\n if (stockInBoxDTO.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new stockInBox cannot already have an ID\")).body(null);\n }\n StockInBoxDTO result = stockInBoxService.save(stockInBoxDTO);\n return ResponseEntity.created(new URI(\"/api/stock-in-boxes/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public void setStock(int stock) {\n\t\tthis.stock = stock;\n\t}" ]
[ "0.6413859", "0.64030796", "0.62953955", "0.62758297", "0.62673265", "0.6190462", "0.6155262", "0.61434054", "0.6141473", "0.6118643", "0.6013981", "0.59111625", "0.58705723", "0.58658004", "0.57693714", "0.57555354", "0.5727082", "0.57255703", "0.5719637", "0.57077825", "0.5698336", "0.5691031", "0.56444174", "0.5608566", "0.5604947", "0.55647516", "0.5542953", "0.55427617", "0.5534145", "0.5531547", "0.55286795", "0.5504665", "0.55020505", "0.54936457", "0.54868364", "0.5483127", "0.54696566", "0.5464507", "0.5463608", "0.5460323", "0.5460323", "0.5456713", "0.5456713", "0.5449114", "0.5443672", "0.5438939", "0.54265344", "0.54243016", "0.54127485", "0.5411564", "0.5411482", "0.54101616", "0.54000986", "0.5391503", "0.53602767", "0.53594476", "0.53511834", "0.5350005", "0.53497", "0.5348419", "0.53478605", "0.53435576", "0.53435576", "0.53380305", "0.5336537", "0.53258187", "0.5315086", "0.5305613", "0.53045833", "0.5302286", "0.5299484", "0.5291765", "0.529041", "0.5286005", "0.5271456", "0.5268064", "0.5249339", "0.5248354", "0.52471644", "0.5226093", "0.52210456", "0.52203274", "0.52176523", "0.5208814", "0.5206968", "0.52067125", "0.51954263", "0.51919895", "0.5187543", "0.517435", "0.5171806", "0.51696837", "0.51666915", "0.51657045", "0.51639676", "0.51638436", "0.5156049", "0.515331", "0.5146158", "0.51457584", "0.51457006" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); search = new javax.swing.JTextField(); jLabel7 = new javax.swing.JLabel(); jPanel5 = new javax.swing.JPanel(); detail = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); name = new javax.swing.JTextField(); price = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); quantity = new javax.swing.JTextField(); jPanel6 = new javax.swing.JPanel(); jLabel6 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jCheckBox1 = new javax.swing.JCheckBox(); jPanel7 = new javax.swing.JPanel(); jLabel31 = new javax.swing.JLabel(); total = new javax.swing.JLabel(); add_cart = new javax.swing.JPanel(); jLabel33 = new javax.swing.JLabel(); jComboBox1 = new javax.swing.JComboBox<>(); jTabbedPane1 = new javax.swing.JTabbedPane(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jPanel4 = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); t_sold = new javax.swing.JTable(); jButton6 = new javax.swing.JButton(); sell_date = new com.toedter.calendar.JDateChooser(); jLabel28 = new javax.swing.JLabel(); paid = new javax.swing.JTextField(); jLabel29 = new javax.swing.JLabel(); jLabel30 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jLabel27 = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); jTabbedPane2 = new javax.swing.JTabbedPane(); jPanel8 = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); cart = new javax.swing.JTable(); jPanel10 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jLabel34 = new javax.swing.JLabel(); total_l = new javax.swing.JLabel(); jPanel11 = new javax.swing.JPanel(); jLabel35 = new javax.swing.JLabel(); balance = new javax.swing.JLabel(); total_b = new javax.swing.JTextField(); jLabel42 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(0, 102, 204)); search.setBackground(new java.awt.Color(153, 204, 255)); search.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N search.setForeground(new java.awt.Color(255, 255, 255)); search.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 153, 255), 3)); search.setSelectedTextColor(new java.awt.Color(0, 51, 51)); search.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchActionPerformed(evt); } }); search.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { searchKeyReleased(evt); } }); jLabel7.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N jLabel7.setForeground(new java.awt.Color(255, 255, 255)); jLabel7.setText("Search"); jPanel5.setBackground(new java.awt.Color(0, 102, 204)); detail.setBackground(new java.awt.Color(153, 204, 255)); detail.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N detail.setForeground(new java.awt.Color(255, 255, 255)); detail.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 153, 255), 3)); detail.setEnabled(false); jLabel11.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N jLabel11.setForeground(new java.awt.Color(255, 255, 255)); jLabel11.setText("NAME"); jLabel2.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setText("DESCRIPTION"); name.setBackground(new java.awt.Color(153, 204, 255)); name.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N name.setForeground(new java.awt.Color(255, 255, 255)); name.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 153, 255), 3)); name.setEnabled(false); name.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { nameActionPerformed(evt); } }); price.setBackground(new java.awt.Color(153, 204, 255)); price.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N price.setForeground(new java.awt.Color(255, 255, 255)); price.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 153, 255), 3)); price.setEnabled(false); price.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { priceActionPerformed(evt); } }); price.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { priceKeyReleased(evt); } }); jLabel3.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N jLabel3.setForeground(new java.awt.Color(255, 255, 255)); jLabel3.setText("COST"); jLabel4.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N jLabel4.setForeground(new java.awt.Color(255, 255, 255)); jLabel4.setText("QUANTITY"); jLabel5.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N jLabel5.setForeground(new java.awt.Color(255, 255, 255)); jLabel5.setText("TOTAL"); quantity.setBackground(new java.awt.Color(163, 204, 255)); quantity.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N quantity.setForeground(new java.awt.Color(255, 255, 255)); quantity.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 153, 255), 3)); quantity.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { quantityActionPerformed(evt); } }); quantity.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { quantityKeyReleased(evt); } }); jPanel6.setBackground(new java.awt.Color(0, 153, 51)); jPanel6.setEnabled(false); jPanel6.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jPanel6MouseClicked(evt); } }); jLabel6.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N jLabel6.setForeground(new java.awt.Color(255, 255, 255)); jLabel6.setText("Sell"); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 111, Short.MAX_VALUE) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addGap(0, 42, Short.MAX_VALUE) .addComponent(jLabel6) .addGap(0, 43, Short.MAX_VALUE))) ); jPanel6Layout.setVerticalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 40, Short.MAX_VALUE) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel6) .addGap(0, 0, Short.MAX_VALUE))) ); jLabel1.setFont(new java.awt.Font("Century Gothic", 0, 36)); // NOI18N jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("Customer Transaction"); jCheckBox1.setBackground(new java.awt.Color(0, 102, 204)); jCheckBox1.setForeground(new java.awt.Color(255, 255, 255)); jCheckBox1.setText("Negotiable"); jCheckBox1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox1ActionPerformed(evt); } }); jPanel7.setBackground(new java.awt.Color(0, 153, 51)); jPanel7.setEnabled(false); jPanel7.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jPanel7MouseClicked(evt); } }); jLabel31.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N jLabel31.setForeground(new java.awt.Color(255, 255, 255)); jLabel31.setText("Sell"); javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addGap(0, 37, Short.MAX_VALUE) .addComponent(jLabel31) .addGap(0, 37, Short.MAX_VALUE))) ); jPanel7Layout.setVerticalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 40, Short.MAX_VALUE) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel31) .addGap(0, 0, Short.MAX_VALUE))) ); total.setFont(new java.awt.Font("Century Gothic", 1, 36)); // NOI18N total.setForeground(new java.awt.Color(255, 255, 255)); total.setText("0"); total.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); total.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { totalPropertyChange(evt); } }); add_cart.setBackground(new java.awt.Color(0, 153, 255)); add_cart.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { add_cartMouseClicked(evt); } }); jLabel33.setFont(new java.awt.Font("Century Gothic", 1, 20)); // NOI18N jLabel33.setForeground(new java.awt.Color(255, 255, 255)); jLabel33.setText(">>"); javax.swing.GroupLayout add_cartLayout = new javax.swing.GroupLayout(add_cart); add_cart.setLayout(add_cartLayout); add_cartLayout.setHorizontalGroup( add_cartLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, add_cartLayout.createSequentialGroup() .addContainerGap(25, Short.MAX_VALUE) .addComponent(jLabel33) .addGap(23, 23, 23)) ); add_cartLayout.setVerticalGroup( add_cartLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel33, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addGap(34, 34, 34) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jLabel5) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(120, 120, 120) .addComponent(price, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE) .addComponent(jCheckBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(139, 139, 139)))) .addGroup(jPanel5Layout.createSequentialGroup() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addGap(12, 12, 12) .addComponent(jLabel1)) .addGroup(jPanel5Layout.createSequentialGroup() .addGap(34, 34, 34) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addComponent(jLabel11) .addGap(120, 120, 120) .addComponent(name, javax.swing.GroupLayout.PREFERRED_SIZE, 367, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addComponent(jLabel2) .addGap(73, 73, 73) .addComponent(detail, javax.swing.GroupLayout.PREFERRED_SIZE, 367, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(jPanel5Layout.createSequentialGroup() .addGap(34, 34, 34) .addComponent(jLabel4) .addGap(95, 95, 95) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(total, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(quantity, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(50, 50, 50)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addComponent(add_cart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(45, 45, 45) .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()))) ); jPanel5Layout.setVerticalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addGap(38, 38, 38) .addComponent(jLabel1) .addGap(70, 70, 70) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addGap(9, 9, 9) .addComponent(jLabel11)) .addComponent(name, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(47, 47, 47) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addGap(9, 9, 9) .addComponent(jLabel2)) .addComponent(detail, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(47, 47, 47) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addGap(9, 9, 9) .addComponent(jLabel3)) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(price, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addGap(52, 52, 52) .addComponent(jLabel4)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addGap(43, 43, 43) .addComponent(quantity, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(57, 57, 57) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(total, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(31, 31, 31) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(add_cart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 1233, Short.MAX_VALUE) .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(54, 54, 54)) ); jComboBox1.setBackground(new java.awt.Color(153, 204, 255)); jComboBox1.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N jComboBox1.setForeground(new java.awt.Color(255, 255, 255)); jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Name", "Detail", "Supplier" })); jComboBox1.setToolTipText("Search Field (Column)"); jComboBox1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jComboBox1MouseClicked(evt); } }); jComboBox1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBox1ActionPerformed(evt); } }); jTable1.setBackground(new java.awt.Color(51, 153, 255)); jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jTable1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { jTable1MouseReleased(evt); } }); jTable1.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { jTable1KeyReleased(evt); } }); jScrollPane1.setViewportView(jTable1); jTabbedPane1.addTab("PRODUCTS ON STOCK", jScrollPane1); t_sold.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane3.setViewportView(t_sold); jButton6.setText("Filter"); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); sell_date.setDateFormatString("yyyy-MM-dd"); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 637, Short.MAX_VALUE) .addGroup(jPanel4Layout.createSequentialGroup() .addContainerGap() .addComponent(sell_date, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jButton6) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel4Layout.setVerticalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton6) .addComponent(sell_date, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)) ); jTabbedPane1.addTab("PRODUCTS SOLD", jPanel4); jLabel28.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N jLabel28.setForeground(new java.awt.Color(255, 255, 255)); jLabel28.setText("Balance Calculation"); paid.setBackground(new java.awt.Color(163, 204, 255)); paid.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N paid.setForeground(new java.awt.Color(255, 255, 255)); paid.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 153, 255), 3)); paid.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { paidActionPerformed(evt); } }); jLabel29.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N jLabel29.setForeground(new java.awt.Color(255, 255, 255)); jLabel29.setText("Balance"); jLabel30.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N jLabel30.setForeground(new java.awt.Color(255, 255, 255)); jLabel30.setText("Paid"); jPanel3.setBackground(new java.awt.Color(221, 217, 222)); jPanel3.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jPanel3MouseClicked(evt); } }); jPanel3.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { jPanel3KeyReleased(evt); } }); jLabel27.setFont(new java.awt.Font("Dialog", 1, 16)); // NOI18N jLabel27.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel27.setText("Calculate"); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel27, javax.swing.GroupLayout.DEFAULT_SIZE, 87, Short.MAX_VALUE) .addContainerGap()) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel27, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) ); cart.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane2.setViewportView(cart); jPanel10.setBackground(new java.awt.Color(0, 204, 204)); jButton1.setText("Delete"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jLabel34.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N jLabel34.setForeground(new java.awt.Color(255, 255, 255)); jLabel34.setText("Total"); total_l.setFont(new java.awt.Font("Century Gothic", 1, 22)); // NOI18N total_l.setForeground(new java.awt.Color(255, 255, 255)); total_l.setText("0"); total_l.addInputMethodListener(new java.awt.event.InputMethodListener() { public void caretPositionChanged(java.awt.event.InputMethodEvent evt) { total_lCaretPositionChanged(evt); } public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) { } }); jPanel11.setBackground(new java.awt.Color(0, 153, 51)); jPanel11.setEnabled(false); jPanel11.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jPanel11MouseClicked(evt); } }); jLabel35.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N jLabel35.setForeground(new java.awt.Color(255, 255, 255)); jLabel35.setText("Sell"); javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11); jPanel11.setLayout(jPanel11Layout); jPanel11Layout.setHorizontalGroup( jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 63, Short.MAX_VALUE) .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel11Layout.createSequentialGroup() .addGap(0, 20, Short.MAX_VALUE) .addComponent(jLabel35) .addGap(0, 19, Short.MAX_VALUE))) ); jPanel11Layout.setVerticalGroup( jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 0, Short.MAX_VALUE) .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel11Layout.createSequentialGroup() .addGap(0, 3, Short.MAX_VALUE) .addComponent(jLabel35) .addGap(0, 4, Short.MAX_VALUE))) ); javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup() .addContainerGap() .addComponent(jButton1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE) .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(total_l, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)) ); jPanel10Layout.setVerticalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel34) .addComponent(total_l)) .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel11, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); jPanel8.setLayout(jPanel8Layout); jPanel8Layout.setHorizontalGroup( jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) ); jPanel8Layout.setVerticalGroup( jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup() .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) ); jTabbedPane2.addTab(" PRODUCT LIST", jPanel8); balance.setFont(new java.awt.Font("Century Gothic", 1, 22)); // NOI18N balance.setForeground(new java.awt.Color(255, 255, 255)); balance.setText("0"); total_b.setBackground(new java.awt.Color(163, 204, 255)); total_b.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N total_b.setForeground(new java.awt.Color(255, 255, 255)); total_b.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 153, 255), 3)); total_b.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { total_bActionPerformed(evt); } }); jLabel42.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N jLabel42.setForeground(new java.awt.Color(255, 255, 255)); jLabel42.setText("Total"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel28) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel29) .addComponent(jLabel30) .addComponent(jLabel42)) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(22, 22, 22) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(balance, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel1Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(total_b, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(paid, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)))))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 347, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(20, 20, 20)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addGap(0, 5, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(search, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel7) .addGap(177, 177, 177) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 568, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(48, 48, 48)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 642, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()))))) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(75, 75, 75) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7) .addComponent(search, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel28) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(paid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel30)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(total_b, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel42)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel29) .addComponent(balance)) .addGap(18, 18, 18) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(92, 92, 92)) .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 282, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(1291, 1291, 1291)) .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); setSize(new java.awt.Dimension(1325, 713)); setLocationRelativeTo(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "0.6944929", "0.6942576", "0.69355655", "0.6931378", "0.6927896", "0.69248974", "0.6924723", "0.69116884", "0.6910487", "0.6892381", "0.68921053", "0.6890637", "0.68896896", "0.68881863", "0.68826133", "0.68815064", "0.6881078", "0.68771756", "0.6875212", "0.68744373", "0.68711984", "0.6858978", "0.68558776", "0.6855172", "0.6854685", "0.685434", "0.68525875", "0.6851834", "0.6851834", "0.684266", "0.6836586", "0.6836431", "0.6828333", "0.68276715", "0.68262815", "0.6823921", "0.682295", "0.68167603", "0.68164384", "0.6809564", "0.68086857", "0.6807804", "0.6807734", "0.68067646", "0.6802192", "0.67943805", "0.67934304", "0.6791657", "0.6789546", "0.6789006", "0.67878324", "0.67877173", "0.6781847", "0.6765398", "0.6765197", "0.6764246", "0.6756036", "0.6755023", "0.6751404", "0.67508715", "0.6743043", "0.67387456", "0.6736752", "0.67356426", "0.6732893", "0.6726715", "0.6726464", "0.67196447", "0.67157453", "0.6714399", "0.67140275", "0.6708251", "0.6707117", "0.670393", "0.6700697", "0.66995865", "0.66989213", "0.6697588", "0.66939527", "0.66908985", "0.668935" ]
0.0
-1
GENFIRST:event_jCheckBox1ActionPerformed TODO add your handling code here:
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) { if(price.isEnabled()){ price.setEnabled(false); }else{ price.setEnabled(true); } ; // if(price.enabled(true)) // {} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tcheckboxsActionPerformed(evt);\n\t\t\t}", "private void jCheckBoxCffActionPerformed(ActionEvent e) {\n\t\tsetFileNameExtension();\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel7 = new javax.swing.JLabel();\n jCheckBox2 = new javax.swing.JCheckBox();\n jCheckBox1 = new javax.swing.JCheckBox();\n jLabel6 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jTextField1 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n btn_begin = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 36)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 51));\n jLabel7.setText(\"BEGIN\");\n getContentPane().add(jLabel7);\n jLabel7.setBounds(890, 420, 110, 50);\n\n jCheckBox2.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jCheckBox2.setText(\"READY..??\");\n jCheckBox2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox2ActionPerformed(evt);\n }\n });\n getContentPane().add(jCheckBox2);\n jCheckBox2.setBounds(1550, 540, 150, 30);\n\n jCheckBox1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jCheckBox1.setText(\"READY..??\");\n jCheckBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox1ActionPerformed(evt);\n }\n });\n getContentPane().add(jCheckBox1);\n jCheckBox1.setBounds(300, 480, 140, 30);\n\n jLabel6.setFont(new java.awt.Font(\"Tempus Sans ITC\", 3, 36)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 51, 0));\n jLabel6.setText(\"PLAYER-2\");\n getContentPane().add(jLabel6);\n jLabel6.setBounds(1570, 140, 190, 110);\n\n jLabel5.setFont(new java.awt.Font(\"Tempus Sans ITC\", 3, 36)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 51, 0));\n jLabel5.setText(\"PLAYER-1\");\n getContentPane().add(jLabel5);\n jLabel5.setBounds(200, 140, 190, 110);\n\n jLabel4.setFont(new java.awt.Font(\"Viner Hand ITC\", 3, 24)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(0, 0, 204));\n jLabel4.setText(\"ENTER YOUR NAME :\");\n getContentPane().add(jLabel4);\n jLabel4.setBounds(1320, 380, 290, 60);\n\n jTextField2.setFont(new java.awt.Font(\"Segoe Script\", 0, 24)); // NOI18N\n jTextField2.setText(\"PLAYER2\");\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n getContentPane().add(jTextField2);\n jTextField2.setBounds(1600, 390, 280, 40);\n\n jTextField1.setFont(new java.awt.Font(\"Segoe Script\", 0, 24)); // NOI18N\n jTextField1.setText(\"PLAYER1\");\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n getContentPane().add(jTextField1);\n jTextField1.setBounds(290, 380, 280, 40);\n\n jLabel3.setFont(new java.awt.Font(\"Viner Hand ITC\", 3, 24)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 51, 0));\n jLabel3.setText(\"ENTER YOUR NAME :\");\n getContentPane().add(jLabel3);\n jLabel3.setBounds(10, 370, 290, 60);\n\n jLabel2.setFont(new java.awt.Font(\"Segoe Script\", 3, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(51, 204, 255));\n jLabel2.setText(\"WELCOME TO POKE WORLD\");\n getContentPane().add(jLabel2);\n jLabel2.setBounds(770, 20, 400, 50);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/login.jpg\"))); // NOI18N\n getContentPane().add(jLabel1);\n jLabel1.setBounds(0, 0, 1920, 1080);\n\n btn_begin.setText(\"jButton2\");\n btn_begin.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_beginActionPerformed(evt);\n }\n });\n getContentPane().add(btn_begin);\n btn_begin.setBounds(870, 390, 150, 100);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jSeparator1 = new javax.swing.JSeparator();\n jCheckBoxMenuItem1 = new javax.swing.JCheckBoxMenuItem();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jSeparator2 = new javax.swing.JSeparator();\n jSeparator3 = new javax.swing.JSeparator();\n jSeparator4 = new javax.swing.JSeparator();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jSeparator5 = new javax.swing.JSeparator();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jTextField2 = new javax.swing.JTextField();\n jButton4 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n jLabel8 = new javax.swing.JLabel();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenu2 = new javax.swing.JMenu();\n jMenu3 = new javax.swing.JMenu();\n\n jCheckBoxMenuItem1.setSelected(true);\n jCheckBoxMenuItem1.setText(\"jCheckBoxMenuItem1\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n formMouseClicked(evt);\n }\n });\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowActivated(java.awt.event.WindowEvent evt) {\n formWindowActivated(evt);\n }\n });\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"DATA ADMIN\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 10, -1, -1));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel2.setText(\"TAMBAH ADMIN\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 10, -1, -1));\n getContentPane().add(jSeparator2, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 30, 326, 11));\n\n jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL);\n getContentPane().add(jSeparator3, new org.netbeans.lib.awtextra.AbsoluteConstraints(341, 0, 14, 370));\n getContentPane().add(jSeparator4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, 321, 10));\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jTable1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTable1MouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTable1);\n\n getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 40, 321, 230));\n\n jLabel3.setText(\"Username\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 60, -1, -1));\n\n jLabel4.setText(\"Password\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 120, -1, -1));\n\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n getContentPane().add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 60, 244, -1));\n\n jButton1.setText(\"Tambah Admin\");\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 150, 225, -1));\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel5.setText(\"EDIT ADMIN\");\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 230, -1, -1));\n\n jLabel6.setText(\"Username\");\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 250, -1, -1));\n\n jLabel7.setText(\"Password\");\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 310, -1, -1));\n\n jTextField3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField3ActionPerformed(evt);\n }\n });\n getContentPane().add(jTextField3, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 250, 230, -1));\n getContentPane().add(jTextField4, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 290, 230, 30));\n getContentPane().add(jSeparator5, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 220, 327, 10));\n\n jButton2.setText(\"Delete\");\n jButton2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton2MouseClicked(evt);\n }\n });\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 330, -1, -1));\n\n jButton3.setText(\"Edit Admin\");\n jButton3.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton3MouseClicked(evt);\n }\n });\n getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 330, -1, -1));\n\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n getContentPane().add(jTextField2, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 110, 240, -1));\n\n jButton4.setText(\"Import Form CSV\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 290, -1, -1));\n\n jButton5.setText(\"Export Form CSV\");\n jButton5.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton5MouseClicked(evt);\n }\n });\n getContentPane().add(jButton5, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 290, -1, -1));\n\n jButton6.setText(\"Laporan\");\n getContentPane().add(jButton6, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 330, -1, -1));\n\n jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Dabar/rawcoverimage (1).jpg\"))); // NOI18N\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 730, 370));\n\n jMenu1.setText(\"Data Admin\");\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Data Barang\");\n jMenu2.addMenuKeyListener(new javax.swing.event.MenuKeyListener() {\n public void menuKeyPressed(javax.swing.event.MenuKeyEvent evt) {\n jMenu2MenuKeyPressed(evt);\n }\n public void menuKeyReleased(javax.swing.event.MenuKeyEvent evt) {\n }\n public void menuKeyTyped(javax.swing.event.MenuKeyEvent evt) {\n }\n });\n jMenu2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jMenu2MouseClicked(evt);\n }\n });\n jMenuBar1.add(jMenu2);\n\n jMenu3.setText(\"Logout\");\n jMenu3.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jMenu3MouseClicked(evt);\n }\n });\n jMenuBar1.add(jMenu3);\n\n setJMenuBar(jMenuBar1);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jCheckBox3 = new javax.swing.JCheckBox();\n jCheckBox4 = new javax.swing.JCheckBox();\n jCheckBox5 = new javax.swing.JCheckBox();\n jCheckBox6 = new javax.swing.JCheckBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Contest Reminder\");\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n setResizable(false);\n\n jCheckBox1.setSelected(true);\n jCheckBox1.setText(\"Codeforces\");\n\n jCheckBox2.setSelected(true);\n jCheckBox2.setText(\"Hackerrank\");\n\n jButton1.setText(\"Done\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jCheckBox3.setSelected(true);\n jCheckBox3.setText(\"Topcoder\");\n\n jCheckBox4.setSelected(true);\n jCheckBox4.setText(\"Codechef\");\n\n jCheckBox5.setSelected(true);\n jCheckBox5.setText(\"Hackerearth\");\n\n jCheckBox6.setSelected(true);\n jCheckBox6.setText(\"Atcoder\");\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(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox1)\n .addComponent(jCheckBox4))\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox5)))\n .addGroup(layout.createSequentialGroup()\n .addGap(127, 127, 127)\n .addComponent(jButton1)))\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox6)\n .addComponent(jCheckBox3))\n .addContainerGap(41, Short.MAX_VALUE))\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jCheckBox1, jCheckBox2, jCheckBox3, jCheckBox4, jCheckBox5, jCheckBox6});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox1)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox3))\n .addGap(41, 41, 41)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox4)\n .addComponent(jCheckBox5)\n .addComponent(jCheckBox6))\n .addGap(67, 67, 67)\n .addComponent(jButton1)\n .addContainerGap(80, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private void jcbX_AxisActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void actionPerformed(ActionEvent arg0) {\n if (chckbxNewCheckBox.isSelected() == true) {\r\n // set the other checkbox to unchecked\r\n chckbxNewCheckBox_1.setSelected(false);\r\n // enable the combox box drop down\r\n comboBox.setEnabled(true);\r\n // disable the textfield for the user input\r\n textField_3.setEnabled(false);\r\n textField_3.setText(\"\");\r\n // enable the refresh rooms button\r\n btnNewButton.setEnabled(true);\r\n }\r\n }", "private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }", "public void actionPerformed(ActionEvent arg0) {\n if (chckbxNewCheckBox_1.isSelected() == true) {\r\n // set the other checkbox to unchecked\r\n chckbxNewCheckBox.setSelected(false);\r\n // disable the combox box drop down\r\n comboBox.setEnabled(false);\r\n // enable the textfield for the user input\r\n textField_3.setEnabled(true);\r\n textField_3.setText(\"\");\r\n // disable the refresh rooms button\r\n btnNewButton.setEnabled(false);\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jCheckBox13 = new javax.swing.JCheckBox();\n jCheckBox5 = new javax.swing.JCheckBox();\n jCheckBox3 = new javax.swing.JCheckBox();\n jCheckBox4 = new javax.swing.JCheckBox();\n jCheckBox15 = new javax.swing.JCheckBox();\n jCheckBox14 = new javax.swing.JCheckBox();\n jCheckBox17 = new javax.swing.JCheckBox();\n jCheckBox9 = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jCheckBox16 = new javax.swing.JCheckBox();\n jCheckBox8 = new javax.swing.JCheckBox();\n jLabel2 = new javax.swing.JLabel();\n jCheckBox19 = new javax.swing.JCheckBox();\n jCheckBox7 = new javax.swing.JCheckBox();\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox18 = new javax.swing.JCheckBox();\n jCheckBox6 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jLabel3 = new javax.swing.JLabel();\n jCheckBox12 = new javax.swing.JCheckBox();\n jCheckBox11 = new javax.swing.JCheckBox();\n jCheckBox10 = new javax.swing.JCheckBox();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setName(\"Form\"); // NOI18N\n\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(carparkaplication.CarParkAplicationApp.class).getContext().getResourceMap(SetopenTimeD.class);\n jCheckBox13.setText(resourceMap.getString(\"jCheckBox13.text\")); // NOI18N\n jCheckBox13.setName(\"jCheckBox13\"); // NOI18N\n\n jCheckBox5.setText(resourceMap.getString(\"jCheckBox5.text\")); // NOI18N\n jCheckBox5.setName(\"jCheckBox5\"); // NOI18N\n\n jCheckBox3.setText(resourceMap.getString(\"jCheckBox3.text\")); // NOI18N\n jCheckBox3.setName(\"jCheckBox3\"); // NOI18N\n\n jCheckBox4.setText(resourceMap.getString(\"jCheckBox4.text\")); // NOI18N\n jCheckBox4.setName(\"jCheckBox4\"); // NOI18N\n\n jCheckBox15.setText(resourceMap.getString(\"jCheckBox15.text\")); // NOI18N\n jCheckBox15.setName(\"jCheckBox15\"); // NOI18N\n\n jCheckBox14.setText(resourceMap.getString(\"jCheckBox14.text\")); // NOI18N\n jCheckBox14.setName(\"jCheckBox14\"); // NOI18N\n\n jCheckBox17.setText(resourceMap.getString(\"jCheckBox17.text\")); // NOI18N\n jCheckBox17.setName(\"jCheckBox17\"); // NOI18N\n\n jCheckBox9.setText(resourceMap.getString(\"jCheckBox9.text\")); // NOI18N\n jCheckBox9.setName(\"jCheckBox9\"); // NOI18N\n\n javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(carparkaplication.CarParkAplicationApp.class).getContext().getActionMap(SetopenTimeD.class, this);\n jButton1.setAction(actionMap.get(\"ok_clicked\")); // NOI18N\n jButton1.setText(resourceMap.getString(\"jButton1.text\")); // NOI18N\n jButton1.setName(\"jButton1\"); // NOI18N\n\n jCheckBox16.setText(resourceMap.getString(\"jCheckBox16.text\")); // NOI18N\n jCheckBox16.setName(\"jCheckBox16\"); // NOI18N\n\n jCheckBox8.setText(resourceMap.getString(\"jCheckBox8.text\")); // NOI18N\n jCheckBox8.setName(\"jCheckBox8\"); // NOI18N\n\n jLabel2.setText(resourceMap.getString(\"jLabel2.text\")); // NOI18N\n jLabel2.setName(\"jLabel2\"); // NOI18N\n\n jCheckBox19.setText(resourceMap.getString(\"jCheckBox19.text\")); // NOI18N\n jCheckBox19.setName(\"jCheckBox19\"); // NOI18N\n\n jCheckBox7.setText(resourceMap.getString(\"jCheckBox7.text\")); // NOI18N\n jCheckBox7.setName(\"jCheckBox7\"); // NOI18N\n\n jCheckBox1.setText(resourceMap.getString(\"jCheckBox1.text\")); // NOI18N\n jCheckBox1.setName(\"jCheckBox1\"); // NOI18N\n\n jCheckBox18.setText(resourceMap.getString(\"jCheckBox18.text\")); // NOI18N\n jCheckBox18.setName(\"jCheckBox18\"); // NOI18N\n\n jCheckBox6.setText(resourceMap.getString(\"jCheckBox6.text\")); // NOI18N\n jCheckBox6.setName(\"jCheckBox6\"); // NOI18N\n\n jCheckBox2.setText(resourceMap.getString(\"jCheckBox2.text\")); // NOI18N\n jCheckBox2.setName(\"jCheckBox2\"); // NOI18N\n\n jLabel3.setText(resourceMap.getString(\"jLabel3.text\")); // NOI18N\n jLabel3.setName(\"jLabel3\"); // NOI18N\n\n jCheckBox12.setText(resourceMap.getString(\"jCheckBox12.text\")); // NOI18N\n jCheckBox12.setName(\"jCheckBox12\"); // NOI18N\n\n jCheckBox11.setText(resourceMap.getString(\"jCheckBox11.text\")); // NOI18N\n jCheckBox11.setName(\"jCheckBox11\"); // NOI18N\n\n jCheckBox10.setText(resourceMap.getString(\"jCheckBox10.text\")); // NOI18N\n jCheckBox10.setName(\"jCheckBox10\"); // NOI18N\n\n jLabel1.setFont(resourceMap.getFont(\"jLabel1.font\")); // NOI18N\n jLabel1.setText(resourceMap.getString(\"jLabel1.text\")); // NOI18N\n jLabel1.setName(\"jLabel1\"); // NOI18N\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(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox8)\n .addComponent(jCheckBox1)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jCheckBox13)\n .addComponent(jLabel3)\n .addComponent(jCheckBox18))\n .addGap(1, 1, 1)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox11)))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jCheckBox19))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jCheckBox14)))\n .addGap(21, 21, 21)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jCheckBox15)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jCheckBox16))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jCheckBox3)\n .addGap(18, 18, 18)\n .addComponent(jCheckBox4))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jCheckBox12)\n .addGap(18, 18, 18)\n .addComponent(jCheckBox9))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox5)\n .addComponent(jCheckBox10))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox7)\n .addComponent(jCheckBox6)))\n .addComponent(jCheckBox17)))))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(28, 28, 28)\n .addComponent(jLabel2)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox3)\n .addComponent(jCheckBox4)\n .addComponent(jCheckBox5)\n .addComponent(jCheckBox6)\n .addComponent(jCheckBox1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox10)\n .addComponent(jCheckBox7)\n .addComponent(jCheckBox8)\n .addComponent(jCheckBox11)\n .addComponent(jCheckBox12)\n .addComponent(jCheckBox9))\n .addGap(18, 18, 18)\n .addComponent(jLabel3)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox13)\n .addComponent(jCheckBox15)\n .addComponent(jCheckBox16)\n .addComponent(jCheckBox17)\n .addComponent(jCheckBox14))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addGap(34, 34, 34))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox18)\n .addComponent(jCheckBox19))\n .addContainerGap())))\n );\n\n pack();\n }", "public void checkbox() {\r\n\t\tcheckBox.click();\r\n\t}", "private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jCheckBox6 = new javax.swing.JCheckBox();\n jPanel1 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n plithosEmField = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n plithosApField = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n idLabel = new javax.swing.JLabel();\n idField = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n isxysEmField = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n isxysApField = new javax.swing.JTextField();\n\n jCheckBox6.setText(\"jCheckBox6\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel3.setText(\" Πλήθος Εμπ:\");\n\n plithosEmField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n plithosEmFieldActionPerformed(evt);\n }\n });\n\n jLabel4.setText(\"Πλήθος Απ:\");\n\n jButton1.setText(\"Αποθήκευση\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Έξοδος\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n idLabel.setText(\"ID:\");\n\n idField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n idFieldActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\" Ισχύς Εμπ:\");\n\n jLabel6.setText(\" Ισχύς Απ:\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(58, 58, 58)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 50, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addGap(79, 79, 79))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3)\n .addComponent(idLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(idField, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(plithosEmField, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(plithosApField, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addGap(30, 30, 30)\n .addComponent(isxysApField, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(30, 30, 30)\n .addComponent(isxysEmField, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(48, 48, 48)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(idField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(idLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(plithosEmField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(plithosApField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(isxysEmField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(isxysApField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGap(22, 22, 22)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap(28, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void actionPerformed(ActionEvent e)\n {\n JCheckBoxMenuItem item = (JCheckBoxMenuItem)e.getSource();\n \n if (item.getName().equals(\"typingNotifications\"))\n { \n ConfigurationManager.setSendTypingNotifications(item.isSelected());\n }\n else if (item.getName().equals(\"sendingMessageCommand\"))\n { \n chatWindow.getCurrentChatPanel().getChatWritePanel()\n .changeSendCommand(!item.isSelected());\n \n if(!item.isSelected())\n ConfigurationManager.setSendMessageCommand(\n ConfigurationManager.ENTER_COMMAND);\n else\n ConfigurationManager.setSendMessageCommand(\n ConfigurationManager.CTRL_ENTER_COMMAND);\n }\n else if (item.getName().equals(\"autopopup\"))\n {\n ConfigurationManager.setAutoPopupNewMessage(item.isSelected());\n }\n }", "private void jTextField6ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField6ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jCAreaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {\n }", "private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n gripeSim = new javax.swing.JCheckBox();\n gripeNao = new javax.swing.JCheckBox();\n jLabel2 = new javax.swing.JLabel();\n bebidaSim = new javax.swing.JCheckBox();\n bebidaNao = new javax.swing.JCheckBox();\n jLabel3 = new javax.swing.JLabel();\n tatuagemSim = new javax.swing.JCheckBox();\n tatuagemNao = new javax.swing.JCheckBox();\n jLabel4 = new javax.swing.JLabel();\n vacinaSim = new javax.swing.JCheckBox();\n vacinaNao = new javax.swing.JCheckBox();\n jLabel5 = new javax.swing.JLabel();\n herpesSim = new javax.swing.JCheckBox();\n herpesNao = new javax.swing.JCheckBox();\n jLabel6 = new javax.swing.JLabel();\n faSim = new javax.swing.JCheckBox();\n faNao = new javax.swing.JCheckBox();\n jLabel7 = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n concluir = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel1.setText(\"Teve resfriado na semana anterior a doação : \");\n\n gripeSim.setBackground(new java.awt.Color(255, 255, 255));\n gripeSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n gripeSim.setText(\"Sim\");\n gripeSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n gripeSimActionPerformed(evt);\n }\n });\n\n gripeNao.setBackground(new java.awt.Color(255, 255, 255));\n gripeNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n gripeNao.setText(\"Não\");\n gripeNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n gripeNaoActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel2.setText(\"Ingeriu bebida alcóolica nas últimas 12 horas :\");\n\n bebidaSim.setBackground(new java.awt.Color(255, 255, 255));\n bebidaSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n bebidaSim.setText(\"Sim\");\n bebidaSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bebidaSimActionPerformed(evt);\n }\n });\n\n bebidaNao.setBackground(new java.awt.Color(255, 255, 255));\n bebidaNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n bebidaNao.setText(\"Não\");\n bebidaNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bebidaNaoActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel3.setText(\"Fez tatuagem permanente no último ano :\");\n\n tatuagemSim.setBackground(new java.awt.Color(255, 255, 255));\n tatuagemSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n tatuagemSim.setText(\"Sim\");\n tatuagemSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tatuagemSimActionPerformed(evt);\n }\n });\n\n tatuagemNao.setBackground(new java.awt.Color(255, 255, 255));\n tatuagemNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n tatuagemNao.setText(\"Não\");\n tatuagemNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tatuagemNaoActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel4.setText(\"Tomou vacina para gripe nas últimas 48 horas :\");\n\n vacinaSim.setBackground(new java.awt.Color(255, 255, 255));\n vacinaSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n vacinaSim.setText(\"Sim\");\n vacinaSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n vacinaSimActionPerformed(evt);\n }\n });\n\n vacinaNao.setBackground(new java.awt.Color(255, 255, 255));\n vacinaNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n vacinaNao.setText(\"Não\");\n vacinaNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n vacinaNaoActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel5.setText(\"Possui herpes labial ou genital :\");\n\n herpesSim.setBackground(new java.awt.Color(255, 255, 255));\n herpesSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n herpesSim.setText(\"Sim\");\n herpesSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n herpesSimActionPerformed(evt);\n }\n });\n\n herpesNao.setBackground(new java.awt.Color(255, 255, 255));\n herpesNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n herpesNao.setText(\"Não\");\n herpesNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n herpesNaoActionPerformed(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel6.setText(\"Esteve atualmente em (AC AM AP RO RR MA MG PA TO) :\");\n\n faSim.setBackground(new java.awt.Color(255, 255, 255));\n faSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n faSim.setText(\"Sim\");\n faSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n faSimActionPerformed(evt);\n }\n });\n\n faNao.setBackground(new java.awt.Color(255, 255, 255));\n faNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n faNao.setText(\"Não\");\n faNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n faNaoActionPerformed(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Georgia\", 0, 18)); // NOI18N\n jLabel7.setText(\"Triagem\");\n\n concluir.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n concluir.setText(\"Concluir\");\n concluir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n concluirActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel7)\n .addGap(206, 206, 206))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addComponent(faSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(faNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(herpesSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(herpesNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(gripeSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(gripeNao))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(vacinaSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(vacinaNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(tatuagemSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tatuagemNao))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(bebidaSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(bebidaNao))))\n .addGap(0, 1, Short.MAX_VALUE))\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap())))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(concluir, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(195, 195, 195))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7)\n .addGap(14, 14, 14)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(gripeSim)\n .addComponent(gripeNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(bebidaSim)\n .addComponent(bebidaNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tatuagemSim)\n .addComponent(tatuagemNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(vacinaSim)\n .addComponent(vacinaNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(herpesSim)\n .addComponent(herpesNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(faSim)\n .addComponent(faNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(concluir, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(17, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void CheckoutActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n sutlukadayif = new javax.swing.JCheckBox();\n kemalpasa = new javax.swing.JCheckBox();\n kabaktatlisi = new javax.swing.JCheckBox();\n ekmekkadayifi = new javax.swing.JCheckBox();\n mozaikpasta = new javax.swing.JCheckBox();\n cheesscake = new javax.swing.JCheckBox();\n supangle = new javax.swing.JCheckBox();\n cay = new javax.swing.JCheckBox();\n turkkahvesi = new javax.swing.JCheckBox();\n americano = new javax.swing.JCheckBox();\n latte = new javax.swing.JCheckBox();\n limonata = new javax.swing.JCheckBox();\n milkshake = new javax.swing.JCheckBox();\n mojito = new javax.swing.JCheckBox();\n txt_sutlukadayif = new javax.swing.JTextField();\n txt_kemalpasa = new javax.swing.JTextField();\n txt_kabaktatlisi = new javax.swing.JTextField();\n txt_ekmekkadayifi = new javax.swing.JTextField();\n txt_mozaikpasta = new javax.swing.JTextField();\n txt_cheesscake = new javax.swing.JTextField();\n txt_supangle = new javax.swing.JTextField();\n txt_cay = new javax.swing.JTextField();\n txt_turkkahvesi = new javax.swing.JTextField();\n txt_americano = new javax.swing.JTextField();\n txt_latte = new javax.swing.JTextField();\n txt_limonata = new javax.swing.JTextField();\n txt_milkshake = new javax.swing.JTextField();\n txt_mojito = new javax.swing.JTextField();\n jPanel3 = new javax.swing.JPanel();\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jPanel5 = new javax.swing.JPanel();\n btnce = new javax.swing.JButton();\n ekran = new javax.swing.JTextField();\n btnc = new javax.swing.JButton();\n btnbckspc = new javax.swing.JButton();\n btndivided = new javax.swing.JButton();\n btn7 = new javax.swing.JButton();\n btn8 = new javax.swing.JButton();\n btn9 = new javax.swing.JButton();\n btnmultiple = new javax.swing.JButton();\n btn4 = new javax.swing.JButton();\n btn5 = new javax.swing.JButton();\n btn6 = new javax.swing.JButton();\n btnminus = new javax.swing.JButton();\n btn1 = new javax.swing.JButton();\n btn2 = new javax.swing.JButton();\n btn3 = new javax.swing.JButton();\n btnplus = new javax.swing.JButton();\n btnposneg = new javax.swing.JButton();\n btn0 = new javax.swing.JButton();\n btndot = new javax.swing.JButton();\n btnequal = new javax.swing.JButton();\n jPanel6 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n faturaalan = new javax.swing.JTextArea();\n jPanel4 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n txt_iceceklertoplam = new javax.swing.JTextField();\n txt_tatlilartoplam = new javax.swing.JTextField();\n txt_bahsis = new javax.swing.JTextField();\n txt_bruttoplam = new javax.swing.JTextField();\n txt_kdv = new javax.swing.JTextField();\n txt_nettoplam = new javax.swing.JTextField();\n jPanel7 = new javax.swing.JPanel();\n toplam = new javax.swing.JButton();\n fatura = new javax.swing.JButton();\n reset = new javax.swing.JButton();\n kapat = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Verdana\", 1, 36)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"KAFE YÖNETİM OTOMASYONU\");\n\n sutlukadayif.setText(\"Sütlü Kadayıf\");\n sutlukadayif.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n sutlukadayifMouseClicked(evt);\n }\n });\n\n kemalpasa.setText(\"Kemal Paşa\");\n kemalpasa.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n kemalpasaMouseClicked(evt);\n }\n });\n\n kabaktatlisi.setText(\"Kabak Tatlısı\");\n kabaktatlisi.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n kabaktatlisiMouseClicked(evt);\n }\n });\n\n ekmekkadayifi.setText(\"Ekmek Kadayıf\");\n ekmekkadayifi.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n ekmekkadayifiMouseClicked(evt);\n }\n });\n\n mozaikpasta.setText(\"Mozaik Pasta\");\n mozaikpasta.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n mozaikpastaMouseClicked(evt);\n }\n });\n\n cheesscake.setText(\"Cheesscake\");\n cheesscake.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n cheesscakeMouseClicked(evt);\n }\n });\n\n supangle.setText(\"Supangle\");\n supangle.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n supangleMouseClicked(evt);\n }\n });\n\n cay.setText(\"Çay\");\n cay.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n cayMouseClicked(evt);\n }\n });\n\n turkkahvesi.setText(\"Türk Kahvesi\");\n turkkahvesi.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n turkkahvesiMouseClicked(evt);\n }\n });\n\n americano.setText(\"Americano\");\n americano.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n americanoMouseClicked(evt);\n }\n });\n\n latte.setText(\"Latte\");\n latte.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n latteMouseClicked(evt);\n }\n });\n\n limonata.setText(\"Limonata\");\n limonata.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n limonataMouseClicked(evt);\n }\n });\n\n milkshake.setText(\"Milkshake\");\n milkshake.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n milkshakeMouseClicked(evt);\n }\n });\n\n mojito.setText(\"Mojito\");\n mojito.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n mojitoMouseClicked(evt);\n }\n });\n\n txt_sutlukadayif.setText(\"0\");\n\n txt_kemalpasa.setText(\"0\");\n\n txt_kabaktatlisi.setText(\"0\");\n\n txt_ekmekkadayifi.setText(\"0\");\n\n txt_mozaikpasta.setText(\"0\");\n\n txt_cheesscake.setText(\"0\");\n\n txt_supangle.setText(\"0\");\n\n txt_turkkahvesi.setText(\"0\");\n\n txt_americano.setText(\"0\");\n\n txt_latte.setText(\"0\");\n\n txt_limonata.setText(\"0\");\n\n txt_milkshake.setText(\"0\");\n\n txt_mojito.setText(\"0\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(kemalpasa)\n .addComponent(sutlukadayif)\n .addComponent(kabaktatlisi)\n .addComponent(supangle)\n .addComponent(cheesscake)\n .addComponent(mozaikpasta)\n .addComponent(ekmekkadayifi))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txt_cheesscake, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(txt_mozaikpasta, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(txt_ekmekkadayifi)\n .addComponent(txt_kabaktatlisi)\n .addComponent(txt_kemalpasa)\n .addComponent(txt_sutlukadayif, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(txt_supangle, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(60, 60, 60)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(turkkahvesi)\n .addComponent(cay)\n .addComponent(americano)\n .addComponent(latte)\n .addComponent(limonata)\n .addComponent(milkshake)\n .addComponent(mojito))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(txt_cay, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txt_turkkahvesi, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txt_americano, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txt_latte, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txt_limonata, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txt_milkshake, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txt_mojito, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(sutlukadayif)\n .addComponent(cay)\n .addComponent(txt_sutlukadayif, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txt_cay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(kemalpasa)\n .addComponent(turkkahvesi)\n .addComponent(txt_kemalpasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txt_turkkahvesi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(kabaktatlisi)\n .addComponent(americano)\n .addComponent(txt_kabaktatlisi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txt_americano, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(ekmekkadayifi)\n .addComponent(latte)\n .addComponent(txt_ekmekkadayifi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txt_latte, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(mozaikpasta)\n .addComponent(limonata)\n .addComponent(txt_mozaikpasta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txt_limonata, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cheesscake)\n .addComponent(milkshake)\n .addComponent(txt_cheesscake, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txt_milkshake, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(supangle)\n .addComponent(mojito)\n .addComponent(txt_supangle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txt_mojito, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n btnce.setText(\"CE\");\n btnce.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnceActionPerformed(evt);\n }\n });\n\n ekran.setText(\"0\");\n\n btnc.setText(\"C\");\n\n btnbckspc.setText(\"←\");\n btnbckspc.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnbckspcActionPerformed(evt);\n }\n });\n\n btndivided.setText(\"÷\");\n btndivided.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btndividedActionPerformed(evt);\n }\n });\n\n btn7.setText(\"7\");\n btn7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn7ActionPerformed(evt);\n }\n });\n\n btn8.setText(\"8\");\n btn8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn8ActionPerformed(evt);\n }\n });\n\n btn9.setText(\"9\");\n btn9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn9ActionPerformed(evt);\n }\n });\n\n btnmultiple.setText(\"x\");\n btnmultiple.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnmultipleActionPerformed(evt);\n }\n });\n\n btn4.setText(\"4\");\n btn4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn4ActionPerformed(evt);\n }\n });\n\n btn5.setText(\"5\");\n btn5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn5ActionPerformed(evt);\n }\n });\n\n btn6.setText(\"6\");\n btn6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn6ActionPerformed(evt);\n }\n });\n\n btnminus.setText(\"-\");\n btnminus.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnminusActionPerformed(evt);\n }\n });\n\n btn1.setText(\"1\");\n btn1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn1ActionPerformed(evt);\n }\n });\n\n btn2.setText(\"2\");\n btn2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn2ActionPerformed(evt);\n }\n });\n\n btn3.setText(\"3\");\n btn3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn3ActionPerformed(evt);\n }\n });\n\n btnplus.setText(\"+\");\n btnplus.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnplusActionPerformed(evt);\n }\n });\n\n btnposneg.setText(\"+ -\");\n\n btn0.setText(\"0\");\n btn0.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn0ActionPerformed(evt);\n }\n });\n\n btndot.setText(\".\");\n btndot.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btndotActionPerformed(evt);\n }\n });\n\n btnequal.setText(\"=\");\n btnequal.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnequalActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(ekran)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(btnposneg, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btn0, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(btn1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btn2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(btn4, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btn5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(btn7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnce, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnc, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btn8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnbckspc, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btn9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btn6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btn3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btndot, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btndivided, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnmultiple, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnminus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnplus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnequal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(ekran, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnce, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(btnc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnbckspc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btndivided, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btn7, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(btn8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btn9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnmultiple, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btn4, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(btn5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btn6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnminus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btn1, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(btn2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btn3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnplus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnposneg, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(btn0, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btndot, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnequal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jTabbedPane1.addTab(\"Hesap Makinesi\", jPanel5);\n\n faturaalan.setColumns(20);\n faturaalan.setRows(5);\n jScrollPane1.setViewportView(faturaalan);\n\n javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 439, Short.MAX_VALUE)\n );\n\n jTabbedPane1.addTab(\"Fatura\", jPanel6);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 309, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTabbedPane1)\n );\n\n jLabel2.setText(\"İçecekler Toplamı\");\n\n jLabel3.setText(\"Tatlılar Toplamı\");\n\n jLabel4.setText(\"Bahşiş\");\n\n jLabel5.setText(\"Brüt Toplam\");\n\n jLabel6.setText(\"KDV\");\n\n jLabel7.setText(\"Net Toplam\");\n\n txt_iceceklertoplam.setText(\"0\");\n txt_iceceklertoplam.setEnabled(false);\n\n txt_tatlilartoplam.setText(\"0\");\n txt_tatlilartoplam.setEnabled(false);\n\n txt_bahsis.setText(\"0\");\n txt_bahsis.setEnabled(false);\n\n txt_bruttoplam.setText(\"0\");\n txt_bruttoplam.setEnabled(false);\n\n txt_kdv.setText(\"0\");\n txt_kdv.setEnabled(false);\n\n txt_nettoplam.setText(\"0\");\n txt_nettoplam.setEnabled(false);\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7))\n .addGap(18, 18, 18)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txt_nettoplam, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)\n .addComponent(txt_kdv)\n .addComponent(txt_bruttoplam)\n .addComponent(txt_bahsis)\n .addComponent(txt_tatlilartoplam)\n .addComponent(txt_iceceklertoplam, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap())\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txt_iceceklertoplam, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txt_tatlilartoplam, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txt_bahsis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txt_bruttoplam, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(txt_kdv, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(txt_nettoplam, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n toplam.setText(\"Toplam\");\n toplam.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n toplamMouseClicked(evt);\n }\n });\n\n fatura.setText(\"Fatura\");\n fatura.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n faturaMouseClicked(evt);\n }\n });\n\n reset.setText(\"Reset\");\n reset.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n resetActionPerformed(evt);\n }\n });\n\n kapat.setText(\"Kapat\");\n kapat.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n kapatActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"PDF\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);\n jPanel7.setLayout(jPanel7Layout);\n jPanel7Layout.setHorizontalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(toplam, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(fatura, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(reset, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(kapat, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n jPanel7Layout.setVerticalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(toplam, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(2, 2, 2)\n .addComponent(fatura)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(reset)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(kapat)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 873, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 611, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n );\n\n pack();\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n \n }", "private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void blockBuildIt1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tSystem.out.println(\"버튼을 눌렀구만?\");\r\n\t\t\r\n\t\tint jum =0;\r\n\t\t\r\n\t\tfor (JCheckBox box : qq_1) {\r\n\t\t\tif(box.isSelected())\r\n\t\t\t\tjum+=20;\r\n\t\t}\r\n\t\tif(qq_2.get(2).isSelected())\r\n\t\t\tjum+=20;\r\n\t\t\r\n\t\tres.setText(\"결과:\"+jum);\r\n\t}", "private void jcbY_AxisActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n ckBedcoverKecil = new javax.swing.JCheckBox();\n ckBedcoverBesar = new javax.swing.JCheckBox();\n ckHelm = new javax.swing.JCheckBox();\n ckBedcoverJumbo = new javax.swing.JCheckBox();\n ckJaket = new javax.swing.JCheckBox();\n ckHanduk = new javax.swing.JCheckBox();\n ckSelimutKecil = new javax.swing.JCheckBox();\n ckSelimutBesar = new javax.swing.JCheckBox();\n ckSepatuCat = new javax.swing.JCheckBox();\n ckSepatuKulit = new javax.swing.JCheckBox();\n tfBedcoverBesar = new javax.swing.JTextField();\n tfBedcoverKecil = new javax.swing.JTextField();\n tfHelm = new javax.swing.JTextField();\n tfBedcoverJumbo = new javax.swing.JTextField();\n tfJaket = new javax.swing.JTextField();\n tfHanduk = new javax.swing.JTextField();\n tfSelimutKecil = new javax.swing.JTextField();\n tfSelimutBesar = new javax.swing.JTextField();\n tfSepatuCat = new javax.swing.JTextField();\n tfSepatuKulit = new javax.swing.JTextField();\n ckKarpetKecil = new javax.swing.JCheckBox();\n tfKarpetKecil = new javax.swing.JTextField();\n ckKarpetSedang = new javax.swing.JCheckBox();\n tfKarpetSedang = new javax.swing.JTextField();\n ckKarpetBesar = new javax.swing.JCheckBox();\n tfKarpetBesar = new javax.swing.JTextField();\n ckKarpetJumbo = new javax.swing.JCheckBox();\n tfKarpetJumbo = new javax.swing.JTextField();\n ckJas = new javax.swing.JCheckBox();\n tfJas = new javax.swing.JTextField();\n ckKebaya = new javax.swing.JCheckBox();\n tfKebaya = new javax.swing.JTextField();\n ckBlezer = new javax.swing.JCheckBox();\n tfBlezer = new javax.swing.JTextField();\n ckRompi = new javax.swing.JCheckBox();\n tfRompi = new javax.swing.JTextField();\n ckBonekaKecil = new javax.swing.JCheckBox();\n tfBonekaKecil = new javax.swing.JTextField();\n ckBonekaSedang = new javax.swing.JCheckBox();\n tfBonekaSedang = new javax.swing.JTextField();\n ckBonekaBesar = new javax.swing.JCheckBox();\n tfBonekaBesar = new javax.swing.JTextField();\n ckBonekaJumbo = new javax.swing.JCheckBox();\n tfBonekaJumbo = new javax.swing.JTextField();\n ckGordenTipis = new javax.swing.JCheckBox();\n tfGordenTipis = new javax.swing.JTextField();\n ckGordenTebal = new javax.swing.JCheckBox();\n tfGordenTebal = new javax.swing.JTextField();\n ckSpreiKecil = new javax.swing.JCheckBox();\n tfSpreiKecil = new javax.swing.JTextField();\n ckSpreiBesar = new javax.swing.JCheckBox();\n tfSpreiBesar = new javax.swing.JTextField();\n ckKeset = new javax.swing.JCheckBox();\n tfKeset = new javax.swing.JTextField();\n ckTasKecil = new javax.swing.JCheckBox();\n tfTasKecil = new javax.swing.JTextField();\n ckTasBesar = new javax.swing.JCheckBox();\n tfTasBesar = new javax.swing.JTextField();\n ckTravelBag = new javax.swing.JCheckBox();\n tfTravelBag = new javax.swing.JTextField();\n btHapus = new javax.swing.JButton();\n btHitung = new javax.swing.JButton();\n btBatal = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n tfHarga = new javax.swing.JTextField();\n btBayar1 = new javax.swing.JButton();\n jPanel4 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tabel = new javax.swing.JTable();\n jLabel3 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Special Page\");\n\n jPanel1.setBackground(new java.awt.Color(0, 204, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Dialog\", 0, 30)); // NOI18N\n jLabel1.setText(\"HARGA\");\n\n ckBedcoverKecil.setBackground(new java.awt.Color(255, 255, 255));\n ckBedcoverKecil.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckBedcoverKecil.setText(\"Bed Cover Kecil\");\n ckBedcoverKecil.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n ckBedcoverKecilMouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n ckBedcoverKecilMouseEntered(evt);\n }\n });\n ckBedcoverKecil.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ckBedcoverKecilActionPerformed(evt);\n }\n });\n\n ckBedcoverBesar.setBackground(new java.awt.Color(255, 255, 255));\n ckBedcoverBesar.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckBedcoverBesar.setText(\"Bed Cover Besar\");\n\n ckHelm.setBackground(new java.awt.Color(255, 255, 255));\n ckHelm.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckHelm.setText(\"Helm\");\n\n ckBedcoverJumbo.setBackground(new java.awt.Color(255, 255, 255));\n ckBedcoverJumbo.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckBedcoverJumbo.setText(\"Bed Cover Jumbo\");\n\n ckJaket.setBackground(new java.awt.Color(255, 255, 255));\n ckJaket.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckJaket.setText(\"Jaket Kulit\");\n\n ckHanduk.setBackground(new java.awt.Color(255, 255, 255));\n ckHanduk.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckHanduk.setText(\"Handuk\");\n\n ckSelimutKecil.setBackground(new java.awt.Color(255, 255, 255));\n ckSelimutKecil.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckSelimutKecil.setText(\"Selimut Kecil\");\n\n ckSelimutBesar.setBackground(new java.awt.Color(255, 255, 255));\n ckSelimutBesar.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckSelimutBesar.setText(\"Selimut Besar\");\n\n ckSepatuCat.setBackground(new java.awt.Color(255, 255, 255));\n ckSepatuCat.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckSepatuCat.setText(\"Sepatu Cat\");\n\n ckSepatuKulit.setBackground(new java.awt.Color(255, 255, 255));\n ckSepatuKulit.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckSepatuKulit.setText(\"Sepatu Kulit\");\n\n tfBedcoverBesar.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n tfBedcoverKecil.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n tfHelm.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n tfBedcoverJumbo.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n tfJaket.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n tfHanduk.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n tfSelimutKecil.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n tfSelimutBesar.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n tfSepatuCat.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n tfSepatuKulit.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckKarpetKecil.setBackground(new java.awt.Color(255, 255, 255));\n ckKarpetKecil.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckKarpetKecil.setText(\"Karpet Kecil\");\n\n tfKarpetKecil.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckKarpetSedang.setBackground(new java.awt.Color(255, 255, 255));\n ckKarpetSedang.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckKarpetSedang.setText(\"Karpet Sedang\");\n\n tfKarpetSedang.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckKarpetBesar.setBackground(new java.awt.Color(255, 255, 255));\n ckKarpetBesar.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckKarpetBesar.setText(\"Karpet Besar\");\n\n tfKarpetBesar.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckKarpetJumbo.setBackground(new java.awt.Color(255, 255, 255));\n ckKarpetJumbo.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckKarpetJumbo.setText(\"Karpet Jumbo\");\n\n tfKarpetJumbo.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckJas.setBackground(new java.awt.Color(255, 255, 255));\n ckJas.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckJas.setText(\"Jas\");\n\n tfJas.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckKebaya.setBackground(new java.awt.Color(255, 255, 255));\n ckKebaya.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckKebaya.setText(\"Kebaya\");\n\n tfKebaya.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckBlezer.setBackground(new java.awt.Color(255, 255, 255));\n ckBlezer.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckBlezer.setText(\"Blezer\");\n\n tfBlezer.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckRompi.setBackground(new java.awt.Color(255, 255, 255));\n ckRompi.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckRompi.setText(\"Rompi\");\n\n tfRompi.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckBonekaKecil.setBackground(new java.awt.Color(255, 255, 255));\n ckBonekaKecil.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckBonekaKecil.setText(\"Boneka Kecil\");\n\n tfBonekaKecil.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckBonekaSedang.setBackground(new java.awt.Color(255, 255, 255));\n ckBonekaSedang.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckBonekaSedang.setText(\"Boneka Sedang\");\n\n tfBonekaSedang.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckBonekaBesar.setBackground(new java.awt.Color(255, 255, 255));\n ckBonekaBesar.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckBonekaBesar.setText(\"Boneka Besar\");\n\n tfBonekaBesar.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckBonekaJumbo.setBackground(new java.awt.Color(255, 255, 255));\n ckBonekaJumbo.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckBonekaJumbo.setText(\"Boneka Jumbo\");\n\n tfBonekaJumbo.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckGordenTipis.setBackground(new java.awt.Color(255, 255, 255));\n ckGordenTipis.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckGordenTipis.setText(\"Gorden Tipis\");\n\n tfGordenTipis.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckGordenTebal.setBackground(new java.awt.Color(255, 255, 255));\n ckGordenTebal.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckGordenTebal.setText(\"Gorden Tebal\");\n\n tfGordenTebal.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckSpreiKecil.setBackground(new java.awt.Color(255, 255, 255));\n ckSpreiKecil.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckSpreiKecil.setText(\"Sprei Kecil\");\n\n tfSpreiKecil.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckSpreiBesar.setBackground(new java.awt.Color(255, 255, 255));\n ckSpreiBesar.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckSpreiBesar.setText(\"Sprei Besar\");\n\n tfSpreiBesar.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckKeset.setBackground(new java.awt.Color(255, 255, 255));\n ckKeset.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckKeset.setText(\"Keset\");\n\n tfKeset.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckTasKecil.setBackground(new java.awt.Color(255, 255, 255));\n ckTasKecil.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckTasKecil.setText(\"Tas Kecil\");\n\n tfTasKecil.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckTasBesar.setBackground(new java.awt.Color(255, 255, 255));\n ckTasBesar.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckTasBesar.setText(\"Tas Besar\");\n\n tfTasBesar.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n ckTravelBag.setBackground(new java.awt.Color(255, 255, 255));\n ckTravelBag.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n ckTravelBag.setText(\"Travel Bag\");\n\n tfTravelBag.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n btHapus.setFont(new java.awt.Font(\"Dialog\", 0, 18)); // NOI18N\n btHapus.setText(\"HAPUS\");\n btHapus.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btHapusActionPerformed(evt);\n }\n });\n\n btHitung.setFont(new java.awt.Font(\"Dialog\", 0, 18)); // NOI18N\n btHitung.setText(\"HITUNG\");\n btHitung.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btHitungActionPerformed(evt);\n }\n });\n\n btBatal.setFont(new java.awt.Font(\"Dialog\", 0, 20)); // NOI18N\n btBatal.setText(\"BATAL\");\n btBatal.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btBatalActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Dialog\", 0, 48)); // NOI18N\n jLabel2.setText(\"SPECIAL\");\n\n tfHarga.setFont(new java.awt.Font(\"Dialog\", 0, 24)); // NOI18N\n tfHarga.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tfHargaActionPerformed(evt);\n }\n });\n\n btBayar1.setFont(new java.awt.Font(\"Dialog\", 0, 20)); // NOI18N\n btBayar1.setText(\"BAYAR\");\n btBayar1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btBayar1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(290, 290, 290)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(ckBedcoverKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfBedcoverKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckKarpetKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfKarpetKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckBonekaBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfBonekaBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(ckBedcoverBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfBedcoverBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckKarpetSedang, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfKarpetSedang, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckBonekaJumbo, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfBonekaJumbo, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(ckBedcoverJumbo, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfBedcoverJumbo, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckKarpetBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfKarpetBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckGordenTipis, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfGordenTipis, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(ckHelm, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfHelm, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckKarpetJumbo, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfKarpetJumbo, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckGordenTebal, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfGordenTebal, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(ckHanduk, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfHanduk, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckJas, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfJas, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckSpreiKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfSpreiKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(ckJaket, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfJaket, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckKebaya, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfKebaya, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckSpreiBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfSpreiBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(ckSelimutBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfSelimutBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckBlezer, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfBlezer, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckKeset, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfKeset, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(ckSelimutKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfSelimutKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckRompi, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfRompi, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckTasKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfTasKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(ckSepatuKulit, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfSepatuKulit, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckBonekaKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfBonekaKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckTasBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfTasBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(ckSepatuCat, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfSepatuCat, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckBonekaSedang, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfBonekaSedang, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(ckTravelBag, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfTravelBag, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(btBatal, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(btHapus, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(btHitung, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(20, 20, 20)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(tfHarga, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(560, 560, 560)\n .addComponent(btBayar1, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(25, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ckBedcoverKecil)\n .addComponent(tfBedcoverKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckKarpetKecil)\n .addComponent(tfKarpetKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckBonekaBesar)\n .addComponent(tfBonekaBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ckBedcoverBesar)\n .addComponent(tfBedcoverBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckKarpetSedang)\n .addComponent(tfKarpetSedang, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckBonekaJumbo)\n .addComponent(tfBonekaJumbo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ckBedcoverJumbo)\n .addComponent(tfBedcoverJumbo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckKarpetBesar)\n .addComponent(tfKarpetBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckGordenTipis)\n .addComponent(tfGordenTipis, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ckHelm)\n .addComponent(tfHelm, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckKarpetJumbo)\n .addComponent(tfKarpetJumbo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckGordenTebal)\n .addComponent(tfGordenTebal, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ckHanduk)\n .addComponent(tfHanduk, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckJas)\n .addComponent(tfJas, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckSpreiKecil)\n .addComponent(tfSpreiKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ckJaket)\n .addComponent(tfJaket, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckKebaya)\n .addComponent(tfKebaya, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckSpreiBesar)\n .addComponent(tfSpreiBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ckSelimutBesar)\n .addComponent(tfSelimutBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckBlezer)\n .addComponent(tfBlezer, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckKeset)\n .addComponent(tfKeset, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ckSelimutKecil)\n .addComponent(tfSelimutKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckRompi)\n .addComponent(tfRompi, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckTasKecil)\n .addComponent(tfTasKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ckSepatuKulit)\n .addComponent(tfSepatuKulit, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckBonekaKecil)\n .addComponent(tfBonekaKecil, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckTasBesar)\n .addComponent(tfTasBesar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ckSepatuCat)\n .addComponent(tfSepatuCat, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckBonekaSedang)\n .addComponent(tfBonekaSedang, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ckTravelBag)\n .addComponent(tfTravelBag, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btBatal, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btHapus, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btHitung, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tfHarga, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addComponent(btBayar1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n jPanel4.setBackground(new java.awt.Color(0, 204, 255));\n jPanel4.setLayout(null);\n\n tabel.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null},\n {null, null, null},\n {null, null, null},\n {null, null, null}\n },\n new String [] {\n \"No\", \"Jenis\", \"Harga\"\n }\n ));\n jScrollPane1.setViewportView(tabel);\n\n jPanel4.add(jScrollPane1);\n jScrollPane1.setBounds(50, 130, 285, 345);\n\n jLabel3.setBackground(new java.awt.Color(0, 0, 0));\n jLabel3.setFont(new java.awt.Font(\"Dialog\", 0, 36)); // NOI18N\n jLabel3.setText(\"LIST HARGA\");\n jPanel4.add(jLabel3);\n jLabel3.setBounds(80, 40, 210, 47);\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 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 387, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n setSize(new java.awt.Dimension(1147, 616));\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jCheckBox1 = new javax.swing.JCheckBox();\n jPanel3 = new javax.swing.JPanel();\n panel1 = new java.awt.Panel();\n jLabel1 = new javax.swing.JLabel();\n label2 = new java.awt.Label();\n textField1 = new java.awt.TextField();\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n bilangan1 = new javax.swing.JTextField();\n bilangan2 = new javax.swing.JTextField();\n hitung = new javax.swing.JButton();\n reset = new javax.swing.JButton();\n keluar = new javax.swing.JButton();\n jPanel4 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n hasil = new javax.swing.JTextField();\n\n jCheckBox1.setText(\"jCheckBox1\");\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(102, 255, 102));\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n panel1.setBackground(new java.awt.Color(153, 255, 153));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"Penjumlahan Bilangan\");\n\n label2.setText(\"label2\");\n\n textField1.setText(\"textField1\");\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 153));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setText(\"BILANGAN 1 :\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel3.setText(\"BILANGAN 2 :\");\n\n bilangan1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bilangan1ActionPerformed(evt);\n }\n });\n\n bilangan2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bilangan2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addGap(29, 29, 29)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(bilangan1)\n .addComponent(bilangan2, javax.swing.GroupLayout.DEFAULT_SIZE, 168, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(bilangan1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(bilangan2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(13, Short.MAX_VALUE))\n );\n\n hitung.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n hitung.setText(\"HITUNG\");\n hitung.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n hitungActionPerformed(evt);\n }\n });\n\n reset.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n reset.setText(\"RESET\");\n reset.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n resetActionPerformed(evt);\n }\n });\n\n keluar.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n keluar.setText(\"KELUAR\");\n keluar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n keluarActionPerformed(evt);\n }\n });\n\n jPanel4.setBackground(new java.awt.Color(255, 255, 51));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel4.setText(\"HASIL :\");\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel4)\n .addGap(66, 66, 66)\n .addComponent(hasil)\n .addContainerGap())\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addContainerGap(21, Short.MAX_VALUE)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(hasil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout panel1Layout = new javax.swing.GroupLayout(panel1);\n panel1.setLayout(panel1Layout);\n panel1Layout.setHorizontalGroup(\n panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panel1Layout.createSequentialGroup()\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panel1Layout.createSequentialGroup()\n .addGap(63, 63, 63)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(panel1Layout.createSequentialGroup()\n .addComponent(hitung)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 51, Short.MAX_VALUE)\n .addComponent(reset)\n .addGap(37, 37, 37)\n .addComponent(keluar))\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(panel1Layout.createSequentialGroup()\n .addGap(88, 88, 88)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 156, Short.MAX_VALUE))\n );\n panel1Layout.setVerticalGroup(\n panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(reset)\n .addComponent(keluar)\n .addComponent(hitung))\n .addGap(41, 41, 41))\n );\n\n getContentPane().add(panel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 400, 300));\n\n pack();\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField7ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n lblCuerpo = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n ckCabeza = new javax.swing.JCheckBox();\n ckCuello = new javax.swing.JCheckBox();\n ckHombros = new javax.swing.JCheckBox();\n ckBrazos = new javax.swing.JCheckBox();\n ckCodos = new javax.swing.JCheckBox();\n ckManos = new javax.swing.JCheckBox();\n ckPecho = new javax.swing.JCheckBox();\n ckEstomago = new javax.swing.JCheckBox();\n ckEspalda = new javax.swing.JCheckBox();\n ckPiernas = new javax.swing.JCheckBox();\n ckRodillas = new javax.swing.JCheckBox();\n ckPies = new javax.swing.JCheckBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n getContentPane().setLayout(new java.awt.BorderLayout());\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Cuerpo Humano\"));\n jPanel1.setLayout(new java.awt.BorderLayout());\n\n lblCuerpo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jPanel1.add(lblCuerpo, java.awt.BorderLayout.CENTER);\n\n getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Opciones\"));\n jPanel2.setLayout(new java.awt.GridLayout(7, 2, 5, 2));\n\n ckCabeza.setText(\"Cabeza\");\n ckCabeza.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckCabezaItemStateChanged(evt);\n }\n });\n jPanel2.add(ckCabeza);\n\n ckCuello.setText(\"Cuello\");\n ckCuello.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckCuelloItemStateChanged(evt);\n }\n });\n jPanel2.add(ckCuello);\n\n ckHombros.setText(\"Hombros\");\n ckHombros.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckHombrosItemStateChanged(evt);\n }\n });\n jPanel2.add(ckHombros);\n\n ckBrazos.setText(\"Brazos\");\n ckBrazos.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckBrazosItemStateChanged(evt);\n }\n });\n jPanel2.add(ckBrazos);\n\n ckCodos.setText(\"Codos\");\n ckCodos.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckCodosItemStateChanged(evt);\n }\n });\n jPanel2.add(ckCodos);\n\n ckManos.setText(\"Manos\");\n ckManos.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckManosItemStateChanged(evt);\n }\n });\n jPanel2.add(ckManos);\n\n ckPecho.setText(\"Pecho\");\n ckPecho.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckPechoItemStateChanged(evt);\n }\n });\n jPanel2.add(ckPecho);\n\n ckEstomago.setText(\"Estomago\");\n ckEstomago.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckEstomagoItemStateChanged(evt);\n }\n });\n jPanel2.add(ckEstomago);\n\n ckEspalda.setText(\"Espalda\");\n ckEspalda.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckEspaldaItemStateChanged(evt);\n }\n });\n jPanel2.add(ckEspalda);\n\n ckPiernas.setText(\"Piernas\");\n ckPiernas.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckPiernasItemStateChanged(evt);\n }\n });\n jPanel2.add(ckPiernas);\n\n ckRodillas.setText(\"Rodillas\");\n ckRodillas.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckRodillasItemStateChanged(evt);\n }\n });\n jPanel2.add(ckRodillas);\n\n ckPies.setText(\"Pies\");\n ckPies.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckPiesItemStateChanged(evt);\n }\n });\n jPanel2.add(ckPies);\n\n getContentPane().add(jPanel2, java.awt.BorderLayout.EAST);\n\n setSize(new java.awt.Dimension(598, 480));\n setLocationRelativeTo(null);\n }", "private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJCheckBox x = (JCheckBox) e.getSource();\n\t\t\t\tif(x.isSelected()){\n\t\t\t\t\thost_txtfield.setText(\"localhost\");\n\t\t\t\t\tport_txtfield.setText(\"27017\");\n\t\t\t\t\thost_txtfield.setEnabled(false);\n\t\t\t\t\tport_txtfield.setEnabled(false);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\thost_txtfield.setText(\"\");\n\t\t\t\t\tport_txtfield.setText(\"\");\n\t\t\t\t\thost_txtfield.setEnabled(true);\n\t\t\t\t\tport_txtfield.setEnabled(true);\n\t\t\t\t\thost_txtfield.requestFocus();\n\t\t\t\t}\n\t\t\t}", "private void jfanoActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n cb1 = new javax.swing.JCheckBox();\n cb2 = new javax.swing.JCheckBox();\n cb3 = new javax.swing.JCheckBox();\n cb4 = new javax.swing.JCheckBox();\n cb5 = new javax.swing.JCheckBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n t1 = new javax.swing.JTextField();\n t2 = new javax.swing.JTextField();\n t3 = new javax.swing.JTextField();\n t4 = new javax.swing.JTextField();\n t5 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n t6 = new javax.swing.JTextField();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel4.setText(\"Milk 500 ml\");\n\n jLabel5.setText(\"Paneer\");\n\n jLabel6.setText(\"Curd\");\n\n jLabel7.setText(\"Lassi\");\n\n jLabel8.setText(\"Flavored Milk\");\n\n cb1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cb1ActionPerformed(evt);\n }\n });\n\n cb4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cb4ActionPerformed(evt);\n }\n });\n\n cb5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cb5ActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Product:-\");\n\n jLabel2.setText(\"Selection:-\");\n\n jLabel3.setText(\"Quantity:-\");\n\n jButton1.setText(\"Get Total\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Exit\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"Price\");\n\n jLabel10.setText(\"40\");\n\n jLabel11.setText(\"50\");\n\n jLabel12.setText(\"25\");\n\n jLabel13.setText(\"10\");\n\n jLabel14.setText(\"15\");\n\n jLabel15.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\Saket Shivam\\\\Desktop\\\\SD project\\\\Nandini Logo-1579849801.jpg\")); // NOI18N\n jLabel15.setText(\"jLabel15\");\n\n jLabel16.setText(\"Total:-\");\n\n t6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n t6ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Proceed to checkout\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setText(\"Clear\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(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(63, 63, 63)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 715, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(153, 153, 153)\n .addComponent(jLabel10))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(160, 160, 160)\n .addComponent(jLabel9))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addComponent(jLabel5)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6)\n .addComponent(jLabel7)))\n .addGap(142, 142, 142)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel11)\n .addComponent(jLabel13)\n .addComponent(jLabel14)\n .addComponent(jLabel12)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel16)\n .addGap(190, 190, 190)\n .addComponent(t6, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(45, 45, 45)\n .addComponent(jButton3)\n .addGap(18, 18, 18)\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(cb5)\n .addComponent(cb4)\n .addComponent(cb3)\n .addComponent(cb2)\n .addComponent(cb1))\n .addGap(141, 141, 141)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(jButton2)))))\n .addContainerGap(54, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(34, 34, 34)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jLabel10))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jLabel11))\n .addGap(89, 89, 89)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jLabel14))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(jLabel13))\n .addGap(90, 90, 90))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel9))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(23, 23, 23)\n .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cb3)\n .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(cb1)\n .addGap(25, 25, 25)\n .addComponent(cb2))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jLabel12)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(cb4)))\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cb5))\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel16)\n .addComponent(t6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton3)\n .addComponent(jButton2)\n .addComponent(jButton4))\n .addGap(152, 152, 152))\n );\n\n pack();\n }", "private void jTextField19ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton3MouseClicked(java.awt.event.MouseEvent evt) {\n }", "private void jComboBox3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void BanalisisActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\n\tpublic void onClick(ClickEvent event) {\n\t\tif (event.getSource() == select) {\n\t\t\tfor (int row = 0; row < field.getRowCount(); row++) {\n\t\t\t\tCheckBox cb = (CheckBox) field.getWidget(row, 2);\n\t\t\t\tif (cb == null) {Window.alert(\"select \" + row);}\n\t\t\t\tcb.setValue(true);\n\t\t\t}\n\t\t}\n\t\telse if (event.getSource() == remove) {\n\t\t\tfor (int row = 0; row < field.getRowCount(); row++) {\n\t\t\t\tCheckBox cb = (CheckBox) field.getWidget(row, 2);\n\t\t\t\tif (cb == null) {Window.alert(\"remove \" + row);}\n\t\t\t\tcb.setValue(false);\n\t\t\t}\t\t\t\n\t\t}\n\t\telse if (isEnabled()) {\n\t\t\tHTMLTable.Cell cell = field.getCellForEvent(event);\n\t\t\tint selectedRow = cell.getRowIndex();\n\t\t\tCheckBox cb = (CheckBox) field.getWidget(selectedRow, 2);\n\t\t\tcb.setValue (!cb.getValue());\n\t\t\tfireChange(this);\n\t\t}\n\t}", "public void itemStateChanged(ItemEvent ie) {\n JCheckBox check = (JCheckBox)ie.getSource();\n cb_selection = check.getText(); \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n cb_editar = new javax.swing.JCheckBox();\n jPanel2 = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n formMouseDragged(evt);\n }\n });\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n formMousePressed(evt);\n }\n });\n\n jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.LINE_AXIS));\n\n cb_editar.setText(\"Editar\");\n cb_editar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cb_editarActionPerformed(evt);\n }\n });\n jPanel1.add(cb_editar);\n\n getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_END);\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 682, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 580, Short.MAX_VALUE)\n );\n\n getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER);\n\n pack();\n }", "private void jComboBox4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void darahPasienBoxActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void phantichActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void actionPerformed(ActionEvent evt) {\n Object source = evt.getSource();\n\n if (source instanceof JCheckBoxMenuItem) {\n if ((JCheckBoxMenuItem) source == disableAll) {\n if (disableAll.isSelected()) {\n allocation.setSelected(false);\n remaining.setSelected(false);\n observability.setSelected(false);\n zoneOfAvoidance.setSelected(false);\n } else {\n allocation.setSelected(true);\n remaining.setSelected(true);\n observability.setSelected(true);\n zoneOfAvoidance.setSelected(true);\n }\n } else {\n disableAll.setSelected(false);\n }\n\n localQuerytool.setAllocationConstraint(!allocation.isSelected());\n localQuerytool.setRemainingConstraint(!remaining.isSelected());\n localQuerytool.setObservabilityConstraint(\n !observability.isSelected());\n localQuerytool.setZoneOfAvoidanceConstraint(\n !zoneOfAvoidance.isSelected());\n if (allocation.isSelected() && remaining.isSelected()\n && observability.isSelected()\n && zoneOfAvoidance.isSelected()) {\n // If all selected - set to green light\n URL url = ClassLoader.getSystemResource(\"green_light1.gif\");\n ImageIcon icon = new ImageIcon(url);\n InfoPanel.searchButton.setIcon(icon);\n table.setBackground(Color.WHITE);\n\n } else if (!allocation.isSelected() && !remaining.isSelected()\n && !observability.isSelected()\n && !zoneOfAvoidance.isSelected()) {\n // No constraints disabled - set to red\n URL url = ClassLoader.getSystemResource(\"red_light1.gif\");\n ImageIcon icon = new ImageIcon(url);\n InfoPanel.searchButton.setIcon(icon);\n table.setBackground(Color.RED.darker());\n\n } else {\n // Some constraints disabled - set to amber\n URL url = ClassLoader.getSystemResource(\"amber_light1.gif\");\n ImageIcon icon = new ImageIcon(url);\n InfoPanel.searchButton.setIcon(icon);\n table.setBackground(Color.YELLOW.darker());\n }\n } else if (source instanceof JMenuItem) {\n JMenuItem thisItem = (JMenuItem) source;\n String thisText = thisItem.getText();\n\n if (INDEX.equalsIgnoreCase(thisText)) {\n new HelpPage();\n\n } else if (ABOUT.equalsIgnoreCase(thisText)) {\n String version = System.getProperty(\"version\", \"unknown\");\n JOptionPane.showMessageDialog(null,\n \"Build corresponds to Git commit : \\n\" + version);\n\n } else if (RELOAD_CAL.equalsIgnoreCase(thisText)) {\n calibrationMenu.reload();\n\n } else if (EXIT.equalsIgnoreCase(thisText)) {\n exitQT();\n\n } else if (COLUMNS.equalsIgnoreCase(thisText)) {\n new ColumnSelector(this);\n\n } else if (LOG.equalsIgnoreCase(thisText)) {\n LogViewer viewer = new LogViewer();\n viewer.showLog(System.getProperty(\"QT_LOG_DIR\") + \"/QT.log\");\n\n } else if (INFRA_RED.equalsIgnoreCase(thisText)) {\n infoPanel.getSatPanel().setDisplay(thisItem.getText());\n\n } else if (WATER_VAPOUR.equalsIgnoreCase(thisText)) {\n infoPanel.getSatPanel().setDisplay(thisItem.getText());\n }\n } else if (source instanceof JButton) {\n JButton thisButton = (JButton) source;\n\n if (thisButton.getText().equals(EXIT)) {\n exitQT();\n } else {\n logger.debug(\"Popup send MSB\");\n performSendToStagingArea();\n }\n }\n }", "private void jTextField12ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField12ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox5ActionPerformed\n // TODO add your handling code here:\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jTextField1 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jCheckBox4 = new javax.swing.JCheckBox();\n jCheckBox3 = new javax.swing.JCheckBox();\n jCheckBox6 = new javax.swing.JCheckBox();\n jCheckBox5 = new javax.swing.JCheckBox();\n jLabel7 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jTextField10 = new javax.swing.JTextField();\n jTextField11 = new javax.swing.JTextField();\n jTextField12 = new javax.swing.JTextField();\n jButton5 = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jTextField1.setText(\"0\");\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jTextField6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField6ActionPerformed(evt);\n }\n });\n\n jTextField2.setText(\"0\");\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jTextField3.setText(\"0\");\n jTextField3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField3ActionPerformed(evt);\n }\n });\n\n jTextField4.setText(\"0\");\n jTextField4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField4ActionPerformed(evt);\n }\n });\n\n jTextField5.setText(\"0\");\n\n jButton1.setText(\"Exit\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Reset\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Pay Now\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jCheckBox1.setText(\"Alvin\");\n jCheckBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox1ActionPerformed(evt);\n }\n });\n\n jCheckBox2.setText(\"Vicks\");\n jCheckBox2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox2ActionPerformed(evt);\n }\n });\n\n jCheckBox4.setText(\"iodex\");\n jCheckBox4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox4ActionPerformed(evt);\n }\n });\n\n jCheckBox3.setText(\"MinPain\");\n jCheckBox3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox3ActionPerformed(evt);\n }\n });\n\n jCheckBox6.setText(\"Dcold\");\n jCheckBox6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox6ActionPerformed(evt);\n }\n });\n\n jCheckBox5.setText(\"Crosin\");\n jCheckBox5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox5ActionPerformed(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Lucida Grande\", 0, 40)); // NOI18N\n jLabel7.setText(\"Pharmacy System\");\n\n jLabel1.setText(\"Customer Name\");\n\n jLabel2.setText(\"Account No\");\n\n jLabel3.setText(\"Phone Number\");\n\n jButton5.setText(\"Calculate\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n jLabel4.setText(\"Sub Total\");\n\n jLabel5.setText(\"Tax\");\n\n jLabel6.setText(\"Total Amount\");\n\n jLabel8.setText(\"0\");\n jLabel8.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n\n jLabel9.setText(\"0\");\n jLabel9.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n\n jLabel10.setText(\"0\");\n jLabel10.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(120, 120, 120)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jCheckBox6)\n .addComponent(jCheckBox5))\n .addGap(27, 27, 27)))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE))))\n .addGap(86, 86, 86)\n .addComponent(jButton5)\n .addGap(26, 26, 26)\n .addComponent(jButton2)\n .addGap(45, 45, 45)\n .addComponent(jButton1))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(111, 111, 111)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox3)\n .addComponent(jCheckBox4)\n .addComponent(jCheckBox1))\n .addGap(43, 43, 43)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(121, 121, 121)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField12, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)\n .addComponent(jTextField11)\n .addComponent(jTextField10)))\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 273, Short.MAX_VALUE)\n .addComponent(jButton3)\n .addGap(13, 13, 13))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(86, 86, 86)\n .addComponent(jLabel7)))\n .addContainerGap(169, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addComponent(jLabel7)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jCheckBox1))\n .addGap(36, 36, 36)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jCheckBox2))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(84, 84, 84)\n .addComponent(jCheckBox4))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jCheckBox3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(85, 85, 85)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jCheckBox6))\n .addGap(30, 30, 30)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jLabel9))\n .addGap(12, 12, 12)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jLabel10))\n .addContainerGap(25, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox5)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton5)\n .addComponent(jButton1))\n .addGap(35, 35, 35))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(84, 84, 84)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(78, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(41, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void jTextField8ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jammmPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jammmPropertyChange\n \n if (jCheckBox1.isSelected()==true) { ////apabila checkbox di pilih maka textfield dengan variable \"vket & vjam\" tidak dapat di edit\n vket.setEnabled(false);\n vjam.setEnabled(false);\n if (vjam.getText().equals(jammm.getText())) {\n player();\n JOptionPane.showMessageDialog(rootPane, \"\"+vket.getText()+\"\");\n }else{\n }\n \n }else{\n vket.setEnabled(true); ////apabila checkbox tidak di pilih maka textfield dengan variable \"vket & vjam\" dapat di edit\n vjam.setEnabled(true);\n }\n \n }", "private void paintActionPerformed(final java.awt.event.ActionEvent evt) {\n\t\t\tpaintChecked = !paintChecked;\n\t\t}", "private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public InitialiseJCheckBox(){ \n new JCheckBoxDrinkList();\n new JCheckBoxPreOrderMenuList();\n new JRadioSeatSelectionList();\n }", "private void jButton4MouseClicked(java.awt.event.MouseEvent evt) {\n }", "private void jButton4MouseClicked(java.awt.event.MouseEvent evt) {\n }", "private void u_interestActionPerformed(java.awt.event.ActionEvent evt) {\n}", "private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {\n }", "private void txtidDemActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n}", "@SuppressWarnings(\"unchecked\")\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\troot.setChecked(true);\n\t\t\t\tif(root.children()!=null)\n\t\t\t\t{\n\t\t\t\t\tEnumeration<CheckBoxTreeNode> en=root.children();\n\t\t\t\t\twhile(en.hasMoreElements())\n\t\t\t\t\t{\n\t\t\t\t\t\tCheckBoxTreeNode node=en.nextElement();\n\t\t\t\t\t\tnode.setChecked(true);\n\t\t\t\t\t\tnode.setCascadeChecked(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twebsiteListTree.updateUI();\n\t\t\t}", "private void jIdFilmeActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void cbxJornadaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbxJornadaActionPerformed\n if (cbxJornada.getSelectedIndex() == 1) {\n jornadaTrabalho(40);\n } else if(cbxJornada.getSelectedIndex() == 2){\n jornadaTrabalho(44);\n }\n }", "private void rdnamActionPerformed(java.awt.event.ActionEvent evt) {\n if( rdnam.isSelected())\n { \n gt= true;\n }\n \n \n }", "private JCheckBox getJCheckBox() {\r\n\t\tif (jCheckBox == null) {\r\n\t\t\tjCheckBox = new JCheckBox();\r\n\t\t\tjCheckBox.setBounds(new Rectangle(15, 291, 107, 21));\r\n\t\t\tjCheckBox.setText(\"Write to file\");\r\n\t\t\tjCheckBox.setToolTipText(\"If checked, biclustering results will be stored in the selected path\");\r\n\t\t\tjCheckBox.addChangeListener(new javax.swing.event.ChangeListener() {\r\n\t\t\t\tpublic void stateChanged(javax.swing.event.ChangeEvent e) {\r\n\t\t\t\t\tif(jCheckBox.isSelected())\t\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tBufferedReader pathReader=new BufferedReader(new FileReader(\"es/usal/bicoverlapper/data/groupsPath.txt\"));\r\n\t\t\t\t\t\t\tdefaultPath=pathReader.readLine();\r\n\t\t\t\t\t\t\t}catch(IOException ex){System.err.println(\"pathReader has no information\"); defaultPath=\"\";}\r\n\t\t\t\t\t\tjCheckBox1.setEnabled(true);\r\n\t\t\t\t\t\tjButton.setEnabled(true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tdefaultPath=\"\";\r\n\t\t\t\t\t\tjButton.setEnabled(false);\r\n\t\t\t\t\t\tjCheckBox1.setEnabled(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jCheckBox;\r\n\t}", "CheckBox getCk();", "private void initComponents() {//GEN-BEGIN:initComponents\r\n jPanel1 = new javax.swing.JPanel();\r\n jLabel1 = new javax.swing.JLabel();\r\n jPanel2 = new javax.swing.JPanel();\r\n cgCheckBox = new javax.swing.JCheckBox();\r\n auCheckBox = new javax.swing.JCheckBox();\r\n guCheckBox = new javax.swing.JCheckBox();\r\n jPanel4 = new javax.swing.JPanel();\r\n aaCheckBox = new javax.swing.JCheckBox();\r\n acCheckBox = new javax.swing.JCheckBox();\r\n agCheckBox = new javax.swing.JCheckBox();\r\n ccCheckBox = new javax.swing.JCheckBox();\r\n cuCheckBox = new javax.swing.JCheckBox();\r\n ggCheckBox = new javax.swing.JCheckBox();\r\n uuCheckBox = new javax.swing.JCheckBox();\r\n\r\n getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.Y_AXIS));\r\n\r\n jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));\r\n\r\n jLabel1.setText(\"Basepairs to include:\");\r\n jPanel1.add(jLabel1);\r\n\r\n getContentPane().add(jPanel1);\r\n\r\n cgCheckBox.setSelected(true);\r\n cgCheckBox.setText(\"C-G\");\r\n jPanel2.add(cgCheckBox);\r\n\r\n auCheckBox.setSelected(true);\r\n auCheckBox.setText(\"A-U\");\r\n jPanel2.add(auCheckBox);\r\n\r\n guCheckBox.setSelected(true);\r\n guCheckBox.setText(\"G-U\");\r\n jPanel2.add(guCheckBox);\r\n\r\n getContentPane().add(jPanel2);\r\n\r\n aaCheckBox.setText(\"A-A\");\r\n jPanel4.add(aaCheckBox);\r\n\r\n acCheckBox.setText(\"A-C\");\r\n jPanel4.add(acCheckBox);\r\n\r\n agCheckBox.setText(\"A-G\");\r\n jPanel4.add(agCheckBox);\r\n\r\n ccCheckBox.setText(\"C-C\");\r\n jPanel4.add(ccCheckBox);\r\n\r\n cuCheckBox.setText(\"C-U\");\r\n jPanel4.add(cuCheckBox);\r\n\r\n ggCheckBox.setText(\"G-G\");\r\n jPanel4.add(ggCheckBox);\r\n\r\n uuCheckBox.setText(\"U-U\");\r\n jPanel4.add(uuCheckBox);\r\n\r\n getContentPane().add(jPanel4);\r\n }", "private void jMenu7ActionPerformed(java.awt.event.ActionEvent evt) {\n }" ]
[ "0.74542314", "0.7190808", "0.708534", "0.6955852", "0.695125", "0.6950609", "0.68940383", "0.68919843", "0.6872682", "0.6851578", "0.6846802", "0.68180394", "0.6788043", "0.6787499", "0.67831874", "0.67156", "0.66722494", "0.66722494", "0.66722494", "0.66657245", "0.66619104", "0.66619104", "0.6642101", "0.66031986", "0.6585001", "0.65667", "0.6566659", "0.65643287", "0.65459687", "0.6543723", "0.6538279", "0.64925706", "0.64925706", "0.64925706", "0.648454", "0.6481834", "0.64624137", "0.64594024", "0.64580256", "0.64563906", "0.64509314", "0.64509314", "0.64509314", "0.64438677", "0.64341694", "0.6429786", "0.6427991", "0.64259", "0.64257276", "0.6423166", "0.6418566", "0.6418566", "0.6418566", "0.6418351", "0.6418351", "0.6418351", "0.6418351", "0.6418351", "0.640382", "0.63987726", "0.63944733", "0.6393486", "0.637853", "0.6375486", "0.6370879", "0.635995", "0.63322514", "0.63319206", "0.6330367", "0.6330367", "0.6320568", "0.63008255", "0.6296235", "0.6296235", "0.6296235", "0.6296235", "0.62917626", "0.6289812", "0.6289812", "0.62835675", "0.6282105", "0.62746775", "0.6268349", "0.6267011", "0.6266099", "0.62581396", "0.62581265", "0.62581265", "0.6258015", "0.6257556", "0.62543625", "0.62426746", "0.62351114", "0.62285477", "0.6226997", "0.6223949", "0.6218198", "0.62163866", "0.61960006", "0.6193536" ]
0.6475082
36
public static int a=0;
private void add_cartMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_add_cartMouseClicked Statement stmt=null; String name_d=name.getText(); String detail_d=detail.getText(); String price_d=price.getText(); String quantity_d=quantity.getText(); String supplier_d=total.getText(); try{ javaconnect connect=new javaconnect(); Connection conn=javaconnect.getConnection(); ResultSet rs=null; // Statement stmt=null; PreparedStatement pst=null; int index=jTable1.getSelectedRow(); TableModel model=jTable1.getModel(); String id_e = model.getValueAt(index, 0).toString(); String name_e = model.getValueAt(index, 1).toString(); String detail_e = model.getValueAt(index, 2).toString(); String price_e = model.getValueAt(index, 5).toString(); String quantity_e = model.getValueAt(index, 3).toString(); String supplier_e = model.getValueAt(index, 4).toString(); //Statement stmt=null; int tb_quantity=Integer.parseInt(quantity_e); int tx_quantity=Integer.parseInt(quantity.getText()); if(tb_quantity>tx_quantity){ PreparedStatement pst_p=null; ResultSet rs_p=null; String sql_p="SELECT buying_price FROM product WHERE id='"+id_e+"'"; pst=conn.prepareStatement(sql_p); rs_p=pst.executeQuery(); String usr_p=null; while (rs_p.next()) { String std_p= (rs_p.getString(1)); float pt=Float.valueOf(total.getText())-(Float.valueOf(quantity.getText())*Float.valueOf(std_p)); usr_p=String.valueOf(pt); //JOptionPane.showMessageDialog(null,usr_p); //System.out.println(usr_p); //int a=Integer.parseInt(usr_p); } String find="select * from cart where id='"+id_e+"'"; pst=conn.prepareStatement(find); rs=pst.executeQuery(); if(!rs.next()){ String sql="insert into cart(id,name,detail,quantity,total_cost,profit) values('"+id_e+"','"+name_d+"','"+detail_d+"','"+quantity_d+"','"+total.getText()+"','"+usr_p+"')"; stmt=conn.createStatement(); stmt.executeUpdate(sql); String sql2="select * from cart"; pst=conn.prepareStatement(sql2); rs=pst.executeQuery(); cart.setModel(DbUtils.resultSetToTableModel(rs)); TableColumnModel tcm1=cart.getColumnModel(); tcm1.removeColumn(tcm1.getColumn(0)); /*String sql6="select `id` as 'id',name as 'Name',detail as 'Description',quantity as 'Quantity',supplier as 'Supplier',price as 'Cost (Ksh)' from product"; pst=conn.prepareStatement(sql6); rs=pst.executeQuery(); JOptionPane.showMessageDialog(null,rs.getString("Quantity")); String quantity_r=rs.getString("Quantity");*/ try{ int rem=Integer.parseInt(quantity_e)-Integer.parseInt(quantity.getText()); /* rem=rem-1; rem=rem-a; a=a+1;*/ String red="update product set quantity='"+rem+"' where id='"+id_e+"'"; stmt=conn.createStatement(); stmt.executeUpdate(red); String sql3="select `id` as 'id',name as 'Name',detail as 'Description',quantity as 'Quantity',supplier as 'Supplier',price as 'Cost (Ksh)' from product"; pst=conn.prepareStatement(sql3); rs=pst.executeQuery(); jTable1.setModel(DbUtils.resultSetToTableModel(rs)); TableColumnModel tcm=jTable1.getColumnModel(); tcm.removeColumn(tcm.getColumn(0)); //JOptionPane.showMessageDialog(null,Integer.parseInt(quantity.getText())); try{ ResultSet rs2=null; PreparedStatement pst2=null; String sql4="select SUM(total_cost) from cart"; pst2=conn.prepareStatement(sql4); rs2=pst2.executeQuery(); while (rs2.next()) { int std = rs2.getInt(1); total_l.setText(String.valueOf(std)); } } catch(SQLException e){ JOptionPane.showMessageDialog(null,e); } } catch(NumberFormatException | SQLException e){ JOptionPane.showMessageDialog(null,e+"yap"); } // JOptionPane.showMessageDialog(null,"Product Succefully updated"); }else{ JOptionPane.showMessageDialog(null,"Item already dded"); } name.setText(""); detail.setText(""); quantity.setText(""); price.setText(""); total.setText("0"); paid.setText(null); balance.setText(null); total_b.setText("0");}else if(tb_quantity==0){ JOptionPane.showMessageDialog(null,"Product out of Stock"); }else { JOptionPane.showMessageDialog(null,"Please enter valid quantity"); } }catch(Exception e){ JOptionPane.showMessageDialog(null,e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void m1(int a){\n\t\ta=Static11.a;\nSystem.out.println(a);\n\t}", "StaticVariable(){\n count++;//incrementing the value of static variable\n System.out.println(count);\n }", "public static void a() {\n\n }", "public static aa a() {\n }", "public int a() {\n return 6;\n }", "public int a()\n {\n return 2;\n }", "public int getA() {\n return a_;\n }", "public int getA() {\n return a_;\n }", "public static void test(){\n\t\tSystem.out.println(a);\n\t}", "public int getA() {\n\t\treturn 0;\n\t}", "public int getA() {\n return a_;\n }", "public int getA() {\n return a_;\n }", "public int getA() {\n\t\treturn a;\n\t}", "public int a() {\n return 366;\n }", "static int getInt(){\n return j;\n }", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "p3(){ \n cnt++; // Increment the static variable by 1 for each object creation. \n }", "public static a c() {\n }", "public static int addOne( int a){\n int b;\n //System.out.println(b+1);\n return a += 1;\n}", "public int a() {\n return this.f404d;\n }", "static int test()\n\t{\n\n\t\treturn 20;\n\t}", "private int getMY() {\n\t\treturn 0;\r\n\t}", "public static int getSuma() {\n\t\treturn suma;\n\t}", "static void doCount(){\n\t\tStaticDemo st=new StaticDemo();\n\t\t st.count++;\n\t\t System.out.println(\"Count is:\"+st.count);\n\t }", "public final void a() {\n this.b = -1;\n this.c = Integer.MIN_VALUE;\n this.d = false;\n this.e = false;\n }", "public int a()\r\n/* 64: */ {\r\n/* 65:70 */ return this.a;\r\n/* 66: */ }", "static zzadp m7436a() {\n return f12388a.get();\n }", "private final int initializeInt() {\n\t\treturn 0;\r\n\t}", "public void someMethod() {\n\t\tint localInt = ExampleDriver.counter;\n\t\t//int localInt2 = ExampleDriver.nonStaticCounter;\n\t\tExampleDriver exampleDriver = new ExampleDriver();\n\t\tint localInt2 = exampleDriver.nonStaticCounter;\n\t}", "public final void a() {\n this.f10063c.e();\n this.f10061a = 0;\n this.f10062b = 0;\n }", "public void incA() {\n this.countA++;\n }", "public int nonStatic( int x ) {\n return x * 3;\n }", "public int mo12720a() {\n return 0;\n }", "private SingletonClass() {\n x = 10;\n }", "public static void setidCounter(int a)\n\t{\n\t\tidCounter = a;\n\t}", "public void method(int a) {\r\n\t\tint tot = 7;\r\n\t\tSystem.out.println(\"localvariable a: \"+a);\r\n\t\tint b = a + 4;\r\n\t\tSystem.out.println(\"localvariable b: \"+b);\r\n\t\t\r\n\t}", "int getA();", "int getA();", "public static int getCounter() {return counter;}", "private static void staticFun()\n {\n }", "public int a(Random var1)\r\n {\r\n return 0;\r\n }", "public void setStatic() {\r\n\t\tthis.isStatic = true;\r\n\t}", "public void a() {\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tMyStatic.x += 5;\n\t\tMyStatic.x += 5;\n\t\tSystem.out.println(MyStatic.x);//block static only run one time\n\t\t\t\n\t}", "public void a() {\n }", "public void a() {\n }", "public int numAristas() { return numA; }", "private static int testOne(){\n var var = 10;\n return var;\n }", "public float getA() {\n return a;\n }", "extern(int i) {\n var = i;\n }", "public float getA() {\r\n return a;\r\n }", "public abstract int a();", "public int g()\r\n {\r\n return 1;\r\n }", "public interface AbstractC4464qo0 extends AbstractC3313k30 {\n public static final /* synthetic */ int v = 0;\n}", "public static int randomGet() { return 0; }", "public static int nextInt() {\n\treturn 0;\r\n}", "void test(int a){\n System.out.println(\"a: \"+a);\n }", "public final void a() {\n this.j = null;\n this.f = 0;\n this.e = 0;\n this.d = 0;\n this.c = 0;\n this.b = 0;\n this.a = 0;\n this.g = null;\n synchronized (i) {\n if (h != null) {\n this.j = h;\n }\n h = this;\n }\n }", "public int getAp(){\n\t\treturn ap;\n\t}", "public void method(){\n\t\t\n\t\tint a=3;//only for this method//local variable\n\t\tSystem.out.println(a);\n\t\tSystem.out.println(this.a);\n\t\tSystem.out.print(a+this.a);\n\t}", "static void m1318a() {\n f1109a++;\n }", "public boolean a()\r\n {\r\n return false;\r\n }", "public int i() {\n \treturn i; \n }", "public int geti(){\r\n return i;\r\n}", "public double getA() {\n return a;\n }", "public static void main(String[] args) {\nint b;\n\t\tint a;\n\t}", "public int getInitialValue()\n {\n return _init;\n }", "public int getInital_value(){\n return this.inital_value;\n }", "public default boolean isStatic() {\n\t\treturn false;\n\t}", "public double getA(){\n return a;\n }", "public static void main(int a) {\n\t\t\n\t\tSystem.out.println(\"main method \"+a);\n\t\t\n\t}", "public int getNotaFinal()\r\n {\n return 4;\r\n }", "public int getNotaFinal()\r\n {\n return 4;\r\n }", "public int n(){\n return n;\n }", "public float main(){\n return 0;\n }", "public static void t(){\n\n\n }", "public boolean a()\n {\n return true;\n }", "public int getA() {\n\t\treturn this.A;\n\t}", "public int a() {\r\n/* 63 */ return 4;\r\n/* */ }", "public String getA() {\n return a;\n }", "public int getStaticCharsCount() {\n return 0;\n }", "public String getA() {\r\n return a;\r\n }", "static public int getDefaultInt () {\n return defaultInt;\n }", "public void SET_Z(int a) {\n if (a == 0) {\n SEZ();\n }\n }", "public String i() {\n/* 44 */ return this.a.toString();\n/* */ }", "public long getaNum() {\n return aNum;\n }", "public int mo9232aG() {\n return 0;\n }", "public int getSuma() {\n return suma_;\n }", "public GlobalVariable() {\n }", "static void dosomething(Integer i) {\n i = 500;\n }", "public Variable(){\n name = \"\";\n initialValue = 0;\n }", "@Override\n\t/**\n\t * does nothing because a class cannot be static\n\t */\n\tpublic void setStatic(boolean b) {\n\n\t}", "public void setA(double a){\n this.a=a;\n }", "public void a(MinecraftKey var0) {\n/* 98 */ this.a = var0;\n/* */ }", "private int m4018a() {\n Integer num = this.f4077a.get();\n if (num == null) {\n num = 0;\n }\n int intValue = num.intValue() + 1;\n this.f4077a.set(Integer.valueOf(intValue));\n return intValue;\n }", "public long countA() {\n return this.countA;\n }", "public int m224a() {\n return 1;\n }", "final public boolean isStatic ()\n {\n\treturn myIsStatic;\n }", "@NonNull\n public final String a() {\n return \"LogManagerInit\";\n }", "public myCounter() {\n\t\tcounter = 1;\n\t}", "@Override\n\tpublic boolean isStatic() {\n\t\treturn false;\n\t}" ]
[ "0.7404771", "0.6822549", "0.64874536", "0.6380893", "0.63447833", "0.6227142", "0.6221692", "0.6221692", "0.62077147", "0.61194915", "0.6110416", "0.6110416", "0.61064833", "0.60686433", "0.6059204", "0.6008953", "0.5956189", "0.5955277", "0.59442925", "0.59271145", "0.5885523", "0.5862793", "0.58427364", "0.58370256", "0.5807555", "0.58013946", "0.57825327", "0.57595664", "0.5735096", "0.5719094", "0.57166207", "0.56982964", "0.5666643", "0.5643349", "0.56428957", "0.5631859", "0.5606469", "0.5606469", "0.5584305", "0.55776757", "0.55641216", "0.5561393", "0.55534434", "0.5539941", "0.5537671", "0.5537671", "0.55366665", "0.55348384", "0.55312896", "0.55301535", "0.5523193", "0.5492532", "0.54905295", "0.5470291", "0.5458653", "0.545677", "0.54537964", "0.5414231", "0.54138243", "0.5411984", "0.5405864", "0.53958505", "0.5394893", "0.53748643", "0.5373659", "0.53731537", "0.53690404", "0.5366431", "0.535713", "0.5341602", "0.5339862", "0.5329869", "0.5329869", "0.53284276", "0.5320849", "0.5316223", "0.5314973", "0.530533", "0.5303823", "0.5294041", "0.5294014", "0.5292148", "0.52907044", "0.52902234", "0.52770835", "0.526687", "0.526585", "0.5254838", "0.5253684", "0.5251722", "0.52516156", "0.52488", "0.5242836", "0.5240972", "0.52401835", "0.52292544", "0.5227436", "0.522468", "0.52235603", "0.5218434", "0.5196463" ]
0.0
-1
the constructor for a "SendWalletThread"
public SendWalletThread(String[] address,Wallet wallet) { this.WALLET = wallet; ADDRESS= address; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public dc_wallet() {}", "public TicketBoothClient()\n {\n Thread myThread = new Thread(this);\n myThread.start();\n }", "NetThread(){}", "public WifiProtocol(){\r\n// messages = new String[100];\r\n// index = 0;\r\n }", "@Override\n public void run() {\n System.out.println(\"Blockchain Identity Funding Transaction hash is \" + sendResult.tx.getTxId());\n System.out.println(sendResult.tx.toString());\n System.out.println(\"Blockchain Identity object Initialization\" + sendResult.tx.getTxId());\n blockchainIdentity = new BlockchainIdentity(platform, (CreditFundingTransaction)sendRequest.tx, kit.wallet(), null);\n }", "public Txn() {\n }", "public WebSocketRPC() {\n\t}", "public LockLayer() {\n }", "public MessageThreadFragment() {\n }", "private void createTx() throws Exception {\n PublicKey recipient = Seed.getRandomAddress();\n Transaction tx = new Transaction(wallet.pb, recipient, wallet.pr);\n//\t\tSystem.out.println(\"Created a tx\");\n txPool.add(tx);\n//\t\tcache.put(tx.txId, null);\n sendTx(tx);\n }", "public TransferMarket() {\n }", "public Transportation(NetworkLayers.LAYER_DIRECTION layerDirection) {\n frame = MinT.getInstance();\n this.networkManager = frame.getNetworkManager();\n this.scheduler = frame.getSystemScheduler();\n \n if (layerDirection == NetworkLayers.LAYER_DIRECTION.RECEIVE) {\n syshandle = new SystemHandler();\n routing = networkManager.getRoutingProtocol();\n sharing = networkManager.getSharing();\n }\n\n if (layerDirection == NetworkLayers.LAYER_DIRECTION.SEND) {\n serialization = new MatcherAndSerialization(layerDirection);\n// if(frame.isBenchMode()){\n// bench_send = new PacketPerform(\"Trans-sender\");\n// frame.addPerformance(MinT.PERFORM_METHOD.Trans_Sender, bench_send);\n// }\n }\n }", "void init() {\n try {\n // Start the send and receive threads and exit\n //scheduler.scheduleThread(new Thread(new UDPTransportThread(this, UDPTransportThread.RUN_SEND_THREAD)));\n //scheduler.scheduleThread(new Thread(new UDPTransportThread(this, UDPTransportThread.RUN_RCV_THREAD)));\n //scheduler.scheduleThread(new Thread(new UDPTransportThread(this, UDPTransportThread.RUN_GC_THREAD)));\n } catch (IllegalThreadStateException e) {\n Debug.exit(\"Fatal Error: \" + e.toString());\n }\n }", "public Telefone() {\n\t}", "public Message(Account accountSend) {\r\n\t\tm_accountSend = accountSend;\r\n\t\tformatTime();\r\n\t}", "ClientMessageSender() {\n\n\t}", "public TransactionThread(TransactionReceiver receiver, Transaction t,\n TransactionCallback callback) {\n this.receiver = receiver;\n this.transaction = t;\n this.callback = callback;\n }", "public Telefone() {\n\t\t\n\t}", "public Packet1Login () { \n }", "public Trader(Brokerage broker, String name, String pswd)\r\n {\r\n brokerage = broker;\r\n screenName = name;\r\n password = pswd;\r\n myWindow = null;\r\n mailbox = new LinkedList<String>();\r\n }", "public RPCRequest()\n\t{\n\t\tsuper();\n\t}", "public QueueSenderSession ()\r\n {\r\n\r\n\r\n }", "public ByzantineKing(int me, String[] peers, int[] ports, int propose_value, int f, int tag){\n\n this.me = me;\n this.peers = peers;\n this.ports = ports;\n this.mutex = new ReentrantLock();\n this.dead = new AtomicBoolean(false);\n this.unreliable = new AtomicBoolean(false);\n\n // Your initialization code here\n this.tag = tag;\n this.f = f;\n this.phase = -1;\n this.my_value = propose_value;\n this.values = new ArrayList<>();\n for (int i = 0; i < peers.length; i++) {\n if (i == this.me) {\n this.values.add(propose_value);\n } else {\n this.values.add(-1);\n }\n }\n done = false;\n\n receivedProposal = new HashMap<Integer, Integer>();\n firstTransfer = new Integer[peers.length];\n //this.startTime = startTime;\n\n // register peers, do not modify this part\n try{\n System.setProperty(\"java.rmi.server.hostname\", this.peers[this.me]);\n registry = LocateRegistry.createRegistry(this.ports[this.me]);\n stub = (ByzantineKingRMI) UnicastRemoteObject.exportObject(this, this.ports[this.me]);\n registry.rebind(\"ByzantineKing\", stub);\n } catch(Exception e){\n e.printStackTrace();\n }\n }", "private ThreadLocalTransaction() {\n }", "private void prepareSending(final String idx) {\n mSettings = Settings.get(m_context);\n com.klinker.android.send_message.Settings sendSettings = new com.klinker.android.send_message.Settings();\n sendSettings.setMmsc(mSettings.getMmsc());\n sendSettings.setProxy(mSettings.getMmsProxy());\n sendSettings.setPort(mSettings.getMmsPort());\n sendSettings.setUseSystemSending(true);\n mSendTransaction = new Transaction(m_context, sendSettings);\n\n// new WorkingThread(idx).start();\n ApnUtils.initDefaultApns(m_context, new ApnUtils.OnApnFinishedListener() {\n @Override\n public void onFinished() {\n mSettings = Settings.get(m_context, true);\n com.klinker.android.send_message.Settings sendSettings = new com.klinker.android.send_message.Settings();\n sendSettings.setMmsc(mSettings.getMmsc());\n sendSettings.setProxy(mSettings.getMmsProxy());\n sendSettings.setPort(mSettings.getMmsPort());\n sendSettings.setUseSystemSending(true);\n\n mSendTransaction = new Transaction(m_context, sendSettings);\n\n new WorkingThread(idx).start();\n }\n });\n }", "public SONETRouter(String address){\n\t\tsuper(address);\n\t}", "public EventHandleThread(){\n gson = new Gson();\n producer = KafkaProducerCreator.createProducer();\n this.paymentController = new PaymentController();\n }", "public TokenTransactions() {}", "@Override\n public void run() {\n byte[] deviceTxPayload = CoreServices.getOrCreateHardwareWalletService().get().getContext().getSerializedTx().toByteArray();\n\n log.info(\"DeviceTx payload:\\n{}\", Utils.HEX.encode(deviceTxPayload));\n\n // Load deviceTx\n Transaction deviceTx = new Transaction(MainNetParams.get(), deviceTxPayload);\n\n log.info(\"deviceTx:\\n{}\", deviceTx.toString());\n\n // Check the signatures are canonical\n for (TransactionInput txInput : deviceTx.getInputs()) {\n byte[] signature = txInput.getScriptSig().getChunks().get(0).data;\n if (signature != null) {\n log.debug(\n \"Is signature canonical test result '{}' for txInput '{}', signature '{}'\",\n TransactionSignature.isEncodingCanonical(signature),\n txInput.toString(),\n Utils.HEX.encode(signature));\n } else {\n log.warn(\"No signature data\");\n }\n }\n\n log.debug(\"Committing and broadcasting the last tx\");\n\n BitcoinNetworkService bitcoinNetworkService = CoreServices.getOrCreateBitcoinNetworkService();\n\n if (bitcoinNetworkService.getLastSendRequestSummaryOptional().isPresent()\n && bitcoinNetworkService.getLastWalletOptional().isPresent()) {\n\n SendRequestSummary sendRequestSummary = bitcoinNetworkService.getLastSendRequestSummaryOptional().get();\n\n // Check the unsigned and signed tx are essentially the same as a check against malware attacks on the Trezor\n if (TransactionUtils.checkEssentiallyEqual(sendRequestSummary.getSendRequest().get().tx, deviceTx)) {\n // Substitute the signed tx from the trezor\n log.debug(\n \"Substituting the Trezor signed tx '{}' for the unsigned version {}\",\n deviceTx.toString(),\n sendRequestSummary.getSendRequest().get().tx.toString()\n );\n sendRequestSummary.getSendRequest().get().tx = deviceTx;\n log.debug(\"The transaction fee was {}\", sendRequestSummary.getSendRequest().get().fee);\n\n sendBitcoinConfirmTrezorPanelView.setOperationText(MessageKey.TREZOR_TRANSACTION_CREATED_OPERATION);\n sendBitcoinConfirmTrezorPanelView.setRecoveryText(MessageKey.CLICK_NEXT_TO_CONTINUE);\n sendBitcoinConfirmTrezorPanelView.setDisplayVisible(false);\n\n // Get the last wallet\n Wallet wallet = bitcoinNetworkService.getLastWalletOptional().get();\n\n // Commit and broadcast\n bitcoinNetworkService.commitAndBroadcast(sendRequestSummary, wallet, paymentRequestData);\n\n // Ensure the header is switched off whilst the send is in progress\n ViewEvents.fireViewChangedEvent(ViewKey.HEADER, false);\n } else {\n // The signed transaction is essentially different from what was sent to it - abort send\n sendBitcoinConfirmTrezorPanelView.setOperationText(MessageKey.TREZOR_FAILURE_OPERATION);\n sendBitcoinConfirmTrezorPanelView.setRecoveryText(MessageKey.CLICK_NEXT_TO_CONTINUE);\n sendBitcoinConfirmTrezorPanelView.setDisplayVisible(false);\n }\n } else {\n log.debug(\"Cannot commit and broadcast the last send as it is not present in bitcoinNetworkService\");\n }\n // Clear the previous remembered tx\n bitcoinNetworkService.setLastSendRequestSummaryOptional(Optional.<SendRequestSummary>absent());\n bitcoinNetworkService.setLastWalletOptional(Optional.<Wallet>absent());\n }", "public MessageRequest() {\n\t}", "protected RouterObject(String m_address) {\n connectedDevices = new ArrayList<String>();\n rwThreads = new HashSet<ReadWriteThread>();\n messageIDs = new ArrayList<byte[]>();\n messages = new ArrayList<byte[]>();\n address = new byte[Constants.TARGET_ID_LEN];\n byte[] temp = m_address.getBytes();\n for(int i=0; i<Constants.TARGET_ID_LEN; i++){\n \taddress[i] = temp[i];\n }\n }", "public BoletoPaymentRequest() {\n\n }", "public TAccountTicketFlow(){}", "public SocketParams() {\n init();\n }", "public LCMultiblockPacket() {\n\t}", "SendToDataLayerThread(String p, String msg) {\n path = p;\n message = msg;\n }", "public MoneyTransfer() {\n }", "public MainThread()\n {\n super();\n setPriority(1);\n setId(0x55); \n }", "public Message(Account accountSend, String timestamp) {\r\n\t\tm_accountSend = accountSend;\r\n\t\tm_timeSent = timestamp;\r\n\t}", "public ProducerThread() {\n }", "private TransferDispatcher() {\n taskList=new Vector();\n }", "public RequestThread(Socket soc){\r\n this.soc = soc; \r\n }", "public UBERequest() {\r\n }", "public Station(){\r\n RemoveTrain();\r\n passengers = new ArrayList();\r\n this.LockInit();\r\n this.CondInit();\r\n \r\n Thread stationThread = new Thread(this);\r\n stationThread.start();\r\n// pm = new PassengerMaker();\r\n// Thread pmThread = new Thread(pm);\r\n// pmThread.start();\r\n }", "public Wallet() {\n total_bal = 10;\n }", "public ThreadState(KThread thread) \n {\n this.thread = thread;\n setPriority(priorityDefault);\n }", "protected Settlement() {\n // empty constructor\n }", "private ThreadUtil() {\n \n }", "public BasicDriveTeleOp() {\n\n }", "private PasskeyContract() {}", "BankSession(Socket s, AccountDB a, KeyPair p,Key keyLog)\r\n\tthrows IOException\r\n {\r\n \r\n\tthis.s = s;\r\n\tOutputStream out = s.getOutputStream();\r\n\tthis.os = new ObjectOutputStream(out);\r\n\tInputStream in = s.getInputStream();\r\n\tthis.is = new ObjectInputStream(in);\r\n\tthis.accts = a;\r\n\tthis.kPrivBank = p.getPrivate();\r\n\tthis.kPubBank = p.getPublic();\r\n\tthis.crypto = new Crypto();\r\n\t\r\n\tthis.parameterGenerator = new ParameterGenerator();\r\n this.kLog = keyLog;\r\n System.out.println(\"\\nWaiting for first message\");\r\n }", "private ThreadUtil() {\n }", "public SyncFluidPacket() {\n }", "public Communicator() {\n\t}", "private SocketMessage() {\n initFields();\n }", "public Node() {\n portnum = 0;\n senders = new Hashtable<String, Sender>();\n }", "public Communicator() {\n }", "public Communicator() {\n }", "LockManager() {\n }", "public ChatRequest()\r\n\t{\r\n\t}", "public TransportConn(RFTXHost host, int identity) {\n this.host = host;\n this.identity = identity;\n readyToRun=false;\n }", "public TransactionStateUpdater() {\n super();\n }", "protected TaskChain() {\n\t}", "private SingletonSyncBlock() {}", "public Transaction() {\n this(0, 0, null);\n }", "public BattleRunnable() {\n\t\tdebug.i(\"BattleRunnable constructor\");\n\t}", "private Bluetooth() {}", "public static void main(String[] args) {\n try {\n //RocksDBUtils.getInstance().cleanChainStateBucket();\n // RocksDBUtils.getInstance().cleanBlockBucket();\n //RocksDBUtils.getInstance().cleanTxBucket();\n //RocksDBUtils.getInstance().cleanIpBucket();\n\n Server serverThread = new Server();\n CliThread cliThread = new CliThread();\n //String[] argss = {\"createwallet\"};\n //1DRDoamPwRDQa1775dVig7X8BitJm1273D +10\n //1Gsnure8ovCy3SiK6Fth44kDcwrEHjtFuj 10\n //18b76o68gGKg8ndXHDTDWdbG1DkGzMwfvZ 10 -10\n\n //String[] argss = {\"createblockchain\", \"-address\", \"18b76o68gGKg8ndXHDTDWdbG1DkGzMwfvZ\"};\n //0000fcc80177312ea7cd9b3db9497af6cae1d69a746332571f14d3c687eee1d0\n\n //String[] argss = {\"mineblock\", \"-address\" ,\"1Gsnure8ovCy3SiK6Fth44kDcwrEHjtFuj\"};\n\n\n //String[] argss = {\"printaddresses\"};\n //String[] argss = {\"getbalance\", \"-address\", \"18b76o68gGKg8ndXHDTDWdbG1DkGzMwfvZ\"};\n\n String[] argss = {\"send\", \"-from\", \"1Gsnure8ovCy3SiK6Fth44kDcwrEHjtFuj\", \"-to\", \"1DRDoamPwRDQa1775dVig7X8BitJm1273D\", \"-amount\", \"10\"};\n //String[] argss ={\"printchain\"};\n serverThread.start();\n cliThread.start(argss);\n\n\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n\n\n\n }", "public AutoSenderService() {\r\n\t\tsuper();\r\n\t}", "public GenEncryptionParams() {\n }", "public TestBSSVRequest() {\r\n }", "public NewConnectionWorkerThread(LocalService srv, User peer, int Qcode) {\n mService = srv;\n mIsPassive = false;\n mPeer = peer;\n mQueryCode = Qcode;\n\n }", "public static void initCommunicationClientThread(){\r\n new CommunicationClientThread();\r\n }", "public FileSenderThread(Socket socket, File transferFile, PrintWriter logWriter)\n {\n this.socket = socket;\n this.transferFile = transferFile;\n this.logWriter = logWriter;\n }", "public SystemCommandRequest()\r\n\t{\r\n\t}", "public Transaction( int id, int np, long msecs) {\n bar = new CyclicBarrier(np, null);\n txId = id;\n numParties = np;\n timeout = msecs;\n }", "public TransactionSystem()\n\t{\n\t\ttransactionQueue = new LinkedList<Transaction>();\n\t\tSystem.out.println(\"Transaction system created!\");\n\t}", "public BitCoinTransactionBroadcast(BroadcastBitCoinTransactionHandler mBroadcastBitCoinTransactionHandler) {\r\n this.mBroadcastBitCoinTransactionHandler = mBroadcastBitCoinTransactionHandler;\r\n mJsonRequest = new JSONObject();\r\n }", "public Transaction() {\n }", "private Teller() {\n }", "public DeviceDataRequestCommand()\n {\n }", "private ReceiveEthernetStrategy() {\n }", "public ThreadState(KThread thread) {\n this.thread = thread;\n this.time = 0;\n this.placement = 0;\n this.priority = priorityDefault;\n setPriority(priorityDefault);\n effectivePriority = priorityMinimum;\n }", "private void init() {\n\t\tsendPacket(new Packet01Login(\"[you have connected to \"+UPnPGateway.getMappedAddress()+\"]\", null));\n\t}", "public TTL_CIL_Communicator()\n {\n }", "private BluetoothSettings() {\n }", "public NetPacketThread(Socket socket, ObjectOutputStream oos) {\n\t\tsender \t\t= true;\n\t\tthis.socket = socket;\n\t\tthis.oos\t= oos;\t\n\t}", "public SmsSendRequestDto() {\n super();\n }", "public MiradorTransaction(FujabaTransaction fujaba_tx) {\n tx_name_ = fujaba_tx.getName();\n tx_id_ = fujaba_tx.getId();\n merge_side_ = fujaba_tx.getMergeSide();\n initialize(fujaba_tx);\n }", "private void startSenderThread(DataOutputStream dataOutputStream) {\r\n\t\tsenderThread = new SenderThread(dataOutputStream, messageRate, clientStatistics);\r\n\t\tnew Thread(senderThread).start();\r\n\t}", "public Lock() {\r\n }", "protected void initialize() { \n param1 = SmartDashboard.getNumber(\"param1\");\n param2 = SmartDashboard.getNumber(\"param2\");\n param3 = SmartDashboard.getNumber(\"param3\");\n param4 = SmartDashboard.getNumber(\"param4\");\n command = new C_DriveBasedOnEncoderWithTwist(param1, param2, param3);\n }", "public TestCaseSocket() {\n\t}", "public TorrentGUI() {\n try {\n initComponents();\n seededFiles = new HashMap<String, File>();\n InetAddress thisIp = InetAddress.getLocalHost();\n ServerSocket ss = new ServerSocket(0);\n System.out.println(ss.getLocalPort());\n ContactThread ct = new ContactThread(ss, seededFiles);\n ct.start();\n user = new User(thisIp, ss.getLocalPort());\n System.out.println(\"GUI je pokrenut\");\n } catch (IOException ex) {\n Logger.getLogger(TorrentGUI.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public BluetoothThread(String address, Handler handler) {\n\n this.address = address.toUpperCase();\n this.readHandler = handler;\n\n writeHandler = new Handler() {\n @Override\n public void handleMessage(Message message) {\n write((String) message.obj);\n }\n };\n }", "public MailSender() {\r\n }", "public WaiterHelperContract() {}", "public NetworkData() {\n }", "@Override\n public void run() {\n transmit_set();\n }" ]
[ "0.65062237", "0.63674986", "0.6147715", "0.60023284", "0.600153", "0.59582657", "0.59056413", "0.5825903", "0.5815804", "0.5808663", "0.58068264", "0.5779158", "0.57512647", "0.5736613", "0.5732024", "0.57184744", "0.5707597", "0.5705288", "0.56743795", "0.56710434", "0.5640514", "0.56346226", "0.56017447", "0.5596398", "0.55881554", "0.55770826", "0.55767876", "0.5549232", "0.55489045", "0.5543423", "0.5516989", "0.5509118", "0.5477049", "0.5476723", "0.5476073", "0.54701877", "0.5468968", "0.5468963", "0.5465686", "0.5453674", "0.54404145", "0.54217315", "0.5420395", "0.5412843", "0.54068565", "0.5405354", "0.5385836", "0.5368907", "0.53652614", "0.53533447", "0.53516555", "0.5347589", "0.5330801", "0.532668", "0.53195846", "0.53069794", "0.530562", "0.530562", "0.5302034", "0.52984047", "0.5291434", "0.52870804", "0.5282184", "0.5273652", "0.526901", "0.52614343", "0.52611613", "0.52544004", "0.5250994", "0.5244114", "0.52407205", "0.52396595", "0.5239597", "0.52333015", "0.52219397", "0.52125305", "0.5212067", "0.52091974", "0.5207307", "0.5206845", "0.5206295", "0.5205851", "0.5204793", "0.5200355", "0.51988256", "0.51905847", "0.5187811", "0.51845396", "0.51831204", "0.5182719", "0.5182368", "0.5180798", "0.51806754", "0.5177227", "0.517389", "0.51709396", "0.5167082", "0.5165227", "0.51620585", "0.51569366" ]
0.7652482
0
this handles both normal file resources and url resources that were added as "existing resources"
public boolean isNameCustom(String itemName) { boolean custom = itemName != null && !itemName.equalsIgnoreCase(getResourceProperties().getProperty(ResourceProperties.PROP_DISPLAY_NAME)); // if custom by logic above, check for url resources that were added as new resources by Lessons // the item name for urls added this way will have a protocol prefix (ie. https://) // if the protocol prefix does not appear, consider this to be custom if (custom && URL_RESOURCE_TYPE.equals(getResourceType())) { custom = itemName != null && !itemName.matches(URL_HAS_PROTOCOL_REGEX); } return custom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void testResourceFile() {\n\t\tArrayList l = new ArrayList();\n\t\tl.add(\"http://www.google.it\");\n\t\tl.add(\"http://www.microsoft.com\");\n\t\t/*\n\t\tDownloader d = new Downloader(1);\n\t\tlogger\n\t\t\t\t.log(\n\t\t\t\t\t\tLevel.INFO,\n\t\t\t\t\t\"TEST ResourceFile implementation. Url downloaded will be temporary saved to system temp directory.\");\n\n\t\t// Listener\n\t\td.addListener(new DebugListener());\n\n\t\td.setFollowRedirect(true);\n\t\td.setMaxSize(2000);\n\t\td.addURLs(l);\n\t\td.start();\n\t\td.waitDone();\n\n\t\t// Derby DBMS should be shutdown every times application goes down\n\t\tDerbyLinkQueueDB.shutdown();\n\t\t*/\n\t}", "public void addResources(Collection resources) {\n/* 81 */ if (resources != null) {\n/* 82 */ prepareResourceSet();\n/* 83 */ this.resources.addAll(resources);\n/* */ } \n/* */ }", "public void addResource(PSResource res) {\n/* 72 */ prepareResourceSet();\n/* 73 */ this.resources.add(res);\n/* */ }", "@Override\r\n\tpublic void add(Resources resources) {\n\t\t\r\n\t}", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\n registry.addResourceHandler(\"/resources/**\")\n .addResourceLocations(\"classpath:/static/\");\n /*\n * Static Resources store outside the project\n */\n registry.addResourceHandler(\"/files/**\")\n .addResourceLocations(\"file:/opt/FILES_MANAGEMENT/images/\");\n }", "@Override\n\tpublic void addResourceHandlers(ResourceHandlerRegistry registry) {\n\n\t\tregistry.addResourceHandler(\"/photos/**\").addResourceLocations(\"file:///c:/dev/study/temp2/\")\n\t\t\t\t.setCacheControl(CacheControl.noCache());\n\t\t// .setCacheControl(CacheControl.masAge(Duration.ofDays(1));\n\t\tregistry.addResourceHandler(\"/swagger-ui/**\")\n\t\t.addResourceLocations(\"classpath:/META-INF/resources/webjars/springfox-swagger-ui/\")\n\t\t.resourceChain(false);\n\t}", "protected void addMissingResources()\n {\n WebLogicResourceRules.addMissingJmsResources(this);\n }", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\n registry.addResourceHandler(\"/js/**\", \"/img/**\", \"/fonts/**\", \"/css/**\", \"/**\")\n // where the resource file is\n .addResourceLocations(\"/js/\", \"/img/\", \"/fonts/\", \"/css/\", \"/\")\n// .setCachePeriod(31556926);\n .setCachePeriod(30);\n }", "ResourceFilesHandler() throws MissingResourceException {\n\t\tLocale locale = Locale.getDefault();\n\t\tif (!SUPPORTED_LOCALES.contains(locale)) {\n\t\t\tlocale = DEFAULT_LOCALE;\n\t\t}\n\n\t\t// generate the path to the *.properties files\n\t\tfinal String path = getClass().getPackage().getName().replaceAll(\"\\\\.\", ESCAPED_FILE_SEPERATOR);\n\n\t\t// create the ResourceBundle\n\t\tbundleConstants = ResourceBundle.getBundle(path + ESCAPED_FILE_SEPERATOR + DOMINION_CARD);\n\t\tbundleI18N = ResourceBundle.getBundle(path + ESCAPED_FILE_SEPERATOR + DOMINION_LANGUAGE, locale);\n\t}", "static private void addBundleResources( final Bundle bundle, final Collection<? extends Resource> resources ) {\n resources.stream()\n .map( r -> new Bundle.BundleEntryComponent().setResource( r ) )\n .forEach( bundle::addEntry );\n }", "@Override\r\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\r\n registry.addResourceHandler(\"/resources/**\").addResourceLocations(\"/resources/\");\r\n// registry.addResourceHandler(\"/static/**\").addResourceLocations(\"/static/\").setCachePeriod(31556926);\r\n }", "protected void resourceSet(String resource)\r\n {\r\n // nothing to do\r\n }", "private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }", "@Override\r\n\tprotected void addResourceHandlers(ResourceHandlerRegistry registry) {\n\t\tregistry.addResourceHandler(\"/static/**\").addResourceLocations(\"classpath:/hh/\");\r\n\t\tsuper.addResourceHandlers(registry);\r\n\t}", "@Override\n protected void load(ScanningContext context) {\n ResourceItem item = getRepository().getResourceItem(mType, mResourceName);\n\n // add this file to the list of files generating this resource item.\n item.add(this);\n\n // Ask for an ID refresh since we're adding an item that will generate an ID\n context.requestFullAapt();\n }", "@Override\r\n public void loadResources() {\n\r\n }", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry){\n// registry.addResourceHandler(\"/jsp/**\").addResourceLocations(\"classpath:/static/jsp/\");\n registry.addResourceHandler(\"/jsp/**\").addResourceLocations(\"classpath:/static/jsp/\");\n registry.addResourceHandler(\"/**.html\").addResourceLocations(\"classpath:/templates/\");\n registry.addResourceHandler(\"/js/**\").addResourceLocations(\"classpath:/static/js/\");\n// registry.addResourceHandler(\"*.jpg\").addResourceLocations(\"classpath:/static/img\");\n\n }", "List<String> externalResources();", "@Override\n public void onLoadResources() {\n }", "@Override\n public void addResourceHandlers(final ResourceHandlerRegistry registry) {\n registry.addResourceHandler(\"/resources/**\").addResourceLocations(\"/resources/\").setCachePeriod(31556926);\n }", "@Override\n protected void addResourceHandlers(ResourceHandlerRegistry registry) {\n registry.addResourceHandler(\"swagger-ui.html\")\n .addResourceLocations(\"classpath:/META-INF/resources/\");\n \n registry.addResourceHandler(\"/webjars/**\")\n .addResourceLocations(\"classpath:/META-INF/resources/webjars/\");\n }", "@Override\n\tpublic void addResourceHandlers(ResourceHandlerRegistry registry) {\n\t\t\n\t}", "public File addResource(String id, File f) {\n\t\trks.add(id);\n\t\trvs.add(f);\n\t\treturn f;\n\t}", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\n registry.addResourceHandler(\"/resources/**\").addResourceLocations(\"/resources/\");\n }", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\n\n }", "public void handleStaticResources(String handler, HttpServletResponse response) {\n String fileName = null;\n if (handler.equals(\"status\")) {\n response.setContentType(\"text/html\");\n fileName = \"overview.html\";\n } else if (handler.equals(\"detail\")) {\n response.setContentType(\"text/html\");\n fileName = \"detail.html\";\n } else if (handler.equals(\"base.css\")) {\n response.setContentType(\"text/css\");\n fileName = \"base.css\";\n } else if (handler.equals(\"jquery.js\")) {\n response.setContentType(\"text/javascript\");\n fileName = \"jquery-1.4.2.min.js\";\n } else if (handler.equals(\"status.js\")) {\n response.setContentType(\"text/javascript\");\n fileName = \"status.js\";\n } else {\n try {\n response.sendError(404);\n } catch (IOException e) {\n throw new RuntimeException(\"Encountered error sending 404\", e);\n }\n return;\n }\n \n response.setHeader(\"Cache-Control\", \"public; max-age=300\");\n \n try {\n InputStream resourceStream = MapReduceServlet.class.getResourceAsStream(\n \"/com/google/appengine/tools/mapreduce/\" + fileName);\n OutputStream responseStream = response.getOutputStream();\n byte[] buffer = new byte[1024];\n int bytesRead;\n while ((bytesRead = resourceStream.read(buffer)) != -1) {\n responseStream.write(buffer, 0, bytesRead);\n }\n responseStream.flush();\n } catch (FileNotFoundException e) {\n throw new RuntimeException(\"Couldn't find static file for MapReduce library\", e);\n } catch (IOException e) {\n throw new RuntimeException(\"Couldn't read static file for MapReduce library\", e);\n }\n }", "protected ValidatorResources loadResources(ServletContext ctx)\n throws IOException, ServletException {\n if ((pathnames == null) || (pathnames.length() <= 0)) {\n return null;\n }\n\n StringTokenizer st = new StringTokenizer(pathnames, RESOURCE_DELIM);\n\n List urlList = new ArrayList();\n ValidatorResources resources = null;\n try {\n while (st.hasMoreTokens()) {\n String validatorRules = st.nextToken().trim();\n\n if (LOG.isInfoEnabled()) {\n LOG.info(\"Loading validation rules file from '\"\n + validatorRules + \"'\");\n }\n\n URL input =\n ctx.getResource(validatorRules);\n\n // If the config isn't in the servlet context, try the class\n // loader which allows the config files to be stored in a jar\n if (input == null) {\n input = getClass().getResource(validatorRules);\n }\n\n if (input != null) {\n urlList.add(input);\n } else {\n throw new ServletException(\n \"Skipping validation rules file from '\"\n + validatorRules + \"'. No url could be located.\");\n }\n }\n\n int urlSize = urlList.size();\n String[] urlArray = new String[urlSize];\n\n for (int urlIndex = 0; urlIndex < urlSize; urlIndex++) {\n URL url = (URL) urlList.get(urlIndex);\n\n urlArray[urlIndex] = url.toExternalForm();\n }\n\n resources = new ValidatorResources(urlArray);\n } catch (SAXException sex) {\n LOG.error(\"Skipping all validation\", sex);\n throw new StrutsException(\"Skipping all validation because the validation files cannot be loaded\", sex);\n }\n return resources;\n }", "@Override\n\tpublic void addResourceHandlers(final ResourceHandlerRegistry registry) {\n\n\t\tSystem.out.println(\"execution is reaching addResourceHandlers()\");\n\t\tsuper.addResourceHandlers(registry);\n\t\tregistry.addResourceHandler(\"/images/**\").addResourceLocations(\"/resources/images/\").setCachePeriod(0);\n\t\tregistry.addResourceHandler(\"/js/**\").addResourceLocations(\"/resources/js/\").setCachePeriod(0);\n\t\tregistry.addResourceHandler(\"/css/**\").addResourceLocations(\"/resources/css/\").setCachePeriod(0);\n\t\tregistry.addResourceHandler(\"/fonts/**\").addResourceLocations(\"/resources/fonts/\").setCachePeriod(0);\n\t\t// this is one year cache period 31556926\n\t}", "@Override\r\n\tpublic void addResourceHandlers(ResourceHandlerRegistry registry) {\n\t\tregistry.addResourceHandler(\"/resources/**\")\r\n\t\t\t\t.addResourceLocations(\"/resources/\");\r\n\t}", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\n registry.addResourceHandler(\"/static/**\").addResourceLocations(\"/static/\");\n registry.addResourceHandler(\"/resources/**\").addResourceLocations(\"/resources/\");\n // swagger\n// registry.addResourceHandler(\"swagger-ui.html\").addResourceLocations(\"classpath:/META-INF/resources/\");\n// registry.addResourceHandler(\"/webjars/**\").addResourceLocations(\"classpath:/META-INF/resources/webjars/\");\n \n }", "private void initResources(ServletContext servletContext) {\n if (pathnames != null) {\n ActionContext ctx = ActionContext.getContext();\n try {\n \n ValidatorResources resources = this.loadResources(servletContext);\n \n \n String prefix = ctx.getActionInvocation().getProxy().getNamespace();\n \n \n servletContext.setAttribute(ValidatorPlugIn.VALIDATOR_KEY + prefix, resources);\n \n servletContext.setAttribute(ValidatorPlugIn.STOP_ON_ERROR_KEY + '.'\n + prefix,\n (this.stopOnFirstError ? Boolean.TRUE : Boolean.FALSE));\n } catch (Exception e) {\n throw new StrutsException(\n \"Cannot load a validator resource from '\" + pathnames + \"'\", e);\n }\n }\n }", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\n }", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\n registry.addResourceHandler(\"/resources/**\")\n .addResourceLocations(\"/resources/\");\n }", "protected abstract String getResourcePath();", "@Override\n public Enumeration<URL> getResources(String name) throws IOException {\n if (\"META-INF/services/org.neo4j.ogm.spi.CypherModificationProvider\".equals(name)) {\n return Collections.enumeration(Arrays.asList(\n super.getResource(\"spi/cypher_modification1\"),\n super.getResource(\"spi/cypher_modification2\")));\n } else {\n return super.getResources(name);\n }\n }", "private List<JsonObject> addResourceDocsToRegistry(JsonObject swaggerDocObject, String sourceUrl,\n\t String swaggerDocPath) throws RegistryException {\n\n\t\tif (sourceUrl == null) {\n\t\t\tlog.debug(CommonConstants.EMPTY_URL);\n\t\t\tlog.warn(\"Resource paths cannot be read. Creating the REST service might fail.\");\n\t\t\treturn null;\n\t\t} else if (sourceUrl.startsWith(\"file\")) {\n\t\t\tsourceUrl = sourceUrl.substring(0,sourceUrl.lastIndexOf(\"/\"));\n\t\t}\n\n\t\tList<JsonObject> resourceObjects = new ArrayList<>();\n\t\t//Adding Resource documents to registry.\n\t\tJsonArray pathResources = swaggerDocObject.get(SwaggerConstants.APIS).getAsJsonArray();\n\t\tByteArrayOutputStream resourceContentStream = null;\n\t\tInputStream resourceInputStream = null;\n\t\tString path;\n\n\t\t/*\n\t\tLoops through apis array of the swagger 1.2 api-doc and reads all the resource documents and saves them in to\n\t\tthe registry.\n\t\t */\n\t\tfor (JsonElement pathResource : pathResources) {\n\t\t\tJsonObject resourceObj = pathResource.getAsJsonObject();\n\t\t\tpath = resourceObj.get(SwaggerConstants.PATH).getAsString();\n\t\t\ttry {\n\t\t\t\tresourceInputStream = new URL(sourceUrl + path).openStream();\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RegistryException(\"The URL \" + sourceUrl + path + \" is incorrect.\", e);\n\t\t\t}\n\t\t\tresourceContentStream = CommonUtil.readSourceContent(resourceInputStream);\n\t\t\tJsonObject resourceObject = parser.parse(resourceContentStream.toString()).getAsJsonObject();\n\t\t\tresourceObjects.add(resourceObject);\n\t\t\tif (endpointElement == null) {\n\t\t\t\tcreateEndpointElement(resourceObject, SwaggerConstants.SWAGGER_VERSION_12);\n\t\t\t}\n\t\t\t//path = swaggerResourcesPath + path;\n path = path.replace(\"/\",\"\");\n path = CommonUtil.replaceExpressionOfPath(swaggerResourcesPath, \"name\", path);\n path = RegistryUtils.getAbsolutePath(registry.getRegistryContext(),path);\n\t\t\t//Save Resource document to registry\n\t\t\tif(addSwaggerDocumentToRegistry(resourceContentStream, path, documentVersion)) {\n //Adding an dependency to API_DOC\n registry.addAssociation(swaggerDocPath, path, CommonConstants.DEPENDS);\n }\n\t\t}\n\n\t\tCommonUtil.closeOutputStream(resourceContentStream);\n\t\tCommonUtil.closeInputStream(resourceInputStream);\n\t\treturn resourceObjects;\n\t}", "ResourceLocation withExtension(String newExtension);", "private static void deployStaticHEResources(String targetDir, boolean bootstrappingEnabled) throws URISyntaxException, IOException{\r\n \t\r\n\t\tClassLoader loader = ServiceGenerator.class.getClassLoader();\r\n\t\tURI jniInterfaceFilePath = loader.getResource(Constants.HE_SERVICE_RESOURCES_FOLDER \r\n\t\t\t\t+ Constants.SERVICE_JNI_INTERFACE_FILE_NAME).toURI();\r\n\t\tURI jniInterfaceHeaderFilePath = loader.getResource(Constants.HE_SERVICE_RESOURCES_FOLDER \r\n\t\t\t\t+ Constants.SERVICE_JNI_INTERFACE_HEADER_FILE_NAME).toURI();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tFile origJniInterfaceFile = new File(jniInterfaceFilePath);\r\n\t\tFile newJniInterfaceFile = new File(targetDir + origJniInterfaceFile.getName());\r\n\t\t\r\n\t\tFile origJniInterfaceHeaderFile = new File(jniInterfaceHeaderFilePath);\r\n\t\tFile newJniInterfaceHeaderFile = new File(targetDir + origJniInterfaceHeaderFile.getName());\r\n\t\t\t\t\t\t\r\n\t\t \t\t\r\n\t\tUtils.deployStaticResource(origJniInterfaceFile, newJniInterfaceFile);\r\n\t\tUtils.deployStaticResource(origJniInterfaceHeaderFile, newJniInterfaceHeaderFile);\r\n }", "private void getFileAsResourceSpaceDelineated(Class c){\n try{\n s = new Scanner(c.getResourceAsStream(resourceName)); \n while (s.hasNext())\n this.input.add(s.next());\n\n setHeaderLine(this.input.get(0));\n \n } catch(Exception e){\n e.printStackTrace();\n }\n }", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\n super.addResourceHandlers(registry);\n }", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\n registry.addResourceHandler(\"/app/**\").addResourceLocations(\"classpath:/static/\");\n }", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\n super.addResourceHandlers(registry);\n }", "@Override\n\tpublic void addResourceHandlers(ResourceHandlerRegistry registry) {\n\t\t//exposes photos in the user-photo directory\n\t\t\n\t\tString dirName = \"user-photos\";\n\t\t//directory path\n\t\tPath userPhotosDir = Paths.get(dirName);\n\t\t\n\t\t//get absolute path\n\t\tString userPhotosPath = userPhotosDir.toFile().getAbsolutePath();\n\t\t\n\t\tregistry.addResourceHandler(\"/\" + dirName + \"/**\")\n\t\t.addResourceLocations(\"file:/\" + userPhotosPath + \"/\");\n\t\t\n\t\t//exposes images in category-image directory\n\t\tString categoryImagesDirName = \"../category-images\";\n\t\t//directory path\n\t\tPath categoryImagesDir = Paths.get(categoryImagesDirName);\n\t\t\n\t\t//get absolute path\n\t\tString categoryImagesPath = categoryImagesDir.toFile().getAbsolutePath();\n\t\t\n\t\tregistry.addResourceHandler(\"/category-images/**\")\n\t\t.addResourceLocations(\"file:/\" + categoryImagesPath + \"/\");\n\t}", "public void loadResources();", "void addElement(String newSubResourceName, ResourceBase newSubResource);", "private void initResource(final ResourceReference ref) throws ResourceStreamNotFoundException {\n\t\tfinal boolean gzip = Application.get().getResourceSettings().getDisableGZipCompression();\n\t\ttry {\n\t\t\tApplication.get().getResourceSettings().setDisableGZipCompression(true);\n\t\t\tref.getResource().getResourceStream().getInputStream();\n\t\t} finally {\n\t\t\tApplication.get().getResourceSettings().setDisableGZipCompression(gzip);\n\t\t}\n\t}", "private Assets (){}", "@Override\n public void addedResource( ResourceEvent event )\n {\n }", "public JhoveResources() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void addResourceHandlers(ResourceHandlerRegistry registry) {\n\t\t// add a cache period of one week to static resources returned by Tomcat\n\t\tregistry.addResourceHandler(\"/resources/**\")\n\t\t\t\t.addResourceLocations(\"/resources/\")\n\t\t\t\t.setCachePeriod( 604800 ); // one week in seconds\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 }", "@Override\r\n\tpublic void addResourceHandlers(ResourceHandlerRegistry registry) {\r\n\t\tregistry.addResourceHandler(\"/static/**\").addResourceLocations(\r\n\t\t\t\t\"/static/\");\r\n\t}", "protected void handleChangedResources() {\r\n\t\tif (!changedResources.isEmpty()\r\n\t\t\t\t&& (!isDirty() || handleDirtyConflict())) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (isDirty()) {\r\n\t\t\t\tchangedResources.addAll(editingDomain.getResourceSet()\r\n\t\t\t\t\t\t.getResources());\r\n\t\t\t}\r\n\t\t\teditingDomain.getCommandStack().flush();\r\n\r\n\t\t\tupdateProblemIndication = false;\r\n\t\t\tfor (Resource resource : changedResources) {\r\n\t\t\t\tif (resource.isLoaded()) {\r\n\t\t\t\t\tresource.unload();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tresource.load(Collections.EMPTY_MAP);\r\n\t\t\t\t\t} catch (IOException exception) {\r\n\t\t\t\t\t\tif (!resourceToDiagnosticMap.containsKey(resource)) {\r\n\t\t\t\t\t\t\tresourceToDiagnosticMap\r\n\t\t\t\t\t\t\t\t\t.put(resource, analyzeResourceProblems(\r\n\t\t\t\t\t\t\t\t\t\t\tresource, exception));\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\r\n\t\t\tif (AdapterFactoryEditingDomain.isStale(editorSelection)) {\r\n\t\t\t\tsetSelection(StructuredSelection.EMPTY);\r\n\t\t\t}\r\n\r\n//\t\t\tupdateProblemIndication = true;\r\n//\t\t\tupdateProblemIndication();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void addResourceHandlers(ResourceHandlerRegistry registry) {\n\t\tsuper.addResourceHandlers(registry);\r\n\t}", "private void loadExtensionResources() {\n\n for (String extensionType : ExtensionMgtUtils.getExtensionTypes()) {\n Path path = ExtensionMgtUtils.getExtensionPath(extensionType);\n if (log.isDebugEnabled()) {\n log.debug(\"Loading default templates from: \" + path);\n }\n\n // Check whether the given extension type directory exists.\n if (!Files.exists(path) || !Files.isDirectory(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Default templates directory does not exist: \" + path);\n }\n continue;\n }\n\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addExtensionType(extensionType);\n\n // Load extensions from the given extension type directory.\n try (Stream<Path> directories = Files.list(path).filter(Files::isDirectory)) {\n directories.forEach(extensionDirectory -> {\n try {\n // Load extension info.\n ExtensionInfo extensionInfo = loadExtensionInfo(extensionDirectory);\n if (extensionInfo == null) {\n throw new ExtensionManagementException(\"Error while loading extension info from: \"\n + extensionDirectory);\n }\n extensionInfo.setType(extensionType);\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addExtension(extensionType,\n extensionInfo.getId(), extensionInfo);\n // Load templates.\n JSONObject template = loadTemplate(extensionDirectory);\n if (template != null) {\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addTemplate(extensionType,\n extensionInfo.getId(), template);\n }\n // Load metadata.\n JSONObject metadata = loadMetadata(extensionDirectory);\n if (metadata != null) {\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addMetadata(extensionType,\n extensionInfo.getId(), metadata);\n }\n } catch (ExtensionManagementException e) {\n log.error(\"Error while loading resource files in: \" + extensionDirectory, e);\n }\n });\n } catch (IOException e) {\n log.error(\"Error while loading resource files in: \" + path, e);\n }\n }\n }", "public void registerResources(final File file) throws IOException {\n FileFilter fileFilter = new ResourceFileFilter();\n if (!file.isDirectory() && fileFilter.accept(file)) {\n registerResource(createResource(file));\n } else {\n File[] files = file.listFiles(fileFilter);\n if (files != null) {\n for (File resourceFile : files)\n registerResources(resourceFile);\n }\n }\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 }", "public void addResourceHandlers(ResourceHandlerRegistry registry){\n\t\tregistry.addResourceHandler(\"/resources/**\").addResourceLocations(\"/WEB-INF/resources/\");\n\t}", "private void handleResources() throws MojoExecutionException {\n List<Resource> resources = project.getResources();\n if (resources.isEmpty()) {\n return;\n }\n Plugin resourcesPlugin = project.getPlugin(ORG_APACHE_MAVEN_PLUGINS + \":\" + MAVEN_RESOURCES_PLUGIN);\n if (resourcesPlugin == null) {\n return;\n }\n executeMojo(\n plugin(\n groupId(ORG_APACHE_MAVEN_PLUGINS),\n artifactId(MAVEN_RESOURCES_PLUGIN),\n version(resourcesPlugin.getVersion()),\n resourcesPlugin.getDependencies()),\n goal(\"resources\"),\n getPluginConfig(resourcesPlugin),\n executionEnvironment(\n project,\n session,\n pluginManager));\n }", "java.lang.String getResourceUri();", "@Override\r\n\tpublic boolean addSource(Resource resource) {\n\t\treturn this.excuteDb(\"insert into resource (style_id,title,size,language,banben,text,inputtime,res_add,image_add) values(?,?,?,?,?,?,?,?,?)\",new Object[]{\r\n\t\t\t\tresource.getStyleid(),\r\n\t\t\t\tresource.getTitle(),\r\n\t\t\t\tresource.getSize(),\r\n\t\t\t\tresource.getLanguage(),\r\n\t\t\t\tresource.getBanben(),\r\n\t\t\t\tresource.getText(),\r\n\t\t\t\tresource.getInputtime(),\r\n\t\t\t\tresource.getResadd(),\r\n\t\t\t\tresource.getImageadd()\r\n\t\t} );\r\n\t}", "public void addResource(S... resources) {\r\n\t\tfor (S resource : resources) {\r\n\t\t\tthis.resourcesList.add(resource);\r\n\t\t}\t\t\r\n\t}", "private void renderResources(HttpServletRequest request, HttpServletResponse response, MergeableResources codeResources, Writer out) {\n List<CMAbstractCode> codes = codeResources.getMergeableResources();\n\n //set correct contentType\n response.setContentType(contentType);\n\n for (CMAbstractCode code : codes) {\n renderResource(request, response, code, out);\n }\n\n }", "protected void addResource(String resource, String httpMethod, ServiceCall serviceCall) {\n dispatcher.addResource(resource, httpMethod, serviceCall);\n }", "@Override\n public void scan() throws Exception {\n if (getContexts() == null) {\n throw new IllegalArgumentException(\"No HandlerContainer\");\n }\n\n Resource r = Resource.newResource(getWebAppDir());\n if (!r.exists()) {\n throw new IllegalArgumentException(\"No such webapps resource \" + r);\n }\n\n if (!r.isDirectory()) {\n throw new IllegalArgumentException(\"Not directory webapps resource \" + r);\n }\n\n String[] files = r.list();\n\n files:\n for (int f = 0; (files != null) && (f < files.length); f++) {\n String context = files[f];\n\n if (context.equalsIgnoreCase(\"CVS/\") || context.equalsIgnoreCase(\"CVS\") || context.startsWith(\".\")) {\n continue;\n }\n\n Resource app = r.addPath(r.encode(context));\n\n if (context.toLowerCase().endsWith(\".war\") || context.toLowerCase().endsWith(\".jar\")) {\n context = context.substring(0, context.length() - 4);\n Resource unpacked = r.addPath(context);\n\n if ((unpacked != null) && unpacked.exists() && unpacked.isDirectory()) {\n Log.debug(context + \" already exists.\");\n continue;\n }\n } else if (!app.isDirectory()) {\n Log.debug(app + \" Not directory\");\n continue;\n }\n\n if (context.equalsIgnoreCase(\"root\") || context.equalsIgnoreCase(\"root/\")) {\n context = URIUtil.SLASH;\n } else {\n context = \"/\" + context;\n }\n if (context.endsWith(\"/\") && (context.length() > 0)) {\n context = context.substring(0, context.length() - 1);\n }\n\n // Check the context path has not already been added or the webapp\n // itself is not already deployed\n if (!getAllowDuplicates()) {\n Handler[] installed = getContexts().getChildHandlersByClass(ContextHandler.class);\n for (int i = 0; i < installed.length; i++) {\n ContextHandler c = (ContextHandler) installed[i];\n\n if (context.equals(c.getContextPath())) {\n if (Log.isDebugEnabled()) {\n Log.debug(context + \" Context were equal; duplicate!\");\n }\n continue files;\n }\n\n String path;\n if (c instanceof WebAppContext) {\n path = Resource.newResource(((WebAppContext) c).getWar()).getFile().getAbsolutePath();\n } else {\n path = c.getBaseResource().getFile().getAbsolutePath();\n }\n\n if ((path != null) && path.equals(app.getFile().getAbsolutePath())) {\n if (Log.isDebugEnabled()) {\n Log.debug(path + \" Paths were equal; duplicate!\");\n }\n continue files;\n }\n\n }\n }\n\n // create a webapp\n WebAppContext wah = null;\n HandlerCollection contexts = getContexts();\n if ((contexts instanceof ContextHandlerCollection)\n && WebAppContext.class.isAssignableFrom(((ContextHandlerCollection) contexts).getContextClass())) {\n try {\n wah = (WebAppContext) ((ContextHandlerCollection) contexts).getContextClass().newInstance();\n } catch (Exception e) {\n throw new Error(e);\n }\n } else {\n wah = new WebAppContext();\n }\n\n // configure it\n wah.setContextPath(context);\n\n if (getConfigurationClasses() != null) {\n wah.setConfigurationClasses(getConfigurationClasses());\n }\n\n if (getDefaultsDescriptor() != null) {\n wah.setDefaultsDescriptor(getDefaultsDescriptor());\n }\n wah.setExtractWAR(isExtract());\n wah.setWar(app.toString());\n wah.setParentLoaderPriority(isParentLoaderPriority());\n\n Enumeration<?> names = _attributes.getAttributeNames();\n while (names.hasMoreElements()) {\n String name = (String) names.nextElement();\n wah.setAttribute(name, _attributes.getAttribute(name));\n }\n\n // add it\n Log.debug(\"AndroidWebAppDeployer: prepared \" + app.toString());\n contexts.addHandler(wah);\n _deployed.add(wah);\n //jetty-7.3.0 onwards need to start explicitly due to different startup time ordering\n wah.start();\n }\n }", "public boolean getResourceFile(HttpServletRequest request, HttpServletResponse response) throws IOException\n {\n String path = request.getPathInfo();\n if (path == null)\n return false;\n if (!path.startsWith(\"/\"))\n path = \"/\" + path; // Must start from root\n \n URL url = this.getClass().getResource(path);\n if (url == null)\n return false; // Not found\n InputStream inStream = null;\n try {\n inStream = url.openStream();\n } catch (Exception e) {\n return false; // Not found\n }\n \n // Todo may want to add cache info (using bundle lastModified).\n OutputStream writer = response.getOutputStream();\n copyStream(inStream, writer);\n writer.close();\n return true;\n }", "public void testResourceURI() throws Exception {\n testResourceURI(\"RELS-EXT\");\n testResourceURI(\"RELS-INT\");\n }", "@Override\n public boolean isAResource() { return true; }", "public void addExternalFilesCP(File f) { externalFilesCP.add(f); }", "public void processClassResourceAnnotations ()\n throws Exception\n {\n List<Class<?>> classes = _finder.getClassesForAnnotation(Resource.class);\n for (Class<?> clazz:classes)\n {\n if (!isServletType(clazz))\n {\n Log.debug(\"Ignoring @Resource annotation on on-servlet type class \"+clazz.getName());\n continue;\n }\n //Handle Resource annotation - add namespace entries\n Resource resource = (Resource)clazz.getAnnotation(Resource.class);\n if (resource != null)\n {\n String name = resource.name();\n String mappedName = resource.mappedName();\n Resource.AuthenticationType auth = resource.authenticationType();\n Class type = resource.type();\n boolean shareable = resource.shareable();\n \n if (name==null || name.trim().equals(\"\"))\n throw new IllegalStateException (\"Class level Resource annotations must contain a name (Common Annotations Spec Section 2.3)\");\n \n try\n {\n //TODO don't ignore the shareable, auth etc etc\n if (!org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(_webApp, name,mappedName))\n if (!org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(_webApp.getServer(), name,mappedName))\n throw new IllegalStateException(\"No resource at \"+(mappedName==null?name:mappedName));\n }\n catch (NamingException e)\n {\n throw new IllegalStateException(e);\n }\n }\n }\n }", "public IPath[] getAdditionalResources();", "ResourceFilesType createResourceFilesType();", "@Override\n public void parseEmbedded(InputStream stream, ContentHandler handler, Metadata metadata, boolean outputHtml)\n throws SAXException, IOException {\n String name = metadata.get(Metadata.RESOURCE_NAME_KEY);\n\n if (name == null) {\n name = \"file_\" + fileCount++;\n } else {\n //make sure to select only the file name (not any directory paths\n //that might be included in the name) and make sure\n //to normalize the name\n name = FilenameUtils.normalize(FilenameUtils.getName(name));\n }\n\n //now try to figure out the right extension for the embedded file\n MediaType contentType = detector.detect(stream, metadata);\n\n if (name.indexOf('.') == -1 && contentType != null) {\n try {\n name += config.getMimeRepository().forName(\n contentType.toString()).getExtension();\n } catch (MimeTypeException e) {\n e.printStackTrace();\n }\n }\n //should add check to make sure that you aren't overwriting a file\n Path outputFile = outputDir.resolve(name);\n //do a better job than this of checking\n java.nio.file.Files.createDirectories(outputFile.getParent());\n java.nio.file.Files.copy(stream, outputFile, StandardCopyOption.REPLACE_EXISTING);\n\n //上传图片,返回Url,并建立一个映射表\n Calendar calendar = Calendar.getInstance();\n SimpleDateFormat DateFormat = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n String dateStr = DateFormat.format(calendar.getTime());\n\n String key = dateStr+\"_\"+UUID.randomUUID().toString()+\"_\"+name;\n String qiniuurl = \"\";\n try {\n File file = new File(outputFile.toString());\n InputStream in = new FileInputStream(file);\n byte b[]=new byte[(int)file.length()];\n in.read(b);\n in.close();\n qiniuurl = fu.fileUpload(uploadManager, b, key, null, contentType.toString());\n imgPathMap.put(name,qiniuurl);\n logger.info(\"=====图片url:\"+qiniuurl);\n }catch (Exception e){\n e.printStackTrace();\n }\n }", "public URL getResourceLocation( String name );", "public void addFile(File aResourceFile) {\n\t\tif (!aResourceFile.exists()) {\n\t\t\tignoredReferences.put(aResourceFile.getPath(), \"does not exists\");\n\t\t\treturn;\n\t\t}\n\t\tif (!aResourceFile.isFile()) {\n\t\t\tignoredReferences.put(aResourceFile.getPath(), \"is no file\");\n\t\t\treturn;\n\t\t}\n\t\tif (!aResourceFile.getAbsolutePath().endsWith(\".integrity\")) {\n\t\t\tignoredReferences.put(aResourceFile.getPath(), \"is no integrity file (*.integrity)\");\n\t\t\treturn;\n\t\t}\n\t\tresourceFiles.add(aResourceFile.getAbsolutePath());\n\t}", "public String processSrcAttribute(FacesContext facesContext, Object o,\r\n String name, String mimeType,\r\n String scope, String url) {\n if (o instanceof IceOutputResource) {\r\n //register resource..do I have to check if it's already there?\r\n IceOutputResource iceResource = (IceOutputResource) o;\r\n if (logger.isLoggable(Level.FINE)) {\r\n logger.fine(\"ALREADY have IceOutputResource so returning:-\" + iceResource.getRequestPath());\r\n }\r\n //set name for resource to component?Hopefully user has created proper iceoutputresource object\r\n //for now just use session scope for testing\r\n return registerAndGetPath(facesContext, scope, iceResource);\r\n }\r\n//\t \r\n if (o instanceof byte[]) {\r\n // have to create the resource first and cache it in ResourceRegistry\r\n //create IceOutputResource\r\n IceOutputResource ior = new IceOutputResource(name, o, mimeType);\r\n//\t \tif (null!= this.mimeType){\r\n//\t\t final String mimeType = attributes.containsKey(\"mimeType\") ? String.valueOf(attributes.get(\"mimeType\")) : \"\";\r\n//\t\t logger.info(\"\\t\\t mimeType=\"+this.mimeType);\r\n//\t\t // update the request headers in iceOutputResource class? as well as content\r\n//\t\t }\r\n String registeredPath = \r\n registerAndGetPath(facesContext, scope, ior);\r\n if (logger.isLoggable(Level.FINE)) {\r\n logger.fine(\"instance of byte array returning path=\" + registeredPath + \" with mimeType=\" + ior.getContentType());\r\n }\r\n return registeredPath;\r\n } else {\r\n // just do default from compat ImageRenderer as it's a static file\r\n return processStaticSrc(facesContext, o, url);\r\n }\r\n\r\n }", "public void setResourcefile (File file)\n {\n _resourcefile = file;\n }", "public void setResourceFile(File fileName) {\n resourceFile = fileName;\n }", "@Override\n protected URL\n findResource\n (\n String rname\n )\n {\n LogMgr.getInstance().log\n (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n \"Resource name (\" + rname + \")\");\n\n if(pResources != null) {\n if(pResources.containsKey(rname)) {\n\tPath resourcePath = new Path(pResourceRootPath, rname);\n\n\tLogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n\t \"Resource path (\" + resourcePath + \")\");\n\n\tFile resourceFile = resourcePath.toFile();\n\n\tLogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n\t \"Resource file (\" + resourceFile + \") exists (\" + resourceFile.exists() + \")\");\n\n\tif(!resourceFile.exists())\n\t return null;\n\n\tURI resourceURI = resourceFile.toURI();\n\n\tLogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n\t \"Resource URI (\" + resourceURI + \")\");\n\n\ttry {\n\t URL resourceURL = resourceURI.toURL();\n\n\t LogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n\t \"Resource URL (\" + resourceURL + \")\");\n\n\t return resourceURL;\n\t}\n\tcatch(MalformedURLException ex) {\n\t LogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Warning, \n\t \"Error constructing URL from (\" + rname + \")!\");\n\t}\n }\n }\n\n return null;\n }", "public void processMethodResourceAnnotations ()\n throws Exception\n {\n //Get all methods that have a Resource annotation\n List<Method> methods = _finder.getMethodsForAnnotation(javax.annotation.Resource.class);\n \n for (Method m: methods)\n {\n if (!isServletType(m.getDeclaringClass()))\n {\n Log.debug(\"Ignoring @Resource annotation on on-servlet type method \"+m.getName());\n continue;\n }\n /*\n * Commons Annotations Spec 2.3\n * \" The Resource annotation is used to declare a reference to a resource.\n * It can be specified on a class, methods or on fields. When the \n * annotation is applied on a field or method, the container will \n * inject an instance of the requested resource into the application \n * when the application is initialized... Even though this annotation \n * is not marked Inherited, if used all superclasses MUST be examined \n * to discover all uses of this annotation. All such annotation instances \n * specify resources that are needed by the application. Note that this \n * annotation may appear on private fields and methods of the superclasses. \n * Injection of the declared resources needs to happen in these cases as \n * well, even if a method with such an annotation is overridden by a subclass.\"\n * \n * Which IMHO, put more succinctly means \"If you find a @Resource on any method\n * or field, inject it!\".\n */\n Resource resource = (Resource)m.getAnnotation(Resource.class);\n if (resource == null)\n continue;\n \n //JavaEE Spec 5.2.3: Method cannot be static\n if (Modifier.isStatic(m.getModifiers()))\n throw new IllegalStateException(m+\" cannot be static\");\n \n \n // Check it is a valid javabean \n if (!IntrospectionUtil.isJavaBeanCompliantSetter(m))\n throw new IllegalStateException(m+\" is not a java bean compliant setter method\");\n \n //default name is the javabean property name\n String name = m.getName().substring(3);\n name = name.substring(0,1).toLowerCase()+name.substring(1);\n name = m.getDeclaringClass().getCanonicalName()+\"/\"+name;\n //allow default name to be overridden\n name = (resource.name()!=null && !resource.name().trim().equals(\"\")? resource.name(): name);\n //get the mappedName if there is one\n String mappedName = (resource.mappedName()!=null && !resource.mappedName().trim().equals(\"\")?resource.mappedName():null);\n \n Class type = m.getParameterTypes()[0];\n \n //get other parts that can be specified in @Resource\n Resource.AuthenticationType auth = resource.authenticationType();\n boolean shareable = resource.shareable();\n \n //if @Resource specifies a type, check it is compatible with setter param\n if ((resource.type() != null) \n && \n !resource.type().equals(Object.class)\n &&\n (!IntrospectionUtil.isTypeCompatible(type, resource.type(), false)))\n throw new IllegalStateException(\"@Resource incompatible type=\"+resource.type()+ \" with method param=\"+type+ \" for \"+m);\n \n //check if an injection has already been setup for this target by web.xml\n Injection webXmlInjection = _injections.getInjection(m.getDeclaringClass(), m);\n if (webXmlInjection == null)\n {\n try\n {\n //try binding name to environment\n //try the webapp's environment first\n boolean bound = org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(_webApp, name, mappedName);\n \n //try the server's environment\n if (!bound)\n bound = org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(_webApp.getServer(), name, mappedName);\n \n //try the jvm's environment\n if (!bound)\n bound = org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(null, name, mappedName);\n \n //TODO if it is an env-entry from web.xml it can be injected, in which case there will be no\n //NamingEntry, just a value bound in java:comp/env\n if (!bound)\n {\n try\n {\n InitialContext ic = new InitialContext();\n String nameInEnvironment = (mappedName!=null?mappedName:name);\n ic.lookup(\"java:comp/env/\"+nameInEnvironment); \n bound = true;\n }\n catch (NameNotFoundException e)\n {\n bound = false;\n }\n }\n \n if (bound)\n {\n Log.debug(\"Bound \"+(mappedName==null?name:mappedName) + \" as \"+ name);\n // Make the Injection for it\n Injection injection = new Injection();\n injection.setTargetClass(m.getDeclaringClass());\n injection.setJndiName(name);\n injection.setMappingName(mappedName);\n injection.setTarget(m);\n _injections.add(injection);\n } \n else if (!isEnvEntryType(type))\n {\n \n //if this is an env-entry type resource and there is no value bound for it, it isn't\n //an error, it just means that perhaps the code will use a default value instead\n // JavaEE Spec. sec 5.4.1.3 \n throw new IllegalStateException(\"No resource at \"+(mappedName==null?name:mappedName));\n }\n }\n catch (NamingException e)\n { \n //if this is an env-entry type resource and there is no value bound for it, it isn't\n //an error, it just means that perhaps the code will use a default value instead\n // JavaEE Spec. sec 5.4.1.3\n if (!isEnvEntryType(type))\n throw new IllegalStateException(e);\n }\n }\n else\n {\n //if an injection is already set up for this name, then the types must be compatible\n //JavaEE spec sec 5.2.4\n \n Object value = webXmlInjection.lookupInjectedValue();\n if (!IntrospectionUtil.isTypeCompatible(type, value.getClass(), false))\n throw new IllegalStateException(\"Type of field=\"+type+\" is not compatible with Resource type=\"+value.getClass());\n }\n }\n }", "void handleNewResource() {\n System.out.println(\"Here at VMLeaseProcessor#handleNewResource\");\n callForBackup();\n resourceManager.createRedundant();\n }", "private void initResources() {\n resources = ResourceBundle.getBundle(\"bundles.ChangeTBRFrameResources\");\n }", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\n WebMvcConfigurer.super.addResourceHandlers(registry);\n registry.addResourceHandler(\"/resources/**\").addResourceLocations(\"WEB-INF/resources/\");\n }", "public void addResource(Resource resource) {\n\t\tresources.add(resource);\n\t}", "public void locateResources() {\n\t\t\n\t\t// Locate resource for tips.txt\n\t\ttipsLocation = Facts.class.getResource(\"tips.txt\");\n\t\t\n\t\t// Throw IllegalArgumentException if resource could not be located\n\t\tif (tipsLocation == null) throw new IllegalArgumentException(\"tipsLocation is null.\"\n\t\t\t\t+ \"Could not locate resource for tips.txt\");\n\t\t\n\t\t\n\t\t// Locate resource for facts.txt\n\t\tfactsLocation = Facts.class.getResource(\"facts.txt\");\n\t\t\n\t\t// Throw IllegalArgumentException if resource could not be located\n\t\tif (factsLocation == null) throw new IllegalArgumentException(\"factsLocation is null.\"\n\t\t\t\t+ \"Could not locate resource for facts.txt\");\n\t\t\n\t}", "private void initResources()\n {\n try\n {\n searchBackgroundImage = ImageIO.read(new File(IMAGES_DIR + \"logo.jpg\"));\n searchIcon = ImageIO.read(new File(IMAGES_DIR + \"search_icon.png\"));\n miniMenuAddImage = ImageIO.read(new File(IMAGES_DIR + \"addSmallIcon.png\"));\n miniMenuRemoveImage = ImageIO.read(new File(IMAGES_DIR + \"removeSmallIcon.png\"));\n updateMiniImage = ImageIO.read(new File(IMAGES_DIR + \"up.png\"));\n playButtonImage = ImageIO.read(new File(IMAGES_DIR + \"play_arrow.png\"));\n stopButtonImage = ImageIO.read(new File(IMAGES_DIR + \"stop_square.png\"));\n openFileImage = ImageIO.read(new File(IMAGES_DIR + \"open_icon.png\"));\n newFileImage = ImageIO.read(new File(IMAGES_DIR + \"new_file.png\"));\n settingsImage = ImageIO.read(new File(IMAGES_DIR + \"settings.png\"));\n spiderImage = ImageIO.read(new File(IMAGES_DIR + \"spider_icon.png\"));\n searchIconDark = ImageIO.read(new File(IMAGES_DIR + \"search_icon_dark.png\"));\n webIconImage = ImageIO.read(new File(IMAGES_DIR + \"web_icon.png\"));\n clipboardImage = ImageIO.read(new File(IMAGES_DIR + \"clipboard.png\"));\n colorIconImage = ImageIO.read(new File(IMAGES_DIR + \"color_icon.png\"));\n transitionSpinnerImage = IMAGES_DIR + \"loading.gif\";\n processingImage = IMAGES_DIR + \"processing.gif\";\n processingMiniImage = IMAGES_DIR + \"spinner.gif\";\n }\n \n catch(IOException e)\n {\n JOptionPane.showMessageDialog(null, \"[Error] Failed to load resource(s)\");\n }\n }", "String getResource();", "Resource getResource();", "public native void addResourcePath(final String name, final String resourcePath, final int type);", "public void resourceLoaded(\n String resourcePath,\n InputStream resourceStream) {\n\n try {\n \n // clear the failure count if necessary\n if (loadFailureCounts.containsKey(resourcePath)) {\n loadFailureCounts.remove(resourcePath);\n }\n \n //now process the raw data into a buffer\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n byte[] buf = new byte[1024];\n for (int readNum; (readNum = resourceStream.read(buf)) != -1;) {\n bos.write(buf, 0, readNum); \n }\n byte[] bytes = bos.toByteArray();\n \n InputStream in = new ByteArrayInputStream(bytes);\n BufferedImage image = javax.imageio.ImageIO.read(in); \n \n // try to retrieve from the classpath\n JToolButton button = urlToButtonMap.get(resourcePath);\n\n // create the necessary icons for button state\n generateButtonIcons(button, image); \n \n // make sure the filters are correctly applied\n catalogFilter.refreshCurrentToolGroup();\n\n // allow selection\n button.setLoaded(true);\n button.addItemListener(this);\n button.revalidate();\n\n } catch (IOException ioe) {\n \n ioe.printStackTrace();\n \n }\n\n }", "@Override\n public void addResourceHandlers(ResourceHandlerRegistry registry) {\n //registry.addResourceHandler(\"/css/**\")\n // .addResourceLocations(\"/WEB-INF/css/\");\n registry.addResourceHandler(\"/js/**\")\n .addResourceLocations(\"/WEB-INF/js/\");\n }", "private void prepareRuleFiles() {\n\n if (IronSyslog.class.getResource(RULE_FOLDER) == null\n || IronSyslog.class.getResource(RULE_FOLDER + \"service/\") == null\n || IronSyslog.class.getResource(RULE_FOLDER + \"publish/\") == null\n || IronSyslog.class.getResource(RULE_FOLDER + \"other/\") == null) {\n LOGGER.error(\"Error while preparing rule files. Broken file system folder structure. \\n\"\n + \"Make sure that: rules/drools/ and its subfolders service/, publish/ and other/ exist\");\n System.exit(1);\n }\n\n // Prepare Configuration\n Yaml yaml = new Yaml();\n InputStream input = IronSyslog.class.getResourceAsStream(RULE_FOLDER\n + \"config.yml\");\n RulesConfiguration config = yaml\n .loadAs(input, RulesConfiguration.class);\n\n try {\n // Add only the service rules (in the service folder) specified in\n // the configuration\n for (String service : config.getServiceInclude()) {\n String fileName = RULE_FOLDER + \"service/\" + service + \".drl\";\n if (IronSyslog.class.getResource(fileName) != null) {\n LOGGER.debug(\"Adding rule file: \" + fileName);\n mRuleFiles.add(RULE_FOLDER + \"service/\" + service + \".drl\");\n } else {\n LOGGER.warn(\"Failed to add rule file: \" + fileName);\n }\n }\n\n // Add all publish rules (in the \"publish\" folder) excluding the one\n // specified on the\n // configuration\n File publishFolder = new File(IronSyslog.class.getResource(\n RULE_FOLDER + \"publish/\").toURI());\n File[] publishFiles = publishFolder.listFiles();\n for (int i = 0; i < publishFiles.length; i++) {\n String fileName = publishFiles[i].getName();\n if (fileName.endsWith(\".drl\")\n && !config.getPublishExclude().contains(\n fileName.substring(0, fileName.length() - 4))) {\n LOGGER.debug(\"Adding rule file: \" + RULE_FOLDER\n + \"publish/\" + fileName);\n mRuleFiles.add(RULE_FOLDER + \"publish/\" + fileName);\n }\n }\n\n // Add all other rules (\"other\" folder, including subfolders)\n addAllRuleFilesInFolder(RULE_FOLDER + \"other/\");\n } catch (URISyntaxException e) {\n LOGGER.debug(\"Error while searching for rule files. \" + e);\n }\n }", "private void getFileAsResourceNewLineDelineated(Class c){\n try{\n s = new Scanner(c.getResourceAsStream(resourceName)); \n while (s.hasNextLine())\n this.input.add(s.nextLine());\n\n setHeaderLine(this.input.get(0));\n \n } catch(Exception e){\n e.printStackTrace();\n }\n }", "@GET\r\n\t@Produces(MediaType.APPLICATION_OCTET_STREAM)\r\n\t@Path(\"assets/{filename}\")\r\n\tpublic Response staticResources(@PathParam(\"filename\") String filename) {\r\n\t\tSystem.out.println(\"Fichier : \" + filename);\r\n\t\t\r\n\t\tString assetsPath = \"./assets/\";\r\n\t\tFile fichier = new File(assetsPath + filename );\r\n\t\t\r\n\t\tif( !fichier.exists() ) {\r\n\t\t\treturn Response.status(404).build();\r\n\t\t}\r\n\t\treturn Response.ok(fichier, MediaType.APPLICATION_OCTET_STREAM)\r\n\t\t .header(\"Content-Disposition\", \"attachment; filename=\\\"\" + fichier.getName() + \"\\\"\")\r\n\t\t\t .build();\r\n\t}", "public interface IResourceSource\n{\n /**\n * Get resource location based on resource name.\n *\n * @param name Name of resource to be searched\n * @return URL of resource\n */\n public URL getResourceLocation( String name );\n\n /**\n * Get resource locations based on resource name.\n *\n * @param name Name of resources to be searched\n * @return Enumeration of URLs of resources\n */\n public Enumeration getResourceLocations( String name );\n\n /**\n * Get resource path this resource source references. Each entry including the last must be\n * terminated with a semicolon.\n *\n * @return Resource path this resource source references\n */\n public String getResourcePath();\n}", "public abstract IResource getResource();", "@Override\r\n\tpublic void update(Resources resources) {\n\t\t\r\n\t}", "public void updateResources(List<Resource> resources) {\n\t\t\n\t}", "public abstract ResourceDataSet loadResources() ;", "public void resourcesLocation (String folder) {\n staticFileFolder = folder.startsWith (\"/\")? folder.substring (1) : folder;\n }", "@Override\n \n \n public void initialize(URL url, ResourceBundle rb) {\n retornararImg();\n\n }" ]
[ "0.62108034", "0.6135801", "0.61254966", "0.608055", "0.6032109", "0.59366053", "0.5913654", "0.5899331", "0.5881052", "0.58748317", "0.58507586", "0.5844875", "0.58188015", "0.58100134", "0.5788955", "0.57738185", "0.5773283", "0.57541865", "0.5736653", "0.57067317", "0.57046837", "0.57034975", "0.56999016", "0.56932163", "0.5679879", "0.567144", "0.5669436", "0.56677204", "0.5666746", "0.56525105", "0.5650732", "0.5646197", "0.56385845", "0.56352735", "0.5634893", "0.5609814", "0.560043", "0.5595415", "0.5591629", "0.5584639", "0.5560624", "0.5543363", "0.5536794", "0.552609", "0.55141044", "0.5513178", "0.5511999", "0.5511651", "0.55017954", "0.5500022", "0.54977876", "0.5474558", "0.5468288", "0.5467358", "0.544816", "0.54280543", "0.5417547", "0.5415136", "0.5410506", "0.5405274", "0.5401838", "0.5393742", "0.536944", "0.53662944", "0.5363373", "0.5356232", "0.5355214", "0.5354204", "0.53533524", "0.53523105", "0.53511757", "0.53498006", "0.53482103", "0.53442216", "0.53352344", "0.53320295", "0.5323271", "0.5318489", "0.5280094", "0.5271009", "0.5270758", "0.52696264", "0.5267475", "0.526425", "0.52432066", "0.5243129", "0.5242397", "0.5240521", "0.52374226", "0.5234632", "0.52281326", "0.5219615", "0.52135605", "0.5197513", "0.51974815", "0.5197333", "0.5192674", "0.51838547", "0.51727325", "0.51688373", "0.5168545" ]
0.0
-1
/return "" + Integer.toHexString(getRed()) +Integer.toHexString(getGreen()) +Integer.toHexString(getBlue());
public String getHexa() { return String.format("#%02x%02x%02x", getRed(), getGreen(), getBlue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString(){\n\t\treturn (red + \" \" + green + \" \" + blue + \"\\n\");\n\t}", "public String toString() {\n return \"#ffff00\";\n }", "@Override\n public String toString() {\n if(a != -1) {\n return String.format(\"#%08X\", toARGB());\n } else {\n return String.format(\"#%06X\", toARGB() & 0xFFFFFF);\n }\n }", "public String getColorString();", "String getColor();", "private static String ColorHexString(final Color c) {\n\t\treturn (\"#\" // +Integer.toHexString(c.getRGB());\n\t\t + Integer.toHexString(256 + c.getRed()).substring(1)\n\t\t + Integer.toHexString(256 + c.getGreen()).substring(1)\n\t\t + Integer.toHexString(256 + c.getBlue()).substring(1));\n\t}", "public String toCodedString() {\n\t\t//System.out.println(toString());\n\t\treturn String.format(\"%s%s\", getColor().toInt(), getShape().toString());\n\t}", "public String getHtmlColor() {\n\t\tString sRed = Integer.toHexString(color.getRed());\n\t\tString sGreen = Integer.toHexString(color.getGreen());\n\t\tString sBlue = Integer.toHexString(color.getBlue());\n\t\t\n\t\treturn \"#\" + (sRed.length() == 1 ? \"0\" + sRed : sRed) +\n\t\t\t\t(sGreen.length() == 1 ? \"0\" + sGreen : sGreen) +\n\t\t\t\t(sBlue.length() == 1 ? \"0\" + sBlue : sBlue);\n\t}", "public String Color2Hex(int r, int g, int b)\n\t{\n Color c = new Color(r,g,b);\n String s=Integer.toHexString( c.getRGB() & 0x00ffffff ).toUpperCase() ;\n while(s.length()<6)\n \t s=\"0\"+s;\n return s;\n }", "public String getColorString() {\n return left.toString() + \", \" + right.toString();\n }", "public\n static\n String convertColorToString(Color val)\n {\n String ret_String;\n\n int a;\n try {\n a = val.getAlpha();\n }\n catch (NoSuchMethodError excp) {\n System.out.println(\"YutilProperties:convertColorToString:excp=[\" + excp + \"]\");\n a = 0xFF;\n }\n int r = val.getRed(), g = val.getGreen(), b = val.getBlue();\n String as, rs, gs, bs;\n\n rs = Integer.toHexString(r); if (rs.length() == 1) rs = \"0\" + rs;\n gs = Integer.toHexString(g); if (gs.length() == 1) gs = \"0\" + gs;\n bs = Integer.toHexString(b); if (bs.length() == 1) bs = \"0\" + bs;\n\n if (a == 0xFF)\n {\n ret_String = \"#\" + rs + gs + bs;\n }\n else\n {\n as = Integer.toHexString(a); if (as.length() == 1) as = \"0\" + as;\n ret_String = \"#\" + as + rs + gs + bs;\n } \n\n return ret_String;\n }", "public String toString()\r\n\t{\r\n\t\tString output = \"Color = \" + this.color + \", \";\r\n\t\toutput += super.toString();\r\n\t\treturn output;\r\n\t}", "private static String formatHexString(Color c) {\n return c != null?String.format(null, \"#%02x%02x%02x\", new Object[]{Long.valueOf(Math.round(c.getRed() * 255.0D)), Long.valueOf(Math.round(c.getGreen() * 255.0D)), Long.valueOf(Math.round(c.getBlue() * 255.0D))}).toUpperCase():null;\n }", "public String getColor() {\r\n\t\treturn \"Color = [\"+ ColorUtil.red(color) + \", \"+ ColorUtil.green(color) + \", \"+ ColorUtil.blue(color) + \"]\";\r\n\t}", "public static String makeHexColorInt(int... vals){\n\t\treturn \"\"+formatNumberString(Integer.toHexString((int)vals[0]),2)+\"\"+formatNumberString(Integer.toHexString((int)vals[1]),2)+\"\"+formatNumberString(Integer.toHexString((int)vals[2]),2);\n\t}", "String getColour();", "public String toString() {\n\t\t\n\t\treturn this.getColor() + \"B\";\n\t}", "public String printColors(){\n String RGB = \"\";\n detectedColor = m_colorSensor.getColor();\n RGB = \"Red: \" + detectedColor.red + \", Green: \" + detectedColor.green + \", Blue: \" + detectedColor.blue;\n return RGB;\n }", "public String toString()\n {\n return color.charAt(0) + \"Q\";\n }", "private String getHexColor(int intColor) {\n String hexColor = String.format(\"#%06X\", (0xFFFFFF & intColor));\n return hexColor;\n }", "@Override\n Color getColor() {\n return new Color(32, 83, 226, 255);\n }", "@Override\n\tpublic String toString() {\n\t\tString str_a, str_b, str_c, str_d;\n\t\tstr_a = (a==null)?\"\":a.toString();\n\t\tstr_b = (b==null)?\"\":b.toString();\n\t\tstr_c = (c==null)?\"\":c.toString();\n\t\tstr_d = (d==null)?\"\":d.toString();\n\t\t\n\t\treturn String.format(\"%d(%s)(%s)(%s)(%s)\", this.color, str_a, str_b, str_c, str_d);\n\t}", "@Override\n public String toString() {\n return color.name();\n }", "@NoProxy\n @NoWrap\n @NoDump\n public String getColor() {\n return color;\n }", "public String showColor(){\r\n\t\tSystem.out.println(\"The color of this fruit is \" + color);\r\n\t\treturn color;}", "public String toString()\r\n {\r\n if(_switchedOn)\r\n return _color + \" On\";\r\n else\r\n return _color + \" Off\";\r\n }", "public String getColor(){\r\n return color;\r\n }", "public static String getHexString(java.awt.Color color)\n {\n String r;\n String g;\n String b;\n r = Integer.toHexString(color.getRed());\n\n if (r.length() < 2)\n {\n r = \"0\" + r;\n }\n\n g = Integer.toHexString(color.getGreen());\n\n if (g.length() < 2)\n {\n g = \"0\" + g;\n }\n\n b = Integer.toHexString(color.getBlue());\n\n if (b.length() < 2)\n {\n b = \"0\" + b;\n }\n\n return r + g + b;\n }", "public String toString() {\r\n\t\tString str = color.substring(0,1).toUpperCase()\r\n\t\t\t\t + color.substring(1) + \" \" \r\n\t\t\t\t + name.substring(0,1).toUpperCase()\r\n\t\t\t\t + name.substring(1);\r\n\t\treturn str;\r\n\t}", "public String getColor() { \n return color; \n }", "abstract String getColor();", "public char getColor();", "public int getRed() {\n\t\treturn 100;\n\t}", "public Color color() {\n r = 34;\n g = 0;\n b = 231;\n return color(r, g, b);\n }", "public String getColor(){\n return this.color;\n }", "public int getColor();", "public int getColor();", "public static String makeHexColor(double... vals){\n\t\treturn \"\"+formatNumberString(Integer.toHexString((int)((vals[0] * 256) - 1)),2)+\"\"+formatNumberString(Integer.toHexString((int)((vals[1] * 256) - 1)),2)+\"\"+formatNumberString(Integer.toHexString((int)((vals[2] * 256) - 1)),2);\n\t}", "@Override\n public String toString() {\n\treturn ByteUtils.toHexString(toByteArray(), true);\n }", "Integer getTxtColor();", "@Override\r\n\tpublic String Color() {\n\t\treturn Color;\r\n\t}", "public static String purple(String text){\n return ANSI_PURPLE + text + ANSI_PURPLE;\n }", "public String getColor() {\n\t\treturn \"Elcolor del vehiculo es: \"+color; \n\t }", "public void testAsString() {\n\t\tSystem.out.println(\"==============================\");\n\t\tSystem.out.println(\"VALUES CURRENTLY IN PIXEL NODE\");\n\t\tSystem.out.println(\"==============================\");\n\t\tSystem.out.println(\"Red Color is : \" + this.redColor);\n\t\tSystem.out.println(\"Green Color is : \" + this.greenColor);\n\t\tSystem.out.println(\"Blue Color is : \" + this.blueColor);\n\t\t// System.out.println(\"\\nTEST OF VALUES NORMALIZED TO 0-255\\n\");\n\t\t// System.out.println(\"Red : \" + (int)((this.redColor % 1) * 255));\n\t\t// System.out.println(\"Green : \" + (int)((this.greenColor % 1) * 255));\n\t\t// System.out.println(\"Blue : \" + (int)((this.blueColor % 1) * 255));\n\t\tSystem.out.println();\n\t}", "public String toString()\n {\n StringBuilder builder = new StringBuilder();\n builder.append( \"origin=\" );\n builder.append( origin.toString() );\n builder.append( \",color=\" );\n builder.append( \n color == null ? \n \"null\" : \n String.format(\"#%02x%02x%02x\", color.getRed(), color.getGreen(), color.getBlue() ) \n );\n \n return builder.toString();\n }", "static public long buildColor(int r, int g, int b) {\n\t\treturn ((r) | ((g) << 8) | ((b) << 16));\n\t}", "@Override\n\tpublic String getColor() {\n\t\treturn \"red\";\n\t}", "int getColour();", "abstract public String getColor();", "abstract public String getColor();", "private static String getColorString(int index) {\n switch (index) {\n case 0: return \"None\";\n case 1: case 6: return \"Orange\";\n case 2: case 7: return \"Green\";\n case 3: return \"Blue\";\n case 4: case 14: return \"Yellow\";\n case 8: return \"Black\";\n default: return \"not a color\";\n }\n }", "public String getColor()\n {\n return color;\n }", "public String getColor()\n {\n return color;\n }", "private String Hexa(int num) {\n if (num < 0)\n {\n return Integer.toHexString(num).substring(4);\n }\n String str = Integer.toHexString(num);\n while (str.length()<4)\n {\n str = \"0\" + str;\n }\n return str;\n }", "public String getColor(){\n return this._color;\n }", "public String toString(){\n\n\t\tString output =\"\";\n\n\t\tfor(int i=0; i<items.size(); i++){\n\t\t\tPeg peg = items.get(i);\n\t\t\toutput+=peg.getColor();\n\t\t}// end for\n\n\t\treturn output;\n\t}", "public String listOfColors() {\r\n\t\t StringBuilder sb = new StringBuilder();\r\n for (Iterator<Color> it = colors.iterator(); it.hasNext();){\r\n\t\t\t Color c = (Color) it.next();\r\n \t sb.append(c.toString() + NL);\r\n }\r\n return sb.toString();\r\n }", "public String getColor(){\n\t\treturn color;\n\t}", "public String toString() {\n\t\tString palabra = \"\";\n\t\tfor (int i = 0; i < obtenerNumeroFilas(); ++i) {\n\t\t\tfor (int j = 0; j < obtenerNumeroColumnas(); ++j) {\n\t\t\t\tif (obtenerCelda(i, j) == null) {\n\t\t\t\t\tpalabra = \"--\\t\";\n\t\t\t\t} else {\n\t\t\t\t\tpalabra = obtenerCelda(i, j).obtenerAtomo().obtenerColor().toChar() + \"\\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tpalabra = \"\\n\";\n\t\t}\n\t\treturn palabra;\n\t}", "@Override\r\n\tpublic String getColor() {\n\t\treturn \"white\";\r\n\t}", "String getMessage()\n\t{\n\t\tString message = \"\";\n\t\tfor(int i =0;i<4;i++)\n\t\t{\n\t\t\tmessage = message + String.valueOf(listePeg[i].getColor());\n\t\t}\n\t\treturn message;\n\t}", "public Color4 getEffectColorAdd();", "@Override\n\tpublic String getColor() {\n\t\treturn \"blue\";\n\t}", "@Override\n\tpublic String howtocolor() {\n\t\treturn \"Color all four sides\";\n\t}", "private final int getHexValue(int r, int g, int b) {\n\t\treturn ((r << 16) & 0xFF0000) | ((g << 8) & 0xFF00) | (b & 0xFF);\n\t}", "public ColorPlus binary() {\n\t\tint r = this.getRed();\n\t\tint g = this.getGreen();\n\t\tint b = this.getBlue();\n\t\t\n\t\tint cSum = r + g + b;\n\t\tif (cSum >= 382) {\n\t\t\tr = 0;\n\t\t\tg = 0;\n\t\t\tb = 0;\n\t\t}else{\n\t\t\tr = 255;\n\t\t\tg = 255;\n\t\t\tb = 255;\n\t\t}\n\t\treturn new ColorPlus(r,g,b); \n\t}", "@Override\n public String getColor() {\n return this.color;\n }", "private String rgbToHex(final String value) {\n if (\"rgba(0, 0, 0, 0)\".equals(value)) {\n return \"transparent\";\n }\n final Pattern rgb = Pattern.compile(\"rgb\\\\((\\\\d{1,3}),\\\\s(\\\\d{1,3}),\\\\s(\\\\d{1,3})\\\\)\");\n final Matcher matcher = rgb.matcher(value);\n if (matcher.find()) {\n String hex = \"#\";\n for (int i = 1; i <= 3; i++) {\n int colour = Integer.parseInt(matcher.group(i));\n String s = Integer.toHexString(colour);\n if (s.length() == 1) {\n s = \"0\" + s;\n }\n hex += s;\n }\n hex = hex.toLowerCase();\n return hex;\n }\n return value;\n }", "String getTextStrokeColorAsString();", "@Override\n\tpublic String addcolor() {\n\t\treturn \"Green color is applied\";\n\t}", "public String colorToLocate() {\n char targetColor;\n gameData = DriverStation.getInstance().getGameSpecificMessage();\n if(gameData.length() > 0) {\n switch (gameData.charAt(0)) {\n case 'B' :\n targetColor = 'R';\n break;\n case 'G' :\n targetColor = 'Y';\n break;\n case 'R' :\n targetColor = 'B';\n break;\n case 'Y' :\n targetColor = 'G';\n break;\n default :\n targetColor = '?';\n break;\n }\n } else {\n targetColor = '?';\n }\n return \"\"+targetColor;\n }", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "public String obtenColor() {\r\n return color;\r\n }", "public String c() {\r\n switch (c) {\r\n case RED:\r\n return \"Red\";\r\n case BLUE:\r\n return \"Blue\";\r\n case YELLOW:\r\n return \"Yellow\";\r\n case GREEN:\r\n return \"Green\";\r\n default:\r\n return \"Colorless\";\r\n }\r\n }", "private String getColor(String tagName) {\n if (labelColor.containsKey(tagName)) {\n return labelColor.get(tagName);\n } else {\n Random random = new Random();\n // create a big random number - maximum is ffffff (hex) = 16777215 (dez)\n int nextInt = random.nextInt(256 * 256 * 256);\n // format it as hexadecimal string (with hashtag and leading zeros)\n String colorCode = String.format(\"#%06x\", nextInt);\n labelColor.put(tagName, colorCode);\n return labelColor.get(tagName);\n }\n }", "public String getColor()\n {\n return this.color;\n }", "private void red(){\n\t\tthis.arretes_fR();\n\t\tthis.coins_fR();\n\t\tthis.coins_a1R();\n\t\tthis.coins_a2R();\n\t\tthis.aretes_aR();\n\t\tthis.cube[13] = \"R\";\n\t}", "public Color getColor();", "public Color getColor();", "public Color getColor();", "@Override\n\tpublic String toString(){\n\t\tif(this.getColor()==1){\n\t\t\treturn \"wK\";\n\t\t}else{\n\t\t\treturn \"bK\";\n\t\t}\n\t}", "public String toString() {\n\t\treturn String.format(\"Shape: %s,Color: %s\", shape, color);\n\t}", "public static String getColor(final int r, final int g, final int b) {\n\t\tif (r < 0 || r > 255) {\n\t\t\tSystem.err.println(\"Invalid value for red, please specify \"\n\t\t\t\t\t+ \"an integer between 0 and 255.\");\n\t\t}\n\t\tif (g < 0 || g > 255) {\n\t\t\tSystem.err.println(\"Invalid value for green, please specify \"\n\t\t\t\t\t+ \"an integer between 0 and 255.\");\n\t\t}\n\t\tif (b < 0 || b > 255) {\n\t\t\tSystem.err.println(\"Invalid value for blue, please specify \"\n\t\t\t\t\t+ \"an integer between 0 and 255.\");\n\t\t}\n\t\treturn Integer.toString(r) + \",\" + Integer.toString(g) + \",\"\n\t\t\t\t+ Integer.toString(b);\n\t}", "private String generateRandomHexString(){\n return Long.toHexString(Double.doubleToLongBits(Math.random()));\n }", "public static String getWebColor(Color color) {\r\n return String.format( \"#%02X%02X%02X\",\r\n (int)( color.getRed() * 255 ),\r\n (int)( color.getGreen() * 255 ),\r\n (int)( color.getBlue() * 255 ) );\r\n }", "public String toString()\n\t{\n\t\treturn \"x:\"+xPos+\" y:\"+yPos+\" width:\"+width+\" height:\"+height+\" color:\"+ color;\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "public String getColorToAsString() {\n\t\treturn getValue(Property.COLOR_TO, SankeyDataset.DEFAULT_COLOR_TO);\n\t}", "public int getColor(){\r\n\t\treturn color;\r\n\t}", "public String getColor() {\r\n return color;\r\n }", "public String getColor1P() {\n\t\treturn color1P;\n\t}", "@Override\n\t\tpublic char[] getPrintChars() {\n\t\t\tif(this.color == RedBlackTree.BLACK){\n\t\t\t\tString intString = data.toString()+\"(B)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tString intString = data.toString()+\"(R)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t}\n\t\t\t\n\t\t}", "public String showColor(int light) {\n\n String result;\n switch (light) {\n case 1:\n System.out.println(\"Red\");\n result = \"Red\";\n break;\n case 2:\n System.out.println(\"Orange\");\n result = \"Orange\";\n break;\n case 3:\n System.out.println(\"Green\");\n result = \"Green\";\n break;\n default:\n System.out.println(\"Red\");\n result = \"red\";\n break;\n }\n return result;\n }", "public static Color getColorSuccess() {\n return Color.white;\n }", "public String getColor() {\n return color;\n }" ]
[ "0.7639786", "0.75290304", "0.7241294", "0.7197489", "0.709152", "0.69463307", "0.6926897", "0.6882251", "0.6741949", "0.6723922", "0.6717134", "0.6704613", "0.6692321", "0.6682251", "0.66759557", "0.6656652", "0.6641935", "0.6610729", "0.65875125", "0.6551091", "0.6533476", "0.65130806", "0.6478881", "0.645577", "0.64469904", "0.6424116", "0.6411766", "0.6350473", "0.6326611", "0.63184625", "0.6316705", "0.62982947", "0.62957674", "0.62936354", "0.6291922", "0.62899303", "0.62899303", "0.6266012", "0.6231782", "0.6227062", "0.62229604", "0.62222695", "0.6219395", "0.621559", "0.61975116", "0.61942357", "0.6186766", "0.61861295", "0.61842656", "0.61842656", "0.6164554", "0.6160434", "0.6160434", "0.6160375", "0.61596507", "0.6146453", "0.614157", "0.6103663", "0.60947406", "0.60857105", "0.6073918", "0.6067546", "0.605936", "0.6051869", "0.60438263", "0.60251194", "0.60240227", "0.6011449", "0.60056216", "0.59900683", "0.59810895", "0.597811", "0.597811", "0.597811", "0.597811", "0.597811", "0.5973365", "0.5970752", "0.5968987", "0.59679264", "0.5963305", "0.59557307", "0.59557307", "0.59557307", "0.5951372", "0.5937229", "0.5934731", "0.5930254", "0.5918941", "0.59022653", "0.5893829", "0.5893829", "0.5893252", "0.5890026", "0.5884947", "0.5883142", "0.5878643", "0.5868078", "0.5857967", "0.58524597" ]
0.740147
2
/ Compares two moves excluding their flags.
public boolean isSameAs(Move comp){ return this.xFrom==comp.xFrom && this.xTo==comp.xTo && this.yFrom==comp.yFrom && this.yTo==comp.yTo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isUnblockedMove(Square from, Square to) {\r\n int dir = from.direction(to);\r\n SqList rook = ROOK_SQUARES[from.index()][dir];\r\n int indexTo = rook.indexOf(to);\r\n for (int i = indexTo; i >= 0; i--) {\r\n if (map.get(rook.get(i)) != EMPTY) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "@Test\n public void canMoveTest() {\n assertTrue(cp1.canMove(5, 3));\n assertTrue(cp1.canMove(1, 5));\n assertTrue(cp2.canMove(4, 6));\n assertTrue(cp2.canMove(6, 5));\n\n assertFalse(cp1.canMove(0, 5));\n assertFalse(cp1.canMove(3, 4));\n assertFalse(cp2.canMove(2, 6));\n assertFalse(cp2.canMove(7, 4));\n }", "@Test\r\n public void callingMovePossibleWhenTryingToTakeAnOpponentPieceWith2MarkersOnShouldReturnFalse() {\n player1.movePiece(12, 11, board);\r\n player1.movePiece(12, 11, board);\r\n\r\n player2.movesLeft.moves.add(2);\r\n\r\n // Then\r\n assertFalse(player2.isMovePossible(13, 11, board));\r\n }", "public boolean blocked(Move move) {\n String t = move.replacedPiece().abbrev();\n String s = move.movedPiece().abbrev();\n if (s.equals(\"-\")) {\n throw new IllegalArgumentException(\"can't move empty piece\");\n }\n if (s.equals(t)) {\n return true;\n }\n int c0 = move.getCol0();\n int c1 = move.getCol1();\n int r0 = move.getRow0();\n int r1 = move.getRow1();\n int dCol = c1 - c0;\n int dRow = r1 - r0;\n int i, j;\n for (Direction d : Direction.values()) {\n for (i = 1; i <= 7; i++) {\n if (dCol == d.dc * i && dRow == d.dr * i) {\n for (j = 1; j < i; j++) {\n String u = get(c0 + d.dc * j, r0 + d.dr * j).abbrev();\n if (s.equals(\"w\") && u.equals(\"b\")) {\n return true;\n }\n if (s.equals(\"b\") && u.equals(\"w\")) {\n return true;\n }\n }\n return false;\n }\n }\n }\n throw new IllegalArgumentException(\"not a valid direction\");\n }", "private boolean canMove() {\n return !(bestMove[0].getX() == bestMove[1].getX() && bestMove[0].getY() == bestMove[1].getY());\n }", "public static boolean hasMoved(MutableVector first, MutableVector second) {\n return first.getX() != second.getX() || first.getY() != second.getY() || first.getZ() != second.getZ();\n }", "private boolean checkMoveOthers(Pieces piece, Coordinates from, Coordinates to) {\n\t\t\t\t\n\t\t/* \n\t\t *il pedone: \n\t\t * -può andare dritto sse davanti a se non ha pedine\n\t\t * -può andare obliquo sse in quelle posizioni ha una pedina avversaria da mangiare\n\t\t * \n\t\t */\n\t\tif (piece instanceof Pawn) {\n\t\t\tif (from.getY() == to.getY()) {\n\t\t\t\tif(chessboard.at(to) == null)\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(chessboard.at(to) == null) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//il cavallo salta le pedine nel mezzo\n\t\tif (piece instanceof Knight)\n\t\t\treturn true;\n\t\t\n\t\t//Oltre non andranno il: cavallo, il re ed il pedone.\n\t\t/*\n\t\t *Calcolo le posizioni che intercorrono tra il from ed il to escluse \n\t\t *ed per ogni posizione verifico se è vuota\n\t\t *-se in almeno una posizione c'è una pedina(non importa il colore), la mossa non è valida\n\t\t *-altrimenti, la strada è spianata quindi posso effettuare lo spostamento \n\t\t */\n\t\tArrayList<Coordinates> path = piece.getPath(from, to);\n\t\tfor (Coordinates coordinate : path) {\n\t\t\tif ( chessboard.at(coordinate) != null ){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "boolean testMoveShip(Tester t) {\n return t.checkExpect(ship1.move(),\n new Ship(10, Color.CYAN, new MyPosn(50, 200), new MyPosn(50, 50)))\n && t.checkExpect(ship10.move(),\n new Ship(10, Color.CYAN, new MyPosn(290, 270), new MyPosn(-10, -30)));\n }", "public boolean isValidMove(Move move) {\n return (abs(move.getStart()[0] - move.getEnd()[0]) == abs(move.getEnd()[1] - move.getStart()[1]))\n ||\n (move.getStart()[0] == move.getEnd()[0] && move.getStart()[1] != move.getEnd()[1])\n || (move.getStart()[1] == move.getEnd()[1] && move.getStart()[0] != move.getEnd()[0]);\n }", "private static Boolean isOneEditAway(String str1, String str2) {\n\t\tint str1Length = str1.length();\n\t\tint str2Length = str2.length();\n\t\tif (str1Length == str2Length)\n\t\t\treturn isOneReplaceAway(str1, str2);\n\t\tif (str1Length == str2Length + 1)\n\t\t\treturn isOneInsertOrDeleteAway(str2, str1);\n\t\tif (str1Length + 1 == str2Length)\n\t\t\treturn isOneInsertOrDeleteAway(str1, str2);\n\t\treturn Boolean.FALSE;\n\t}", "private boolean isLegalMove(String move) {\n\t\tString[] moveParts = move.split(\";\");\n\n\t\tint fromRow = Integer.parseInt(moveParts[0].charAt(0) + \"\");\n\t\tint fromCol = Integer.parseInt(moveParts[0].charAt(1) + \"\");\n\n\t\tint toRow = Integer.parseInt(moveParts[1].charAt(0) + \"\");\n\t\tint toCol = Integer.parseInt(moveParts[1].charAt(1) + \"\");\n\n\t\tint minRow = Math.min(fromRow, toRow);\n\t\tint minCol = Math.min(fromCol, toCol);\n\n\t\tint maxRow = Math.max(fromRow, toRow);\n\t\tint maxCol = Math.max(fromCol, toCol);\n\n\t\tint piece = board[fromRow][fromCol];//Integer.parseInt(moveParts[2]);\n\t\tint pieceType = Math.abs(piece);\n\t\tint team = Math.round(Math.signum(piece));\n\n\t\tif (team == Math.round(Math.signum(board[toRow][toCol]))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (toRow < 0 || toRow > 7 && toCol < 0 && toCol > 7) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (team > 0) { // WHITE\n\t\t\tint enpassantBackup = enpassantCol;\n\t\t\tint[][] boardBackup = deepCopyBoard();\n\t\t\tapplyConvertedMove(move);\n\t\t\tboolean check = isWhiteCheck();\n\t\t\tboard = boardBackup;\n\t\t\tenpassantCol = enpassantBackup;\n\t\t\tif (check) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else { //BLACK\n\t\t\tint enpassantBackup = enpassantCol;\n\t\t\tint[][] boardBackup = deepCopyBoard();\n\t\t\tapplyConvertedMove(move);\n\t\t\tboolean check = isBlackCheck();\n\t\t\tboard = boardBackup;\n\t\t\tenpassantCol = enpassantBackup;\n\t\t\tif (check) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (pieceType == 1) { //Pawn\n\t\t\treturn ((board[toRow][toCol] != 0 && toRow == fromRow + team && (toCol == fromCol + 1 || toCol == fromCol - 1)) || (toCol == fromCol && board[toRow][toCol] == 0 && ((toRow == fromRow + team) || (((fromRow == 1 && team == 1) || (fromRow == 6 && team == -1)) ? toRow == fromRow + 2*team && board[fromRow + team][fromCol] == 0 : false))));\n\t\t} else if (pieceType == 2) { //Rook\n\t\t\tif (toRow == fromRow) {\n\t\t\t\tfor (int i = minCol + 1; i < maxCol; i++) {\n\t\t\t\t\tif (board[toRow][i] != 0 && Math.abs(board[toRow][i]) != 7) return false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else if (toCol == fromCol) {\n\t\t\t\tfor (int i = minRow + 1; i < maxRow; i++) {\n\t\t\t\t\tif (board[i][toCol] != 0 && Math.abs(board[i][toCol]) != 7) return false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (pieceType == 3) { //Knight\n\t\t\tint dx = toRow - fromRow;\n\t\t\tint dy = toCol - fromCol;\n\t\t\treturn dx*dx + dy*dy == 5;\n\t\t} else if (pieceType == 4) { //Bishop\n\t\t\tint dx = toRow - fromRow;\n\t\t\tint dy = toCol - fromCol;\n\t\t\tif (dy != dx && dy != -dx) return false;\n\t\t\tint m = dy/dx;\n\t\t\tint startCol = (m < 0 ? maxCol : minCol);\n\t\t\tfor (int i = minRow + 1; i < maxRow; i++) {\n\t\t\t\tif (board[i][startCol + m*(i - minRow)] != 0 && board[i][startCol + m*(i - minRow)] != 7) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t} else if (pieceType == 5) { //Queen\n\t\t\tif (toRow == fromRow) {\n\t\t\t\tfor (int i = minCol + 1; i < maxCol; i++) {\n\t\t\t\t\tif (board[toRow][i] != 0 && Math.abs(board[toRow][i]) != 7) return false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else if (toCol == fromCol) {\n\t\t\t\tfor (int i = minRow + 1; i < maxRow; i++) {\n\t\t\t\t\tif (board[i][toCol] != 0 && Math.abs(board[i][toCol]) != 7) return false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tint dx = toRow - fromRow;\n\t\t\t\tint dy = toCol - fromCol;\n\t\t\t\tif (dy != dx && dy != -dx) return false;\n\t\t\t\tint m = dy/dx;\n\t\t\t\tint startCol = (m < 0 ? maxCol : minCol);\n\t\t\t\tfor (int i = minRow + 1; i < maxRow; i++) {\n\t\t\t\t\tif (board[i][startCol + m*(i - minRow)] != 0 && Math.abs(board[i][startCol + m*(i - minRow)]) != 7) return false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (pieceType == 6) { //King\n\t\t\tint dx = toRow - fromRow;\n\t\t\tint dy = toCol - fromCol;\n\t\t\treturn dx*dx + dy*dy <= 2;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isEqual(Move m){\r\n\t\treturn m.getStartSquare()==start_sq&&m.getEndSquare()==end_sq&&(m.getModifier()==modifiers % 10);\r\n\t}", "@Test\n void checkNoEffectMove() {\n assertTrue(abilities.checkCanMove(turn, board.getCellFromCoords(0, 1)));\n abilities.doMove(turn, board.getCellFromCoords(0, 1));\n assertEquals(turn.getWorker().getCell(), board.getCellFromCoords(0, 1));\n }", "boolean legalMove(Move mov) {\n if (mov == null || !validSquare(mov.toIndex())\n || !validSquare(mov.fromIndex())) {\n throw new IllegalArgumentException(\"Illegal move\");\n }\n PieceColor from = get(mov.fromIndex());\n PieceColor to = get(mov.toIndex());\n if (!mov.isJump() && jumpPossible()) {\n return false;\n }\n if (from != _whoseMove) {\n return false;\n } else if (mov.isJump()) {\n return checkJump(mov, false);\n } else if (from == BLACK && row(mov.fromIndex()) == '1') {\n return false;\n } else if (from == WHITE && row(mov.fromIndex()) == '5') {\n return false;\n } else if (mov.isLeftMove()) {\n ArrayList<String> rec = _directions.get(mov.fromIndex());\n return get(mov.toIndex()) == EMPTY\n && !rec.get(rec.size() - 1).equals(\"Right\");\n } else if (mov.isRightMove()) {\n ArrayList<String> rec = _directions.get(mov.fromIndex());\n return get(mov.toIndex()) == EMPTY\n && !rec.get(rec.size() - 1).equals(\"Left\");\n } else if (from == BLACK) {\n if (mov.fromIndex() % 2 == 0 && to == EMPTY) {\n return mov.fromIndex() - mov.toIndex() == SIDE\n || mov.fromIndex() - mov.toIndex() == SIDE - 1\n || mov.fromIndex() - mov.toIndex() == SIDE + 1;\n } else {\n return mov.fromIndex() - mov.toIndex() == SIDE && to == EMPTY;\n }\n } else if (from == WHITE) {\n if (mov.fromIndex() % 2 == 0 && to == EMPTY) {\n return mov.toIndex() - mov.fromIndex() == SIDE\n || mov.toIndex() - mov.fromIndex() == SIDE + 1\n || mov.toIndex() - mov.fromIndex() == SIDE - 1;\n } else {\n return mov.toIndex() - mov.fromIndex() == SIDE && to == EMPTY;\n }\n }\n return false;\n }", "public ArrayList<Location> getValidMoves(Team sameTeam, Team oppositeTeam)\n\t{\n\t\treturn null;\n\t}", "@Override\n public int checkNoMovesLeft(List<Integer> userStates, List<Integer> agentStates) {\n boolean noMovesForPlayer1 = checkEmptyMovesForPlayer(userStates);\n boolean noMovesForPlayer2 = checkEmptyMovesForPlayer(agentStates);\n if (noMovesForPlayer1 && noMovesForPlayer2) return 0;\n else if (noMovesForPlayer1) return NO_MOVES_PLAYER1;\n else if (noMovesForPlayer2) return NO_MOVES_PLAYER2;\n else return BOTH_PLAYERS_HAVE_MOVES;\n }", "private boolean isNextMoveEnPassentCapture(Move move)\r\n\t{\r\n\t\tif (!(move.capture instanceof Pawn)) return false;\r\n\t\tif (Math.abs(move.from.coordinate.x - move.to.coordinate.x) != 1) return false;\r\n\t\tif (Math.abs(move.from.coordinate.y - move.to.coordinate.y) != 1) return false;\r\n\t\tif (!move.to.isEmpty()) return false;\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean canMove(int destinationX, int destinationY) {\n int differenceX = Math.abs(destinationX - this.boardCoordinates.x);\n int differenceY = Math.abs(destinationY - this.boardCoordinates.y);\n\n return (destinationX == this.boardCoordinates.x && differenceY == 1) ||\n (destinationY == this.boardCoordinates.y && differenceX == 1) ||\n (differenceX == differenceY && differenceX == 0); //we're handling start=finish coordinates separately\n }", "public abstract boolean canMove(int originX, int originY, int destX, int destY);", "public boolean validMove(TileEnum from, TileEnum to) {\n if (!isMyTurn() || hasMoved()\n || (getMyPlayerNumber() == 1 && TileStateEnum.PLAYERONE != getTileState(from))\n || (getMyPlayerNumber() == 2 && TileStateEnum.PLAYERTWO != getTileState(from)))\n return false;\n\n List<TileEnum> fromNeighbors = getNeighborsOf(from);\n for (TileEnum otherTile : fromNeighbors) {\n if (to.equals(otherTile)) return TileStateEnum.FREE.equals(getTileState(otherTile));\n\n List<TileEnum> otherNeighbors = getNeighborsOf(otherTile);\n for (TileEnum anotherTile : otherNeighbors) {\n if (to.equals(anotherTile)) return TileStateEnum.FREE.equals(getTileState(anotherTile));\n }\n }\n return false;\n }", "@Override\n\tpublic boolean testMove(int xEnd, int yEnd, board b){\n return (xEnd == x - 1 && yEnd == y - 1) || (xEnd == x - 1 && yEnd == y) || (xEnd == x - 1 && yEnd == y + 1) || (xEnd == x && yEnd == y - 1) || (xEnd == x && yEnd == y + 1) || (xEnd == x + 1 && yEnd == y - 1) || (xEnd == x + 1 && yEnd == y) || (xEnd == x + 1 && yEnd == y + 1);\n\t}", "@Test\r\n public void callingMovePossibleOnTakingAPieceWhenYouAlreadyHaveAZeroShouldReturnFalse() {\n player1.movePiece(12, 11, board);\r\n\r\n // moving piece to zero\r\n player2.movePiece(13, 25, board);\r\n // give 2 move\r\n player2.movesLeft.moves.add(2);\r\n\r\n // Then\r\n assertFalse(player2.isMovePossible(13, 11, board));\r\n }", "private boolean isLastMoveEnPassentCapture()\r\n\t{\r\n\t\tMove lastMove = getLastMove();\r\n\t\tif (lastMove == null) return false;\r\n\t\tif (appliedMoves.size() - 2 < 0) return false;\r\n\t\tMove beforeLastMove = appliedMoves.get(appliedMoves.size() - 2);\r\n\t\tif (beforeLastMove == null) return false;\r\n\t\t\r\n\t\tif (!(lastMove.capture instanceof Pawn)) return false;\r\n\t\tif (Math.abs(lastMove.from.coordinate.x - lastMove.to.coordinate.x) != 1) return false;\r\n\t\tif (Math.abs(lastMove.from.coordinate.y - lastMove.to.coordinate.y) != 1) return false;\r\n\r\n\t\t//Move before must have been a double move\r\n\t\tif (Math.abs(beforeLastMove.from.coordinate.y - beforeLastMove.to.coordinate.y) != 2) return false;\r\n\t\t//Pawn must have been removed\r\n\t\tif (fields[beforeLastMove.to.coordinate.x][beforeLastMove.to.coordinate.y].piece != null) return false;\r\n\t\t//Before last move's target must be on same y coordinate as from coordinate of last move\r\n\t\tif (beforeLastMove.to.coordinate.y != lastMove.from.coordinate.y) return false;\r\n\t\t//Before last move's target must be only one x coordinate away from coordinate of last move\r\n\t\tif (Math.abs(beforeLastMove.to.coordinate.x - lastMove.from.coordinate.x) != 1) return false;\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Test\n void checkCannotForceWithNoDestination() {\n Worker worker1 = new Worker(0, board.getCellFromCoords(0, 1));\n Worker worker2 = new Worker(1, board.getCellFromCoords(0, 0));\n\n Map<Worker, Boolean> otherWorkers = new HashMap<>();\n otherWorkers.put(worker2, false);\n\n turn = new Turn(worker1, otherWorkers, (cell) -> board.getNeighborings(cell), cell -> board.isPerimeterSpace(cell));\n assertFalse(abilities.checkCanMove(turn, board.getCellFromCoords(0, 0)));\n assertThrows(IllegalArgumentException.class, () -> abilities.doMove(turn, board.getCellFromCoords(0, 0)));\n }", "boolean isValidMove(int move)\n\t{\n\t\treturn move >= 0 && move <= state.size() - 1 && state.get(move) == 0;\n\t}", "boolean canMove(Tile t);", "protected boolean processIllegalMove(String moveString, String reason){return false;}", "public boolean validMove(int x, int y){\n if(!super.validMove(x, y)){\n return false;\n }\n if(((Math.abs(x - this.x()) == 2) && (Math.abs(y - this.y()) == 1))\n || ((Math.abs(x - this.x()) == 1) && (Math.abs(y - this.y()) == 2))){\n return true;\n }else{\n return false;\n }\n }", "@Test\r\n public void should_not_be_allowed_to_move_in_wrong_direction() {\r\n game.nextTurn(); // will throw [1,2] and thus black starts\r\n assertFalse(game.move(Location.R12, Location.R10));\r\n }", "boolean canMove();", "public void unapplyMove()\r\n\t{\r\n\t\tif (appliedMoves == null || appliedMoves.isEmpty()) return;\r\n\t\t\r\n\t\tdecrementPositionCount();\r\n\t\t\r\n\t\tboolean lastMoveRochade = isLastMoveRochade(); //Check before any changes to the board are made\r\n\t\tboolean isLastMoveEnPassentCapture = !lastMoveRochade && isLastMoveEnPassentCapture();\r\n\r\n\t\tMove lastMove = getLastMove();\r\n\t\tif (lastMoveRochade)\r\n\t\t{\r\n\t\t\tlastMove.from.piece = lastMove.to.piece;\r\n\t\t\tlastMove.to.piece = lastMove.capture;\r\n\t\t\t\r\n\t\t\tField kingFieldTo = lastMove.to;\r\n\t\t\tif (kingFieldTo.coordinate.x == 6)\r\n\t\t\t{\r\n\t\t\t\tField rookRochadeField = fields[5][kingFieldTo.coordinate.y];\r\n\t\t\t\tField rookBeforeRochadeField = fields[7][kingFieldTo.coordinate.y];\r\n\t\t\t\trookBeforeRochadeField.piece = rookRochadeField.piece;\r\n\t\t\t\trookRochadeField.piece = null;\r\n\t\t\t}\r\n\t\t\telse if (kingFieldTo.coordinate.x == 2)\r\n\t\t\t{\r\n\t\t\t\tField rookRochadeField = fields[3][kingFieldTo.coordinate.y];\r\n\t\t\t\tField rookBeforeRochadeField = fields[0][kingFieldTo.coordinate.y];\r\n\t\t\t\trookBeforeRochadeField.piece = rookRochadeField.piece;\r\n\t\t\t\trookRochadeField.piece = null;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\telse if (isLastMoveEnPassentCapture)\r\n\t\t{\r\n\t\t\tlastMove.from.piece = lastMove.to.piece;\r\n\t\t\tlastMove.to.piece = null;\r\n\t\t\t\r\n\t\t\tMove beforeLastMove = appliedMoves.get(appliedMoves.size() - 2);\r\n\t\t\tbeforeLastMove.to.piece = lastMove.capture;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (lastMove.promotion != null)\r\n\t\t\t{\r\n\t\t\t\tlastMove.from.piece = new Pawn(lastMove.color);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tlastMove.from.piece = lastMove.to.piece;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlastMove.to.piece = lastMove.capture;\r\n\t\t}\r\n\t\t\r\n\t\tappliedMoves.remove(appliedMoves.size() - 1);\r\n\t}", "@Test\n public void equalsFalseDifferentPiece() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n player1.addPiece(new Piece(PlayerColor.BLACK, 1));\n\n Player player2 = new Player(PlayerColor.BLACK, \"\");\n player2.addPiece(new Piece(PlayerColor.BLACK, 2));\n\n assertFalse(player1.equals(player2));\n }", "public boolean isValidMove(Location from, Location to, Piece[][]b) {\n\t\t// Bishop\n\t\tboolean pieceInWay = true;\n\t\tint direction =0; \n\t\tboolean finalLocation = false;\n\t\tboolean verticalUp = false, verticalDown = false, horizontalLeft = false, horizontalRight = false;\n\t\t\n\t\tif(to.getColumn()>from.getColumn() && to.getRow()<from.getRow()){\n\t\t\tdirection = 1;\n\t\t}\n\t\telse if (to.getColumn()<from.getColumn() && to.getRow()>from.getRow()){\n\t\t\tdirection = 2;\n\t\t}\n\t\telse if (to.getColumn()<from.getColumn() && to.getRow()<from.getRow()){\n\t\t\tdirection = 4;\n\t\t}\n\t\telse\n\t\t\tdirection = 3;\t\n\t\t\n\t\t\n\t\tif (Math.abs(from.getColumn() - to.getColumn()) == Math.abs(from.getRow() - to.getRow())\n\t\t\t\t&& b[to.getRow()][to.getColumn()].getPlayer() != getPlayer()\n\t\t\t\t&& !pieceInWay/*b[to.getRow()][to.getColumn()].getPlayer() == 0 b[from.getRow()+1][from.getColumn()+1]*/) {\n\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Rook\n\n\t\t//This line checks to see if the final destination of the piece contains anything but a friendly piece. This is here, because\n\t\t//anything other than a friendly piece would make the move valid, given that every space in between is blank.\n\t\tif(b[to.getRow()][to.getColumn()].getPlayer() != b[from.getRow()][from.getColumn()].getPlayer())\n\t\t\tfinalLocation = true;\n\t\telse\n\t\t\tfinalLocation = false;\n\t\t\n\t\t//verticalUp\n\t\tif(from.getRow() == to.getRow() && from.getColumn() > to.getColumn()){\n\t\t\tverticalUp = true;\n\t\t\tfor(int i = to.getColumn(); i < from.getColumn() && verticalUp; i++){\n\t\t\t\tif(b[to.getRow()][i].getPlayer() == 0 && verticalUp){\n\t\t\t\t\tverticalUp = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tverticalUp = false;\n\t\t\t}\n\t\t}\n\t\t//verticalDown\n\t\telse if(from.getRow() == to.getRow() && from.getColumn() < to.getColumn()){\n\t\t\tverticalDown = true;\n\t\t\tfor(int i = from.getColumn(); i < to.getColumn() && verticalDown; i++){\n\t\t\t\tif(b[from.getRow()][i].getPlayer() == 0 && verticalDown){\n\t\t\t\t\tverticalDown = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tverticalDown = false;\n\t\t\t}\n\t\t}\n\t\t//horizontalLeft\n\t\telse if(from.getColumn() == to.getColumn() && from.getRow() > to.getRow()){\n\t\t\thorizontalLeft = true;\n\t\t\tfor(int i = to.getRow(); i < from.getRow() && horizontalLeft; i++){\n\t\t\t\tif(b[i][to.getColumn()].getPlayer() == 0 && horizontalLeft){\n\t\t\t\t\thorizontalLeft = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\thorizontalLeft = false;\n\t\t\t}\n\t\t}\n\t\t//horizontalRight\n\t\telse if(from.getColumn() == to.getColumn() && from.getRow() < to.getRow()){\n\t\t\thorizontalRight = true;\n\t\t\tfor(int i = from.getRow(); i < to.getRow() && horizontalRight; i++){\n\t\t\t\tif(b[i][from.getColumn()].getPlayer() == 0 && horizontalRight){\n\t\t\t\t\thorizontalRight = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\thorizontalRight = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(verticalUp || verticalDown || horizontalLeft || horizontalRight && finalLocation){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "boolean isLegal(Move move) {\r\n return isLegal(move.from(), move.to());\r\n }", "public boolean canMove2() {\n\t\tGrid<Actor> gr = getGrid(); \n\t\tif (gr == null) {\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\tLocation loc = getLocation(); \n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (!gr.isValid(next)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!gr.isValid(next2)) {\n\t\t\treturn false;\n\t\t}\n\t\tActor neighbor = gr.get(next2); \n\t\treturn (neighbor == null) || (neighbor instanceof Flower); \n\t}", "private boolean validMove(int xi, int yi, int xf, int yf) {\n\t\tPiece prevP = pieceAt(xi, yi);\n\t\tPiece nextP = pieceAt(xf, yf);\n\n\t\tif (prevP.isKing()) {\n\t\t\tif (((xf - xi) == 1 || (xi - xf) == 1) && ((yf - yi) == 1 || (yi - yf) == 1)) \n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t} else \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif (prevP.isFire()) \n\t\t{\n\t\t\tif (((xf - xi) == 1 || (xi - xf) == 1) && (yf - yi) == 1) \n\t\t\t{\n\t\t\t\tif (nextP != null && !nextP.isFire()) \n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} \n\t\t\telse if ((xf - xi) == 2 && (yf - yi) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi+1, yi+1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\telse if ((xi - xf) == 2 && (yf - yi) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi-1, yi+1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else \n\t\t{\n\t\t\tif (((xf - xi) == 1 || (xi - xf) == 1) && (yi - yf) == 1) \n\t\t\t{\n\t\t\t\tif (nextP != null && nextP.isFire()) \n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} \n\t\t\telse if ((xf - xi) == 2 && (yi - yf) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi+1, yi-1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\telse if ((xi - xf) == 2 && (yi - yf) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi-1, yi-1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean GetMove();", "@Override\r\n\tpublic boolean isMoveValid(Game g, Location from, Location to){\n\t\tColor toColor = g.getColor(to);\r\n\t\tColor fromColor = g.getColor(from);\r\n\t\tswitch(toColor){\r\n\t\tcase RED:\r\n\t\t\tif (fromColor == Color.BLACK){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase BLACK:\r\n\t\t\tif (fromColor == Color.RED){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t//cannot make a movement if the from location is empty\r\n\t\t//cannot move if the piece belongs to the opponent\r\n\t\tswitch(g.getPlayerInTurn()){\r\n\t\tcase RED:\r\n\t\t\tif(fromColor != Color.RED){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase BLACK:\r\n\t\t\tif(fromColor != Color.BLACK){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t//just return something is wrong anyways...\r\n\t\tdefault:\r\n\t\t\treturn false;\t\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public boolean inLine(int[] move1, int[] move2) {\r\n\t\tboolean valid=false;\r\n\t\tif (move1[0]==move2[0]||move1[1]==move2[1]) {\r\n\t\t\tvalid=true;\r\n\t\t}\r\n\t\treturn valid;\r\n\t}", "@Override\n public boolean isValidMove(Move move) {\n if (board[move.oldRow][move.oldColumn].isValidMove(move, board))\n return true;\n //player will not be in check\n //move will get player out of check if they are in check\n return false;\n }", "public boolean legalMove(ArrayList<Point2D> inputMove,ArrayList<Object> Gamestate){\n FooHistory currentGameState = (FooHistory) Gamestate.get(0);\n ArrayList<Point2D> player1moves= currentGameState.getCurrentState().get(0);\n ArrayList<Point2D> player2moves= currentGameState.getCurrentState().get(1);\n //System.out.println(\"Player1 moves in FooRules: \"+ player1moves);\n \n if(inputMove.size()==1){\n for(ArrayList<Point2D> array: currentGameState.getCurrentState()){\n for(Point2D point:array){\n if(inputMove.get(0).getX()==point.getX() && inputMove.get(0).getY()==point.getY()){\n System.out.println(\"Ilegal Move\");\n return false;\n }\n }\n }\n return true;\n }\n else{//Deals with moving a piece to take pieces\n if(adjacent(inputMove.get(0),inputMove.get(1))){//Makes sure the two input moves are adjacent\n if(currentGameState.getTurnCount()%2==1){ //Player 1's turn\n for(Point2D point:player2moves){\n if(point.getX()==inputMove.get(1).getX() && point.getY()==inputMove.get(1).getY()){\n return true;\n }\n }\n }\n if(currentGameState.getTurnCount()%2==0){//Player 2's turn\n for(Point2D point:player1moves){\n if(point.getX()==inputMove.get(1).getX() && point.getY()==inputMove.get(1).getY()){\n return true;\n }\n }\n }\n }\n System.out.println(\"Ilegal Move\"); \n return false; \n }\n \n }", "public MoveResult canMovePiece(Alignment player, Coordinate from, Coordinate to);", "private boolean hasPossibleMove()\n {\n for(int i=0; i<FieldSize; ++i)\n {\n for(int j=1; j<FieldSize; ++j)\n {\n if(field[i][j] == field[i][j-1])\n return true;\n }\n }\n for(int j=0; j<FieldSize; ++j)\n {\n for(int i=1; i<FieldSize; ++i)\n {\n if(field[i][j] == field[i-1][j])\n return true;\n }\n }\n return false;\n }", "@Test\n void checkDoMove() {\n abilities.doMove(turn, board.getCellFromCoords(1, 1));\n assertEquals(turn.getWorker().getCell(), board.getCellFromCoords(1, 1));\n Worker forcedWorker = turn.getWorker();\n for (Worker other : turn.getOtherWorkers()) {\n if (other.getCell() == board.getCellFromCoords(2, 2)) {\n forcedWorker = other;\n }\n }\n\n assertEquals(forcedWorker.getCell(), board.getCellFromCoords(2, 2));\n\n // Can't move anymore after having already moved\n assertFalse(abilities.checkCanMove(turn, board.getCellFromCoords(0, 0)));\n }", "private boolean isNextMoveRochade(Move move)\r\n\t{\r\n\t\tif (!(move.from.piece instanceof King)) return false;\r\n\t\tint xDiffAbs = Math.abs(move.to.coordinate.x - move.from.coordinate.x); \r\n\t\treturn xDiffAbs == 2;\r\n\t}", "private boolean isThereValidMove() {\n\t\treturn true;\n\t}", "public boolean validMove(ChessBoard board, Square from, Square to){\r\n // check if piece killing his ally\r\n if(to.getPiece() != null){\r\n if (to.getPiece().isBlue() == this.isBlue()) {\r\n return false;\r\n }\r\n } \r\n\r\n int x = Math.abs(from.getX() - to.getX()); \r\n int y = Math.abs(from.getY() - to.getY()); \r\n if(( x == 2 && y == 1 ) || ( x == 1 && y == 2 )){\r\n return true; \r\n }\r\n\r\n return false;\r\n }", "private boolean isPlayer1Move(int move) {\n return ((move < 5) || (move == 10));\n }", "static Boolean isOneAway(String s1, String s2) {\r\n\t\tboolean results = false;\r\n\t\tchar[] chars1 = s1.toCharArray();\r\n\t\tchar[] chars2 = s2.toCharArray();\r\n\t\tif(s1.equals(s2)) {\r\n\t\t\tresults = true;\r\n\t\t}else if(chars1.length==chars2.length) {\r\n\t\t\tint mismatches = 0;\r\n\t\t\tfor(int i = 0; i < chars1.length; i++ ) {\r\n\t\t\t\tif(chars1[i]!=chars2[i]) {\r\n\t\t\t\t\tmismatches++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(mismatches <= 1) results = true;\r\n\t\t}else if(Math.abs(s1.length() - s2.length())==1) {\r\n\t\t\tif(s1.length() > s2.length()) {\r\n\t\t\t\tchars1 = s1.toCharArray();\r\n\t\t\t\tchars2 = s2.toCharArray();\r\n\t\t\t}else {\r\n\t\t\t\tchars1 = s2.toCharArray();\r\n\t\t\t\tchars2 = s1.toCharArray();\r\n\t\t\t}\r\n\t\t\tint mismatches = 0;\r\n\t\t\tint cursor1 = 0;\r\n\t\t\tint cursor2 = 0;\r\n\t\t\twhile((cursor1 < chars1.length) && (cursor2 < chars2.length)) {\r\n\t\t\t\tif(chars1[cursor1] != chars2[cursor2]) {\r\n\t\t\t\t\tmismatches++;\r\n\t\t\t\t\tcursor1++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tcursor1++;\r\n\t\t\t\t\tcursor2++;\r\n\t\t\t\t}\t\t\t\t \r\n\t\t\t}\r\n\t\t\tif(mismatches <= 1) results = true;\r\n\t\t}else {\r\n\t\t\tresults = false;\r\n\t\t}\r\n\t\r\n\t\treturn results;\r\n\t}", "boolean undoMove();", "@Test\r\n\tpublic void ConstructorTest() {\r\n\t\tMove move = new Move(3, 3);\r\n\t\tCheckersMove checkersMove = new CheckersMove(new Move(2, 2), move);\r\n\t\tassertFalse(!checkersMove.getDest().equals(move));\r\n\t}", "@Test\n public void testMovePieceInvalidMove() {\n Position pos = new Position(board, 3, 3);\n Pawn pawnOne = new Pawn(Color.WHITE);\n board.getSquare(pos).addPiece(pawnOne);\n pawnOne.setPosition(pos);\n Position pos1 = new Position(board, 5, 3);\n assertFalse(chess.movePiece(board.getSquare(pos), board.getSquare(pos1), pawnOne));\n }", "@Override\n public boolean undoMove(Move m) {\n // Ensure the from and to are reasonable\n if (m.from > 80 || m.to > 80 || m.from == m.to)\n return false;\n \n hash ^= rand[m.from * 3 + board[m.from]] ^ rand[m.to * 3 + 0]; \n // Undo the move\n int temp = board[m.from];\n board[m.from] = board[m.to];\n board[m.to] = temp;\n \n turnCount--;\n \n hash ^= rand[m.from * 3 + 0] ^ rand[m.to * 3 + board[m.to]]; \n swapTurn();\n\n // Check the move is valid from this state that is back one step\n /* we make the assumption the moves we generate are valid \n * \n if (!isValidMove(m)) {\n // Woops, it was not valid, undo our changes\n swapTurn();\n hash ^= rand[m.from * 3 + board[m.from]] ^ rand[m.to * 3 + 0]; \n \n int temp2 = board[m.from];\n board[m.from] = board[m.to];\n board[m.to] = temp2;\n \n hash ^= rand[m.from * 3 + 0] ^ rand[m.to * 3 + board[m.to]]; \n return false;\n }\n */\n return true;\n }", "public abstract boolean canMove();", "private boolean notBadMove(int squ, ArrayList<Integer> open, ArrayList<Integer> plyr, ArrayList<Integer> comp)\r\n {\r\n ArrayList<Integer> tempOpen = new ArrayList<Integer>();\r\n ArrayList<Integer> tempPlyr = new ArrayList<Integer>();\r\n ArrayList<Integer> tempComp = new ArrayList<Integer>();\r\n for(Integer num: open)\r\n tempOpen.add(num);\r\n for(Integer num: plyr)\r\n tempPlyr.add(num);\r\n for(Integer num: comp)\r\n tempComp.add(num);\r\n\r\n int index = tempOpen.indexOf(squ);\r\n tempComp.add(tempOpen.remove(index));\r\n\r\n if(playerCannotForceWin(tempOpen,tempPlyr,tempComp))\r\n return true;\r\n else\r\n return false;\r\n }", "public boolean validMove(ChessBoard board, Square from, Square to) {\r\n // check if piece killing his ally\r\n if(to.getPiece() != null){\r\n if (to.getPiece().isBlue() == this.isBlue()) {\r\n return false;\r\n }\r\n } \r\n\r\n int x = from.getX() - to.getX();\r\n int y = from.getY() - to.getY();\r\n \r\n if (x < 0 && Math.abs(x) == Math.abs(y) && y > 0){\r\n int j = from.getY()-1;\r\n for( int i = from.getX()+1 ; i < to.getX() ; i++){\r\n if (board.getBox(i,j).getPiece()!=null){\r\n return false;}\r\n j--;\r\n } \r\n return true;\r\n }\r\n else if(x > 0 && Math.abs(x) == Math.abs(y) && y > 0){\r\n int j = from.getY()-1;\r\n for( int i = from.getX()-1 ; i > to.getX() ; i--){\r\n if (board.getBox(i,j).getPiece()!=null){\r\n return false;}\r\n j--;\r\n }\r\n return true;\r\n }\r\n else if( x > 0 && Math.abs(x) == Math.abs(y) && y < 0){\r\n int j = from.getY()+1;\r\n for( int i = from.getX()-1 ; i > to.getX() ; i--){\r\n if (board.getBox(i,j).getPiece()!=null){\r\n return false;}\r\n j++;\r\n }\r\n return true; \r\n }\r\n else if (x < 0 && Math.abs(x) == Math.abs(y) && y < 0){\r\n int j = from.getY()+1;\r\n for( int i = from.getX()+1 ; i < to.getX() ; i++){\r\n if (board.getBox(i,j).getPiece()!=null){\r\n return false;}\r\n j++;\r\n } \r\n return true;\r\n }\r\n\r\n return false;\r\n }", "public boolean isMoveLegal(Move move){\n return legalMoves.contains(move);\n }", "public static boolean moveking() //returns false if valid move is there\n{ System.out.println(\"IN FUNCTION MOVE KING.....\");\n flag=0;\n int kx,ky;\n if(q==2)\n {\n kx=p2.ka.kbx; //WHITE KING....\n ky=p2.ka.kby;\n } \nelse\n {\n kx=p1.ka.kax; //BLACK KING....\n\tky=p1.ka.kay;\n }\n//CHECKS WHETHER KING CAN MOVE TO THE 8 adjacent places...\n if(kx-1>=0)\n {\n move2(kx,ky,kx-1,ky);\n \n if(flag==1)\n {\n revert(kx,ky,kx-1,ky);\n return false;\n }\n }\n //r\n if(kx+1<=7)\n { move2(kx,ky,kx+1,ky);\n if(flag==1)\n {revert(kx,ky,kx+1,ky);\n return false;\n \n }\n }\n \n //u\n if(ky-1>=0)\n {\n move2(kx,ky,kx,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx,ky-1);\n return false;\n \n }\n }\n //d\n if(ky+1<=7)\n {\n move2(kx,ky,kx,ky+1);\n \n if(flag==1)\n { revert(kx,ky,kx,ky+1);\n return false;\n \n }\n }\n //lu\n if(kx-1>=0&&ky-1>=0)\n {\n move2(kx,ky,kx-1,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx-1,ky-1);\n return false;\n \n }\n }\n //ld\n if(kx-1>=0&&ky+1<=7)\n {\n move2(kx,ky,kx-1,ky+1);\n \n if(flag==1)\n {revert(kx,ky,kx-1,ky+1);\n return false;\n \n }\n }\n //ru\n if(kx+1<=7&&ky-1>=0)\n {\n move2(kx,ky,kx+1,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx+1,ky-1);\n return false;\n \n }\n }\n //rd\n if(kx+1<=7&&ky+1<=7)\n {\n move2(kx,ky,kx+1,ky+1);\n \n if(flag==1)\n {revert(kx,ky,kx+1,ky+1);\n return false;\n \n }\n }\n return true; \n }", "public boolean validMove(ChessBoard board, Square from, Square to) {\r\n // check if piece killing his ally\r\n if(to.getPiece() != null){\r\n if (to.getPiece().isBlue() == this.isBlue()) {\r\n return false;\r\n }\r\n } \r\n\r\n int x = Math.abs(from.getX() - to.getX());\r\n int y = Math.abs(from.getY() - to.getY());\r\n if((from.getX() - to.getX()) > 0 || (from.getY() - to.getY()) > 0){\r\n if ((x == 0 && y >= 1)) {\r\n for(int i = 1; i <= y-1; i++){\r\n if(board.getBox(from.getX(), from.getY() - i).getPiece() != null){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }else if((x >= 1 && y == 0)){\r\n for(int i = 1; i <= x-1; i++){\r\n if(board.getBox(from.getX() - i, from.getY()).getPiece() != null){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n }else if((from.getX() - to.getX()) < 0 || (from.getY() - to.getY()) < 0){\r\n if (x == 0 && (from.getY() - to.getY()) <= -1) {\r\n for(int i = y-1; i > 0; i--){\r\n if(board.getBox(from.getX(), from.getY() + i).getPiece() != null){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }else if((from.getX() - to.getX()) <= -1 && y == 0){\r\n for(int i = x-1; i > 0; i--){\r\n if(board.getBox(from.getX() + i, from.getY()).getPiece() != null){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "boolean isLegal(String move);", "@Override\n\tpublic boolean isMoveValid(int srcRow, int srcCol, int destRow, int destCol) {\n\t\treturn false;\n\t}", "private ArrayList<GridPiece> getOpposite(GridPiece origin) {\n originOpposite.clear();\n\n //Check for corners\n if (origin.column == 0 && (origin.row == 0 || origin.row == game.gridSizeHeight - 1)) {\n originOpposite.add(falsePiece);\n return originOpposite;\n } else if (origin.column == game.gridSizeWidth - 1 && (origin.row == 0 || origin.row == game.gridSizeHeight - 1)) {\n originOpposite.add(falsePiece);\n return originOpposite;\n }\n\n if (originOpposite.size() > 0) {\n return originOpposite;\n }\n\n // Search Around\n\n boolean canCreateOp;\n\n // Search up\n if (game.gridMap.size() > origin.row + 1) {\n canCreateOp = false;\n\n for (int i = origin.row + 1; i < game.gridSizeHeight; i++) {\n if (game.gridMap.get(i).get(origin.column).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(i).get(origin.column).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(i).get(origin.column));\n break;\n }\n }\n\n\n // Search down\n }\n if (origin.row > 0) {\n canCreateOp = false;\n\n for (int i = origin.row - 1; i >= 0; i--) {\n if (game.gridMap.get(i).get(origin.column).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(i).get(origin.column).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(i).get(origin.column));\n break;\n }\n }\n\n\n // Search right\n }\n if (game.gridMap.get(0).size() > origin.column + 1) {\n canCreateOp = false;\n\n for (int i = origin.column + 1; i < game.gridSizeWidth; i++) {\n if (game.gridMap.get(origin.row).get(i).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(origin.row).get(i).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(origin.row).get(i));\n break;\n }\n }\n\n // Search left\n }\n if (origin.column > 0) {\n canCreateOp = false;\n\n for (int i = origin.column - 1; i >= 0; i--) {\n if (game.gridMap.get(origin.row).get(i).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(origin.row).get(i).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(origin.row).get(i));\n break;\n }\n }\n }\n\n noLine = true;\n\n if (originOpposite.size() == 0) {\n originOpposite.add(falsePiece);\n }\n\n return originOpposite;\n }", "@Test\n public void onlyStartPlayerMoves() {\n assertTrue(game.move(Location.R1, Location.R3));\n assertEquals(1, game.getCount(Location.R3));\n assertEquals(1, game.getCount(Location.R1));\n }", "@Test\n public void moreThanOneCheckerOnToLocation() {\n\n assertTrue(game.move(Location.R1, Location.R2));\n assertTrue(game.move(Location.R1, Location.R3));\n game.nextTurn();\n // to der gerne skulle vaere lovlige og stemme med terningerne\n assertTrue(game.move(Location.R6, Location.R5));\n assertTrue(game.move(Location.R8, Location.R6));\n game.nextTurn();\n assertTrue(game.move(Location.R2, Location.R5));\n assertTrue(game.move(Location.R3, Location.R7));\n game.nextTurn();\n // der staar nu to sorte paa R4\n assertFalse(game.move(Location.R6, Location.R3));\n }", "@Test\n public void isMoveActionLegalFor()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Agent white can move his token to an adjacent empty space.\n assertTrue(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P09,\n CheckersPosition.P13));\n\n // Agent white cannot move backwards.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P09,\n CheckersPosition.P05));\n\n // Agent white cannot move to an occupied space.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P04,\n CheckersPosition.P08));\n\n // Agent white cannot move a red token.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P21,\n CheckersPosition.P17));\n\n // Agent white cannot move too far.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P09,\n CheckersPosition.P18));\n }", "boolean isExcluded();", "public void findValidMoveDirections(){\n\t\t\n\t\tif(currentTile == 2 && (tileRotation == 0 || tileRotation == 180)){ // in vertical I configuration\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: T E,W: F\");\n\t\t}\n\t\telse if(currentTile == 2 && (tileRotation == 90 || tileRotation == 270)){ // in horizontal I configuration\n\t\t\tcanMoveNorth = false; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: F E,W: T\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 3 && tileRotation == 0){ // L rotated 0 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,E: T S,W: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 90){ // L rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W: T S,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 180){ // L rotated 180 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W: T N,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 270){ // L rotated 270 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,E: T N,W: F\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 4 && tileRotation == 0){ // T rotated 0 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W,E: T N: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 90){ // T rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,E: T W: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 180){ // T rotated 180 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W,E: T S: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 270){ // T rotated 270 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W: T E: F\");\n\t\t}\n\t\telse if(currentTile == 5){ //in plus tile\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W,E: T\");\n\t\t}\n\t\t\n\t}", "public boolean isValidMove(Coordinates coordinates) {\n if (grid[coordinates.getRow()][coordinates.getColumn()].getSymbol() != 'X' &&\n grid[coordinates.getRow()][coordinates.getColumn()].getSymbol() != 'O') {\n return true;\n }\n\n return false;\n }", "private boolean canGetOutOfCheck(boolean[][] moves, Piece piece) {\r\n\t\tfor (int i = 0; i < this.SIZE; i++) {\r\n\t\t\tfor (int j = 0; j < this.SIZE; j++) {\r\n\t\t\t\tif(checkMove(moves, piece, i, j)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public long possibleNonLosingMoves() {\r\n long possible_mask = possible();\r\n long opponent_win = opponent_winning_position();\r\n long forced_moves = possible_mask & opponent_win;\r\n if(forced_moves != 0) {\r\n if((forced_moves & (forced_moves - 1))!=0) // check if there is more than one forced move\r\n return 0; // the opponnent has two winning moves and you cannot stop him\r\n else possible_mask = forced_moves; // enforce to play the single forced move\r\n }\r\n return possible_mask & ~(opponent_win >> 1); // avoid to play below an opponent winning spot\r\n }", "@Test\r\n public void settingBoardPositionAndValidMovesLeftAndCallingMovePossibleWithASimple2PositionMoveShouldReturnTrue() {\n player1.movePiece(12, 11, board);\r\n player2.movesLeft.moves.add(2);\r\n\r\n // When\r\n final boolean possible = player2.isMovePossible(13, 11, board);\r\n\r\n // Then\r\n assertTrue(possible);\r\n }", "boolean hasMoveSortNo();", "@Test\n public void testEqualsFalse() {\n Rectangle r5 = new Rectangle(7, 5, new Color(255, 0, 0), new Position2D(50, 75));\n Rectangle r6 = new Rectangle(0, 4, new Color(255, 255, 254),\n new Position2D(-50, 75));\n Rectangle r7 = new Rectangle(0, 4, new Color(255, 155, 255),\n new Position2D(-50, 75));\n Rectangle r8 = new Rectangle(0, 4, new Color(0, 255, 255),\n new Position2D(-50, 75));\n Rectangle r9 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(50, 75));\n Rectangle r10 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(51, -75));\n Rectangle r11 = new Rectangle(1, 0, new Color(200, 150, 133),\n new Position2D(-50, -75));\n Rectangle r12 = new Rectangle(1, 100, new Color(199, 155, 13),\n new Position2D(50, 0));\n\n assertNotEquals(r1, r5);\n assertNotEquals(r2, r6);\n assertNotEquals(r2, r7);\n assertNotEquals(r2, r8);\n assertNotEquals(r3, r9);\n assertNotEquals(r3, r10);\n assertNotEquals(r4, r11);\n assertNotEquals(r4, r12);\n }", "boolean isLegal(Move move) {\n int count = pieceCountAlong(move);\n int c0 = move.getCol0();\n int r0 = move.getRow0();\n int c1 = move.getCol1();\n int r1 = move.getRow1();\n int count2 = Math.max(Math.abs(c1 - c0), Math.abs(r1 - r0));\n return ((count == count2) && !blocked(move));\n }", "boolean testMoveAllShips(Tester t) {\n return t.checkExpect(this.los3.moveAll(), new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(51, 50), this.p6),\n new ConsLoGamePiece(new Ship(10, Color.CYAN, new MyPosn(51, 50), this.p6),\n new ConsLoGamePiece(new Ship(10, Color.CYAN, new MyPosn(50, 200), this.p3), this.mt))))\n && t.checkExpect(this.mt.moveAll(), this.mt);\n }", "boolean makeMove(Bouger m) {\n\tlong oldBits[] = { pieceBits[LIGHT], pieceBits[DARK] };\n\n\tint from, to;\n\t/*\n\t* test to see if a castle move is legal and move the rook (the king is\n\t* moved with the usual move code later)\n\t*/\n\tif ((m.bits & 2) != 0) {\n\n\tif (inCheck(side))\n\treturn false;\n\tswitch (m.getTo()) {\n\tcase 62:\n\tif (color[F1] != EMPTY || color[G1] != EMPTY\n\t|| attack(F1, xside) || attack(G1, xside))\n\treturn false;\n\tfrom = H1;\n\tto = F1;\n\tbreak;\n\tcase 58:\n\tif (color[B1] != EMPTY || color[C1] != EMPTY\n\t|| color[D1] != EMPTY || attack(C1, xside)\n\t|| attack(D1, xside))\n\treturn false;\n\tfrom = A1;\n\tto = D1;\n\tbreak;\n\tcase 6:\n\tif (color[F8] != EMPTY || color[G8] != EMPTY\n\t|| attack(F8, xside) || attack(G8, xside))\n\treturn false;\n\tfrom = H8;\n\tto = F8;\n\tbreak;\n\tcase 2:\n\tif (color[B8] != EMPTY || color[C8] != EMPTY\n\t|| color[D8] != EMPTY || attack(C8, xside)\n\t|| attack(D8, xside))\n\treturn false;\n\tfrom = A8;\n\tto = D8;\n\tbreak;\n\tdefault: /* shouldn't get here */\n\tfrom = -1;\n\tto = -1;\n\tbreak;\n\t}\n\tcolor[to] = color[from];\n\tpiece[to] = piece[from];\n\tcolor[from] = EMPTY;\n\tpiece[from] = EMPTY;\n\tpieceBits[side] ^= (1L << from) | (1L << to);\n\t}\n\t/* back up information so we can take the move back later. */\n\n\tHistoryData h = new HistoryData();\n\th.m = m;\n\tto = m.getTo();\n\tfrom = m.getFrom();\n\th.capture = piece[to];\n\th.castle = castle;\n\th.ep = ep;\n\th.fifty = fifty;\n\th.pawnBits = new long[] { pawnBits[LIGHT], pawnBits[DARK] };\n\th.pieceBits = oldBits;\n\thistDat[hply++] = h;\n\n\t/*\n\t* update the castle, en passant, and fifty-move-draw variables\n\t*/\n\tcastle &= castleMask[from] & castleMask[to];\n\tif ((m.bits & 8) != 0) {\n\tif (side == LIGHT)\n\tep = to + 8;\n\telse\n\tep = to - 8;\n\t} else\n\tep = -1;\n\tif ((m.bits & 17) != 0)\n\tfifty = 0;\n\telse\n\t++fifty;\n\n\t/* move the piece */\n\tint thePiece = piece[from];\n\tif (thePiece == KING)\n\tkingSquare[side] = to;\n\tcolor[to] = side;\n\tif ((m.bits & 32) != 0) {\n\tpiece[to] = m.promote;\n\tpieceMat[side] += pieceValue[m.promote];\n\t} else\n\tpiece[to] = thePiece;\n\tcolor[from] = EMPTY;\n\tpiece[from] = EMPTY;\n\tlong fromBits = 1L << from;\n\tlong toBits = 1L << to;\n\tpieceBits[side] ^= fromBits | toBits;\n\tif ((m.bits & 16) != 0) {\n\tpawnBits[side] ^= fromBits;\n\tif ((m.bits & 32) == 0)\n\tpawnBits[side] |= toBits;\n\t}\n\tint capture = h.capture;\n\tif (capture != EMPTY) {\n\tpieceBits[xside] ^= toBits;\n\tif (capture == PAWN)\n\tpawnBits[xside] ^= toBits;\n\telse\n\tpieceMat[xside] -= pieceValue[capture];\n\t}\n\n\t/* erase the pawn if this is an en passant move */\n\tif ((m.bits & 4) != 0) {\n\tif (side == LIGHT) {\n\tcolor[to + 8] = EMPTY;\n\tpiece[to + 8] = EMPTY;\n\tpieceBits[DARK] ^= (1L << (to + 8));\n\tpawnBits[DARK] ^= (1L << (to + 8));\n\t} else {\n\tcolor[to - 8] = EMPTY;\n\tpiece[to - 8] = EMPTY;\n\tpieceBits[LIGHT] ^= (1L << (to - 8));\n\tpawnBits[LIGHT] ^= (1L << (to - 8));\n\t}\n\t}\n\n\t/*\n\t* switch sides and test for legality (if we can capture the other guy's\n\t* king, it's an illegal position and we need to take the move back)\n\t*/\n\tside ^= 1;\n\txside ^= 1;\n\tif (inCheck(xside)) {\n\ttakeBack();\n\treturn false;\n\t}\n\treturn true;\n\t}", "public Optional<Boolean> isDestinationPositionAfter();", "public boolean isMovePossible(int start, int end, boolean isRed){\n\n int moveDiff = end - start; //moveDiff tracks the movement made based on difference btwn start and end\n //general check for if a checker is on the end square\n if (mCheckerBoard.get(end) != null)\n {\n return false; //can't move b/c a checker is on the end square\n }\n\n //general checks that start and end are on the board\n if(end<0 || end>63)\n {\n return false; //can't move b/c end is off-board\n }\n\n\n //checks for diagonalRight\n if(moveDiff == 9 || moveDiff ==-7)\n {\n if(start % 8 == 7){\n return false; //can't move b/c off-board on right\n }\n }\n\n //checks for diagonalLeft\n if(moveDiff == 7 || moveDiff ==-9)\n {\n if(start % 8 == 0){\n return false; //can't move b/c off-board on left\n }\n }\n\n //checks for jumpRight\n if(moveDiff == 18 || moveDiff == -14){\n //column check\n if((start % 8 == 7) || (start % 8 == 6)){\n return false; //can't move b/c off-board on right\n }\n //need to check if there is a piece of opposite color in between\n int jumpSpace = start + (moveDiff/2);\n Checker jumped = mCheckerBoard.get(jumpSpace);\n if(jumped == null)\n {\n return false; //can't move b/c no checker to jump\n }\n else if (jumped.isRed() == isRed)\n {\n return false; //can't move b/c can't jump own color\n }\n }\n\n //checks for jumpLeft\n if(moveDiff == 14 || moveDiff == -18){\n if((start % 8 == 7) || (start % 8 == 6)) {\n return false; //can't move b/c off-board on right\n }\n //need to check if there is a piece of opposite color in between\n int jumpSpace = start + (moveDiff/2);\n Checker jumped = mCheckerBoard.get(jumpSpace);\n if(jumped == null)\n {\n return false; //can't move b/c no checker to jump\n }\n else if (jumped.isRed() == isRed)\n {\n return false; //can't move b/c can't jump own color\n }\n }\n\n if(moveDiff == 7 || moveDiff ==-7 || moveDiff ==9 || moveDiff ==-9\n || moveDiff == 18 || moveDiff == -18 || moveDiff == 14 || moveDiff ==-14){\n return true;\n }\n else{\n return false;\n }\n\n }", "public void stripCheckMoves(List<Move> moves, Color color)\r\n\t{\r\n\t\tIterator<Move> moveIterator = moves.iterator();\r\n\t\twhile (moveIterator.hasNext())\r\n\t\t{\r\n\t\t\tMove move = moveIterator.next();\r\n\t\t\tapplyMove(move, false);\r\n\t\t\tif (isCheck(color)) \r\n\t\t\t{\r\n\t\t\t\tmoveIterator.remove();\r\n\t\t\t}\r\n\t\t\tunapplyMove();\r\n\t\t}\r\n\t}", "boolean prepareToMove();", "public abstract boolean canMove(Board board, Spot from, Spot to);", "@Test\n public void testPositionEquals(){\n assertEquals(Maze.position(0,0), Maze.position(0,0));\n assertThat(Maze.position(1, 0), not(Maze.position(0, 0)));\n assertThat(Maze.position(0,0), not(Maze.position(0,1)));\n }", "public HashSet<Point> getValidMoves(){\n HashSet<Point> set = new HashSet<Point>();\n if(this.validMove(this.x() + 2, this.y() + 1)){\n set.add(new Point(this.x() + 2, this.y() + 1));\n }\n if(this.validMove(this.x() + 2, this.y() - 1)){\n set.add(new Point(this.x() + 2, this.y() - 1));\n }\n if(this.validMove(this.x() - 2, this.y() + 1)){\n set.add(new Point(this.x() - 2, this.y() + 1));\n }\n if(this.validMove(this.x() - 2, this.y() - 1)){\n set.add(new Point(this.x() - 2, this.y() - 1));\n }\n if(this.validMove(this.x() + 1, this.y() + 2)){\n set.add(new Point(this.x() + 1, this.y() + 2));\n }\n if(this.validMove(this.x() + 1, this.y() - 2)){\n set.add(new Point(this.x() + 1, this.y() - 2));\n }\n if(this.validMove(this.x() - 1, this.y() + 2)){\n set.add(new Point(this.x() - 1, this.y() + 2));\n }\n if(this.validMove(this.x() - 1, this.y() - 2)){\n set.add(new Point(this.x() - 1, this.y() - 2));\n }\n return set;\n }", "@Test\n public void testThatCorrectMovesAreFound() {\n Solver solver = new Solver();\n PuzzleState state = new PuzzleState(Arrays.asList(CANNIBAL, CANNIBAL),\n Arrays.asList(MISSIONARY, MISSIONARY, CANNIBAL, MISSIONARY), PuzzleState.Position.LEFT_BANK);\n\n // get available moves\n List<Move> moves = solver.getAvailableMoves(state);\n\n Move expectedMove = new Move(Move.Direction.LEFT_TO_RIGHT, Arrays.asList(CANNIBAL, CANNIBAL));\n assertEquals(\"Only two moves should be available!\", 2, moves.size());\n assertTrue(\"List of moves doesn't contain exptected move!\", moves.contains(expectedMove));\n }", "public static boolean operator !=(LocalValueEnumerator obj1, LocalValueEnumerator obj2) \r\n {\r\n return !(obj1 == obj2); \r\n }", "public abstract boolean validMove(ChessBoard board, Square from, Square to);", "private boolean isMove() {\n return this.getMoves().size() != 0;\n }", "public boolean validMove(ChessBoard board, Square from, Square to) {\r\n // check if piece killing his ally\r\n if(to.getPiece() != null){\r\n if (to.getPiece().isBlue() == this.isBlue()) {\r\n return false;\r\n }\r\n } \r\n\r\n int x = Math.abs(from.getX() - to.getX());\r\n int y = Math.abs(from.getY() - to.getY());\r\n // to check if the move is 1unit vertically or horizontally\r\n if (x + y == 1) {\r\n return true;\r\n }else if (x == y && x == 1) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "private boolean moveExists(int move) {\n \tint[] board = mGame.getBoard();\n \tint piece = board[move & Move.SQUARE_MASK];\n \tint side = piece >> Piece.SIDE_SHIFT & 1;\n \tif (side != mGame.getCurrentSide()) {\n \t\treturn false;\n \t}\n \tif ((piece & Piece.DEAD_FLAG) != 0) {\n \t\treturn false;\n \t}\n \tMoveArray moves = MoveGenerator.generateMoves(mGame);\n \t\n \tint[] mv = moves.getMoves();\n \tint size = moves.size();\n \tfor (int i = 0; i < size; i++) {\n \t\tif(mv[i] == move) {\n \t\t\treturn true;\n \t\t}\n \t}\n \treturn false;\n }", "public boolean isValidMovement(Board chessBoard, Position destination){\n Position distance = Position.manhattanDistance(getPosition(), destination);\n Boolean slope1 = distance.file == 2 && distance.rank == 1;\n Boolean slope2 = distance.file == 1 && distance.rank == 2;\n return slope1 || slope2;\n }", "private boolean makeMoveFromMinimax(Slot source, Slot dest, Slot[] intermediates) {\n boolean moveMade = false;\n String directionMoving;\n\n if (source.getRow() == dest.getRow()) {\n if (source.getColumn() - dest.getColumn() == -2) {\n directionMoving = \"right\";\n } else {\n directionMoving = \"left\";\n }\n } else {\n if (source.getRow() - dest.getRow() == -2) {\n directionMoving = \"down\";\n } else {\n directionMoving = \"up\";\n }\n }\n\n if (source.getColor() != dest.getColor() && dest.getColor() == Slot.EMPTY) {\n if (directionMoving.equals(\"right\")) {\n if (boardObject.getSlot(source.getRow(), source.getColumn() + 1).getColor() != Slot.EMPTY) {\n boardObject.getSlot(source.getRow(), source.getColumn() + 1).setColor(Slot.EMPTY);\n\n intermediates[0] = new Slot(source.getRow(), source.getColumn() + 1, Slot.EMPTY);\n\n moveMade = true;\n }\n } else if (directionMoving.equals(\"left\")) {\n if (boardObject.getSlot(source.getRow(), source.getColumn() - 1).getColor() != Slot.EMPTY) {\n boardObject.getSlot(source.getRow(), source.getColumn() - 1).setColor(Slot.EMPTY);\n\n intermediates[0] = new Slot(source.getRow(), source.getColumn() - 1, Slot.EMPTY);\n\n moveMade = true;\n }\n } else if (directionMoving.equals(\"up\")) {\n if (boardObject.getSlot(source.getRow() - 1, source.getColumn()).getColor() != Slot.EMPTY) {\n boardObject.getSlot(source.getRow() - 1, source.getColumn()).setColor(Slot.EMPTY);\n\n intermediates[0] = new Slot(source.getRow() - 1, source.getColumn(), Slot.EMPTY);\n\n moveMade = true;\n }\n } else {\n if (boardObject.getSlot(source.getRow() + 1, source.getColumn()).getColor() != Slot.EMPTY) {\n boardObject.getSlot(source.getRow() + 1, source.getColumn()).setColor(Slot.EMPTY);\n\n intermediates[0] = new Slot(source.getRow() + 1, source.getColumn(), Slot.EMPTY);\n\n moveMade = true;\n }\n }\n }\n\n return moveMade;\n }", "@Override\n\tpublic boolean canMove(Board board, Box start, Box end) {\n\t\tif(end.getPiece().isWhite() == this.isWhite()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tint x = Math.abs(start.getX() - end.getX());\n\t\tint y = Math.abs(start.getY() - end.getY());\n\t\treturn x * y == 2;\n\t}", "public boolean monkeyTrouble(boolean aSmile, boolean bSmile) {\n return (aSmile && bSmile || !aSmile && !bSmile);\n}", "public boolean isLegalMove(int x, int y, int x1, int y1) {\n return field.isLegalMove(x, y, x1, y1);\n }", "@Override\r\n\tprotected boolean prerequisites() {\n\t\treturn _player1.getClient().getPlayer().getWrappedObject().getPosition()\r\n\t\t\t\t.equals(_player2.getClient().getPlayer().getWrappedObject().getPosition());\r\n\t}", "boolean makeMove();", "boolean doMove();", "public boolean isSame(MoveEdge other) {\n if (other == this) {\n return true;\n }\n return Objects.equals(in, other.in) && Objects.equals(out, other.out);\n }", "public boolean posNeg(int a, int b, boolean negative) {\n if (negative){\n return(a < 0 && b < 0);\n }\n\n return((a < 0 && b >= 0) || (a >= 0 && b < 0));\n}", "public boolean checkMove(location start_pos, location end_pos, chess[][] board){\n // move in vertical direction or horizontal direction\n if(start_pos.getY() == end_pos.getY() || start_pos.getX() == end_pos.getX() ){\n // Distance is greater than zero\n if(!isStay(start_pos, end_pos)){\n return !isChessOnWay(start_pos, end_pos, board);\n }\n }\n return false;\n }" ]
[ "0.6087523", "0.5974479", "0.59341687", "0.5863401", "0.5787927", "0.57813853", "0.56098706", "0.56071466", "0.54857564", "0.5483651", "0.5466652", "0.5437717", "0.5427178", "0.5424617", "0.5408486", "0.5400288", "0.53847504", "0.5374186", "0.5374043", "0.535239", "0.5346885", "0.5329118", "0.5328934", "0.5326955", "0.53144836", "0.531324", "0.52992177", "0.52977794", "0.528111", "0.52792335", "0.52710825", "0.5266455", "0.525748", "0.52516603", "0.52340007", "0.52311325", "0.522841", "0.5217257", "0.5197279", "0.51853156", "0.5174298", "0.51732", "0.5171012", "0.5166532", "0.5164559", "0.5163994", "0.51639485", "0.51594007", "0.51557255", "0.5147916", "0.513977", "0.5137064", "0.51355124", "0.5117292", "0.5111089", "0.51106524", "0.5110532", "0.50962204", "0.50930977", "0.5091564", "0.50898606", "0.50858176", "0.50851345", "0.5080442", "0.50716674", "0.5053134", "0.50510424", "0.5049281", "0.50485545", "0.504277", "0.5032845", "0.5029493", "0.50269794", "0.50257355", "0.49993977", "0.49993542", "0.499758", "0.49972552", "0.4994846", "0.49913687", "0.49795794", "0.49787223", "0.49765667", "0.49681795", "0.49672684", "0.4963414", "0.49627686", "0.49622062", "0.49545336", "0.49519068", "0.49517187", "0.4946282", "0.49460924", "0.49407503", "0.49386224", "0.4931544", "0.49313608", "0.49211818", "0.49187756", "0.49123895" ]
0.5448531
11
System.out.println("in update controller "+user);
@RequestMapping(value = "/editUserData" , method = RequestMethod.POST) public String saveEditUser(@ModelAttribute("updateDetails") LoginUser user, Model model) { LoginUser updatedDetails=loginService.updateData(user); // System.out.println("return in controller "+l); model.addAttribute("updatedDetails", updatedDetails); return "login"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk updateUser\");\r\n\t}", "public void editUser(User user) {\n\t\t\n\t}", "public void update(User u) {\n\r\n\t}", "@Override\n // Update user\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n HttpSession session = request.getSession();\n User user = new User();\n user.setUserGroup(Integer.parseInt(request.getParameter(\"user_group\")));\n //user.setUpdatedBy= session.getAttribute(\"username\");\n String userid = request.getParameter(\"id\");\n user.setId(Integer.parseInt(userid));\n dao.updateUser(user);\n RequestDispatcher view = request.getRequestDispatcher(LIST_USER);\n request.setAttribute(\"users\", dao.getAllUsers());\n view.forward(request, response);\n }", "public void update(User user);", "void update(User user);", "void update(User user);", "public void updateUser(User user) {\n\t\t\r\n\t}", "public void updateUser(Person user) {\n\t\t\n\t}", "@Override\n\tpublic String update(User user) {\n\t\treturn null;\n\t}", "@Override\n public void edit(User user) {\n }", "@Override\n\tpublic String updateUser(String user) {\nreturn null;\n\t}", "@GetMapping(\"/updateUser\")\n public String updateUser(@RequestParam(\"userId\") int userId, Model model){\n User user = accountService.getUser(userId);\n model.addAttribute(\"newUser\", user);\n return \"updateByAdmin\";\n }", "@Override\n\tpublic void updateUser(user theUser) {\n\t}", "public String updateUser(){\n\t\tusersservice.update(usersId, username, password, department, role, post, positionId);\n\t\treturn \"Success\";\n\t}", "public void update(User obj) {\n\t\t\n\t}", "@Override\n\tpublic void updateUser(User user)\n\t{\n\n\t}", "public void setUser(String user)\n {\n _user = user;\n }", "@RequestMapping(\"/test\")\n public void test(){\n User user = (User) SecurityUtils.getCurrentUser();\n System.out.println(\"user>>>\"+user.getId());\n }", "public String getUpdateUser() {\n return updateUser; \n }", "@Override\n public boolean updateUser(User user) {\n return controller.updateUser(user);\n }", "@Override\r\n\tpublic int update(User user) {\n\t\treturn 0;\r\n\t}", "@Action( value=\"editUser\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editUser() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ (String) contexto.getSession().get(\"loginId\")+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t rol=result1.getString(\"tipo\");\n }\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}", "@Override\r\n\tpublic void update(User user) {\n\t\tint iRet = dao.update(user);\r\n\t\tif(iRet != 1){\r\n\t\t\tlogger.error(\"修改失败\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlogger.info(\"修改成功\");\r\n\t}", "@GetMapping(\"/updateLoggedUser\")\n public String updateLoggedUser(Model model){\n CustomUserDetails userDetails =\n (CustomUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\n User user = accountService.getUser(userDetails.getId());\n model.addAttribute(\"newUser\", user);\n return \"updateLoggedUser\";\n }", "public boolean update(User u);", "public EdcTerminal update (EdcTerminal object,ActionUser user) throws Exception{\r\n\r\n\t\tobject.setModifiedTime(new java.sql.Timestamp(System.currentTimeMillis()));\r\n\t\tif (user != null){\r\n\t\t\tif (user.getUser() != null){\r\n\t\t\t\tobject.setModifiedBy(user.getUser().getUsername());\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n \t\tedcTerminalDao.update (object);\r\n \treturn object;\r\n\t}", "public User updateUser(User user);", "public User update(User user)throws Exception;", "@Override\n\tpublic User update(User u) {\n\t\tSystem.out.println(\"OracleDao is update\");\n\t\treturn null;\n\t}", "public String update() {\r\n\t\tuserService.update(userEdit);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"update\";\r\n\t}", "@RequestMapping(\"/mytest\")\n\tpublic void Test() {\n\t\t\n\t\tuser.setUsername(\"hailing\");\n\t\tuser.setPassword(\"123\");\n\t\tint a=userService.insertSelective(user);\n\t\tSystem.out.println(a);\n\t\tSystem.out.println(\"已经进来/mytest\");\n\t}", "@RequestMapping(value = \"/account\", method= RequestMethod.POST)\r\n\tpublic String account(@ModelAttribute(\"user\")User user, @ModelAttribute(\"oldUserID\") String oldUserID, Model model) {\r\n\t\ttry {\r\n\t\t\t//Get the Spring Context\r\n\t ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(\"spring.xml\");\r\n\t \r\n\t //Get the UserDAO Bean from spring.xml\r\n\t UserDAO userDao = ctx.getBean(\"userDao\", UserDAO.class);\r\n\t if(!oldUserID.equals(user.getUserID())) {\r\n\t \tif(!userDao.userExists(user.getUserID())) {\r\n\t\t\t\t\t// update user\r\n\t\t\t\t\tuserDao.updateUser(user,oldUserID);\r\n\t\t\t\t\tmodel.addAttribute(\"message\", \"Account successfully updated\");\r\n\t\t\t\t\tmodel.addAttribute(\"oldUserID\", user.getUserID());\r\n\t\t\t\t\tmodel.addAttribute(\"newMsg\", new Message());\r\n\t\t\t\t\treturn \"welcome\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\t\t\t\r\n\t\t\t\t\tmodel.addAttribute(\"message\", \"Username already taken\");\r\n\t\t\t\t}\r\n\t }\r\n\t else {\r\n\t \t// update user\r\n\t\t\t\tuserDao.updateUser(user,oldUserID);\r\n\t\t\t\tmodel.addAttribute(\"message\", \"Account successfully updated\");\r\n\t\t\t\tmodel.addAttribute(\"username\", user.getUserID());\r\n\t\t\t\tmodel.addAttribute(\"newMsg\", new Message());\r\n\t\t\t\treturn \"welcome\";\t\t\t\t\r\n\t }\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn \"account\";\r\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\t\r\n\t\ttry{\r\n\t\tString firstName = request.getParameter(\"firstName\");\r\n\t\tString middleName = request.getParameter(\"middleName\");\r\n\t\tString lastName = request.getParameter(\"lastName\");\r\n\t\tString email = request.getParameter(\"email\");\r\n\t\tString mobile = request.getParameter(\"mobile\");\r\n\t\tString password = request.getParameter(\"password\");\r\n\t\tString id= request.getParameter(\"id\");\r\n\t\t\r\n\t\tUser user = new User();\r\n\t\t\r\n\t\tuser.setEmail(email);\r\n\t\tuser.setFirstName(firstName);\r\n\t\tuser.setLastName(lastName);\r\n\t\tuser.setMiddleName(middleName);\r\n\t\tuser.setMobile(mobile);\r\n\t\tuser.setPassword(password);\r\n\t\tuser.setId(id);\r\n\t\t\r\n\t\t\r\n\t\tUpdateRecordService urs=new UpdateRecordService();\r\n\t\turs.updateRecord(user);\r\n\t\t\r\n\t\tRequestDispatcher rd=request.getRequestDispatcher(\"adminPage.jsp\");\r\n\t\trd.forward(request, response);\r\n\t}\r\n\tcatch(Exception e)\r\n\t{\r\n\t\te.printStackTrace();\r\n\r\n\t/*\ttry {\r\n\t\t\tUpdateRecordService urs=new UpdateRecordService();\r\n\t\t\tboolean result = urs.updateRecord(user);\r\n\t\t\tout.println(\"<html>\");\r\n\t\t\tout.println(\"<head>\");\r\n\t\t\tout.println(\"<title>Updation Successful</title>\");\r\n\t\t\tout.println(\"</head>\");\r\n\t\t\tout.println(\"<body>\");\r\n\t\t\tout.println(\"<center>\");\r\n\t\t\tif (result)\r\n\t\t\t{\r\n\t\t\t\tout.println(\"<h1>Thanks for Update your Registeration Entries :</h1>\");\r\n\t\t\t\tresponse.sendRedirect(\"adminPage.jsp\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tout.println(\"<h1>Updation Failed</h1>\");\r\n\t\t\t\t//out.println(\"To try again<a href=edit.jsp>Click here</a>\");\r\n\t\t\t\tresponse.sendRedirect(\"edit.jsp\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tout.println(\"</center>\");\r\n\t\t\tout.println(\"</body>\");\r\n\t\t\tout.println(\"</html>\");\r\n\t\t} finally {\r\n\t\t\tout.close();\r\n\t\t}*/\r\n\t\t\r\n\t}\r\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "User editUser(User user);", "public void setUser(User user) { this.user = user; }", "@RequestMapping(\"/updateemployee{employee_id}\")\npublic String updateNotice(@RequestParam int employee_id, HttpServletRequest request)\n{\n\tEmployeeRegmodel a=ergserv.findOne(employee_id);\n\tSystem.out.println(a.getEmployee_password());\n\trequest.setAttribute(\"notic\", a );\n\treturn \"update.jsp\";\n}", "@Override\n\tpublic void update(User objetc) {\n\t\tuserDao.update(objetc);\n\t}", "private void updateUserDetails() {\n \tUser user=CurrentSession.getCurrentUser();\n \tjLabel1.setText(\"Name:\");\n jLabel2.setText(user.getFirstName()+\" \"+user.getLastName());\n jLabel3.setText(\"Card Number:\");\n jLabel4.setText(user.getCardNumber());\n jLabel5.setText(\"Daily Calorie Intake\");\n FoodPreference fp=new FoodPreference(user.getCardNumber());\n jLabel6.setText(\"\"+fp.getUserCalories());\n jLabel7.setText(\"Monthly Expenses\");\n jLabel8.setText(\"\"+user.getExpenses());\n\n\t\t\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tuser.first_name = textFirstName.getText();\n\t\t\t\tuser.last_name = textLastName.getText();\n\t\t\t\tuser.email = textEmail.getText();\n\t\t\t\tuser.password = textPassword.getText();\n\t\t\t\tuser.dept_name = textDepartment.getText();\n\t\t\t\tuser.dept_desc = textDepartmentDescription.getText();\n\t\t\t\t\n\t\t\t\t//use controller to update it in db\n\t\t\t\tUserController uc = new UserController();\n\t\t\t\tuc.updateUser(user);\n\t\t\t\t\n\t\t\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\t public void run() \n\t\t\t {\n\t\t\t \tUserInfoScreen userInfoScreen = new UserInfoScreen(user);\n\t\t\t \tuserInfoScreen.setVisible(true);\n\t\t\t \tframe.dispose();\n\t\t\t }\n\t\t\t\t});\n\t\t\t}", "@RequestMapping(value = \"update\", method = RequestMethod.POST)\n public String update(@ModelAttribute(\"userDTO\") UserDTO userDTO, RedirectAttributes redirectAttributes) {\n redirectAttributes.addFlashAttribute(\"message\", \"客户信息更新成功\");\n return \"redirect:/mongo/mongoList\";\n }", "@Override\n\tpublic void edit(User user){\n\t\tuserRepo.save(user);\n\t}", "public void updateUserDetails() {\n\t\tSystem.out.println(\"Calling updateUserDetails() Method To Update User Record\");\n\t\tuserDAO.updateUser(user);\n\t}", "@Override\n\tpublic ResponseEntity<String> updateUser() {\n\t\treturn null;\n\t}", "@Test\n\tpublic void test_update_user_success(){\n\t\tUser user = new User(null, \"fengt\", \"[email protected]\", \"12345678\");\n\t\ttemplate.put(REST_SERVICE_URI + \"/20\" + ACCESS_TOKEN + token, user);\n\t}", "@Override\n public boolean updateUserPersonalInfo(String text) {\n User tmp = this.getLoggedUser();\n tmp.setPersonal_details(text);\n if(this.setLoggedUser(tmp)) System.out.print(\"done\");\n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"UPDATE user_personal_information set information = + '\" + text + \"' where user_id = \" + this.getLoggedUser().getId();\n \n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n \n }", "public String saveUser(User user) {\n id = user.getId();\n firstName = user.getFirstName();\n lastName = user.getLastName();\n phoneNumber = user.getPhoneNumber();\n email = user.getEmail();\n address = user.getAddress();\n idCity = user.getIdCity();\n currentUser = user;\n return \"operator\";\n }", "@PutMapping(path = \"/v1/update\")\n public JsonData updateUser(@RequestBody User user) { int webId = user.getId();\n// User searchUser = userService.findById(Long.valueOf(webId));\n//\n userService.update(user);\n return new JsonData(\"200\", \"修改成功!\", \"\");\n }", "@RequestMapping(value=\"/update\", method = RequestMethod.PUT)\r\n\t @ResponseBody\r\n//\t public String updateUser(Long id, String userName, String phone, String email, String password, Date dateOfBirth, String userNotes) {\r\n\t public UserDto update(UserDto userDto) \r\n\t {\r\n\t\t return service.update(userDto);\r\n\t }", "public String getUpdateUser() {\r\n return updateUser;\r\n }", "public String getUpdateUser() {\r\n return updateUser;\r\n }", "public void setUser(String user) {\r\n this.user = user;\r\n }", "@ResponseStatus(code=HttpStatus.OK)\r\n\t@RequestMapping(value=\"/update\", method=RequestMethod.GET)\r\n\tpublic void update() {\r\n\t\tSystem.out.println(\"StudentRestController.Update()_________\");\r\n\t}", "@GetMapping(\"/updateAccount\")\n public String updateProfile(HttpServletRequest request,Model model){\n Map<String, String[]> userUpdateParam = request.getParameterMap();\n\n String adminId[] = userUpdateParam.get(\"adminId\");\n String role[] = userUpdateParam.get(\"role\");\n String password[] = userUpdateParam.get(\"password\");\n String adminEmail[] = userUpdateParam.get(\"adminEmail\");\n\n ApplicationUser applicationUser = new ApplicationUser();\n applicationUser.setAdminId(adminId[0]);\n applicationUser.setRole(role[0]);\n applicationUser.setPassword(password[0]);\n applicationUser.setEmail(adminEmail[0]);\n\n sportyShoesService.updateProfile(applicationUser);\n\n return \"profileUpdateSuccess\";\n }", "@Override\n\tpublic void updateUser(UserInfo ui) {\n\n\t}", "@Override\n\tpublic void updateUser(User pUser) {\n\t\t\n\t}", "public static int update(User u){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database untuk merubah data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement( \n \"update t_user set user_name=?,nama_lengkap=?,password=?,hak_akses=? where id=?\"); \n ps.setString(1,u.getUserName()); \n ps.setString(2,u.getNamaLengkap()); \n ps.setString(3,u.getPassword()); \n ps.setString(4,u.getHakAkses()); \n ps.setInt(5,u.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n return status; \n }", "@Override\n\tpublic void regester(UserInfo userInfo) {\n\t\tSystem.out.println(\"user has been regesterd successfully\"+ userInfo);\n\t}", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "@Override\n\tpublic void update(User user) throws DAOException {\n\t\t\n\t}", "public String getUser(){\n \treturn user;\n }", "int updateUserById( User user);", "public void setUser(String user) \r\n\t{\n\t\tthis.user = user;\r\n\t}", "public User getUser(){return this.user;}", "public void editUser(User tmpUser, User user) {\n\t\t\n\t}", "private void update(HttpServletRequest request, HttpServletResponse response)\n {\n String emp_no = request.getParameter(\"no\");\n String emp_name = request.getParameter(\"username\");\n String emp_tel_num = request.getParameter(\"phone\");\n String emp_addr = request.getParameter(\"addr\");\n String emp_email = request.getParameter(\"email\");\n String emp_sex = request.getParameter(\"sex\");\n int emp_type = Integer.parseInt(request.getParameter(\"type\"));\n String emp_pass = request.getParameter(\"pass\");\n //获取emp_id\n Employee emp = new EmployeeDAO().findUserByNo(emp_no);\n int emp_id = emp.getEmp_id();\n \n String boy = \"home/img/headpic/boy.jpg\";\t\t//男头\n String girl = \"home/img/headpic/girl.jpg\";\t\t//女头\n \n Employee employee = new Employee();\n employee.setEmp_id(emp_id);\n employee.setEmp_no(emp_no);\n employee.setEmp_name(emp_name);\n employee.setEmp_tel_num(emp_tel_num);\n employee.setEmp_addr(emp_addr);\n employee.setEmp_email(emp_email);\n employee.setEmp_sex(emp_sex);\n EmployeeDAO dao = (EmployeeDAO) DAOFactory.createEmployeeDAO();\n boolean result = dao.update(employee);\n User user = new User();\n user.setEmp_no(emp_no);\n user.setEmp_pass(emp_pass);\n if(emp_sex.equals(\"男\")) { \t\n \tuser.setHead_path(boy);\n } else if(emp_sex.equals(\"女\")){\n \tuser.setHead_path(girl);\n }\n user.setType(emp_type);\n UserDAO dao2 = (UserDAO) DAOFactory.createUserDAO();\n boolean result2 = dao2.update(user);\n try\n {\n if (result && result2)\n request.setAttribute(\"result\", \"更新成功!\");\n else\n request.setAttribute(\"result\", \"更新失败!\");\n request.setAttribute(\"employee\", employee);\n request.setAttribute(\"user\", user);\n request.getRequestDispatcher(\"home_root/people.jsp\").forward(request, response);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public void setEditUser(User editUser)\r\n/* */ {\r\n/* 179 */ this.editUser = editUser;\r\n/* */ }", "@Override\n\tpublic void editUser(ERSUser user) {\n\t\tuserDao.updateUser(user);\n\t}", "@Override\n public void updateUser(User u) {\n Session session = this.sessionFactory.getCurrentSession();\n session.update(u);\n logger.info(\"User updated successfully, User Details=\"+u);\n }", "public String getUpdateUser () {\r\n\t\treturn updateUser;\r\n\t}", "public User getEditUser()\r\n/* */ {\r\n/* 172 */ return this.editUser;\r\n/* */ }", "public void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\tUser add = new User(user.getText(), String.valueOf(pass.getPassword()), addr.getText(), phone.getText());\n\n\t\t\t\t\t\t\tConnection connection = Conn.getConnection();\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tStatement stmt = connection.createStatement();\n\t\t\t\t\t\t\t\t//Update the user details by the value that the user has entered\n\t\t\t\t\t\t\t\tstmt.executeUpdate(\"UPDATE USERS SET USERNAME ='\"+add.getUsername()+\"',PASSWORD = '\"+add.getPassword()+\"',ADDRESS='\"+add.getAddress()+\"',PHONE = '\"+add.getPhoneNo()+\"' WHERE UID = \"+update.getUID());\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"User updated!\"); //Update success message\n\t\t\t\t\t\t\t\tf.dispose();\n\t\t\t\t\t\t\t\tf2.dispose();\n\t\t\t\t\t\t\t\tview.initComponents();//Open the viewUserTab back\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcatch (SQLException e1) {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, e1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "@Override\r\n\tprotected void performAction(User user) {\r\n\t\tif(user != null)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tDatabaseOperation databaseOperation = new DatabaseOperation();\r\n\t\t\t\tint selection = JOptionPane.showConfirmDialog(this, \"Do you want to edit this user?\", \"Confirm action\", JOptionPane.YES_NO_CANCEL_OPTION);\r\n\t\t\t\tif(selection == JOptionPane.YES_OPTION)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(databaseOperation.updateInformation(user, this.user.getUsername()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(this, \"User edited successfuly\", \"Error\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t\tedited = true;\r\n\t\t\t\t\t\tclose();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(this, \"There was a problem editing this user. Try again.\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(selection == JOptionPane.NO_OPTION) {\r\n\t\t\t\t\tclose();\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"It was not possible to stablish a connection with the database\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tclose();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\n \n String name = request.getParameter(\"name\");\n String email = request.getParameter(\"email\");\n String password = request.getParameter(\"password\");\n String address = request.getParameter(\"address\");\n String phone = request.getParameter(\"phone\");\n int status = 1;\n long url = System.currentTimeMillis();\n String passMD5 = helper.MD5Generator.generate(password);\n User user = new User(name, email, passMD5, address, phone,status,url); \n if (action.equals(\"Create\")) {\n if (!userDao.find(user)) {\n Controller.controller.addUser(user);\n response.sendRedirect(\"doUser\");\n } else {\n response.sendRedirect(\"create-user.jsp\");\n } \n } else if (action.equals(\"Edit\")) {\n if (userDao.find(email) != null) {\n Controller.controller.editUser(user);\n response.sendRedirect(\"doUser\");\n } else {\n response.sendRedirect(\"edit-user.jsp\");\n }\n }\n \n \n }", "protected void updateAttendance(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\tint uid=Integer.parseInt(request.getParameter(\"user\"));\n\tint a = Integer.parseInt(request.getParameter(\"attendanceID\"));\n\tint t=Integer.parseInt(request.getParameter(\"intime\"));\n\tint t1=Integer.parseInt(request.getParameter(\"outtime\"));\n\tString s = request.getParameter(\"date\");\n\tString s1 = request.getParameter(\"details\");\n\n\nUserVO uv=new UserVO();\nuv.setUser_id(uid);\n\nAttendanceVO v=new AttendanceVO();\nv.setAtt_id(a);\nv.setIn_time(t);\nv.setOut_time(t1);\nv.setDate(s);\nv.setDetails(s1);\nv.setUserVO(uv);\n\nAttendanceDAO d=new AttendanceDAO();\n\nd.updateAttendance(v);\n\nsearchAttendance(request, response);\n\n}", "@Override\n\tpublic int update(TbUser user) {\n\t\treturn new userDaoImpl().update(user);\n\t}", "private void logUser() {\n }", "@Override\n\tpublic void save(User u) {\n\t\tSystem.out.println(\"a user saved\");\n\t}", "public void updateUser() {\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(db.DB.connectionString, db.DB.user, db.DB.password);\n Statement stmt = conn.createStatement();\n String query = \"update users set first_name='\" + firstName + \"', \";\n query += \"last_name='\" + lastName + \"', \";\n query += \"phone_number='\" + phoneNumber + \"', \";\n query += \"email='\" + email + \"', \";\n query += \"address='\" + address + \"', \";\n query += \"id_city='\" + idCity + \"' \";\n query += \"where id_user = \" + id;\n stmt.executeUpdate(query);\n\n User updatedUser = findUser(id);\n updatedUser.setFirstName(firstName);\n updatedUser.setLastName(lastName);\n updatedUser.setPhoneNumber(phoneNumber);\n updatedUser.setEmail(email);\n updatedUser.setIdCity(idCity);\n updatedUser.setAddress(address);\n\n } catch (SQLException ex) {\n Logger.getLogger(UserController.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n clear();\n try {\n conn.close();\n } catch (Exception e) {\n /* ignored */ }\n }\n }", "public String getUser()\n {\n return _user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "private void getUser(){\n mainUser = DatabaseAccess.getUser();\n }", "public boolean update(UserDTO user){\r\n try {\r\n PreparedStatement preSta = conn.prepareStatement(sqlUpdateUser);\r\n preSta.setString(1,user.getEmail());\r\n preSta.setString(2, user.getPassword());\r\n preSta.setInt(3, user.getRole());\r\n preSta.setInt(4, user.getUserId());\r\n if(preSta.executeUpdate() >0){\r\n return true;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n error=\"khong ton tai userId\"+ user.getUserId();\r\n return false;\r\n }", "public void updateUsuario(Usuario usuario) {\n\t\t\n\t}", "@Action( value=\"editAdmin\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editAdmin() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ getNick()+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t \n }\n rol=\"ADMIN\";\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}", "@GetMapping\n public String displayUser(Model model) {\n User newUser = new User(\"Sven Svennis\",\"Svennegatan 2\", new ArrayList<Loan>());\n userRepository.save(newUser);\n\n //TODO this is where we need to fetch the current user instead!\n User user = userRepository.getOne(1l);\n\n model.addAttribute(\"user\", user);\n\n return \"displayUser\";\n }", "UpdateUserResult updateUser(UpdateUserRequest updateUserRequest);", "public void setUser_name(String user_name);", "private static void updateUser() {\n\t currentUser = Structure.User(currentUser);\n\t CRUDUsers.compareWithRemote(currentUser).subscribe(new SingleSubscriber<User>() {\n\t\t @Override\n\t\t public void onSuccess(User value) {\n\t\t\t\tConnection.logIn(value);\n\t\t }\n\t\t\n\t\t @Override\n\t\t public void onError(Throwable error) {\n\t\t\t logOff();\n\t\t\t App.showMessage(error.getMessage());\n\t\t }\n\t });\n }", "public int updateUser(User user) {\n\t\t\n\t\treturn 1;\n\t}", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }" ]
[ "0.72089475", "0.7086436", "0.70185065", "0.7005314", "0.6995714", "0.69630015", "0.69630015", "0.69196", "0.6826647", "0.6800715", "0.679537", "0.6747495", "0.66330105", "0.6629408", "0.66287774", "0.6622626", "0.66068876", "0.6601611", "0.65864736", "0.6545299", "0.65447307", "0.65144277", "0.6475036", "0.64670587", "0.6443017", "0.64424115", "0.6437019", "0.64247286", "0.63979125", "0.63560015", "0.63547707", "0.6354073", "0.6353623", "0.63529956", "0.6335709", "0.6313587", "0.62940866", "0.6288691", "0.62872905", "0.6269779", "0.6264747", "0.62642777", "0.6238033", "0.62220657", "0.6215533", "0.6210306", "0.6205585", "0.61935264", "0.6185488", "0.61845356", "0.6177993", "0.6177993", "0.6172424", "0.61656934", "0.61574143", "0.61529607", "0.6150077", "0.614946", "0.6147965", "0.61421114", "0.61421114", "0.61421114", "0.61421114", "0.61421114", "0.61421114", "0.6137666", "0.6124722", "0.61238396", "0.61169153", "0.61127526", "0.6109429", "0.61044824", "0.6099064", "0.60874397", "0.60759234", "0.6075682", "0.6073792", "0.6072848", "0.6065733", "0.60642177", "0.6048773", "0.60468936", "0.6045982", "0.60454535", "0.6044718", "0.6041977", "0.6033316", "0.6033316", "0.6033316", "0.6033316", "0.6025878", "0.6025378", "0.6024147", "0.6020066", "0.60168654", "0.60151386", "0.60150903", "0.6013541", "0.6013203", "0.6012224" ]
0.6903319
8
Primitive Data Types 1. integer data type 32 bit
public static void main(String[] args) { int x; //declaring int y=123456789; //initializing/assigning the value of y to be 10 --> 10 does not equal to y but y=10 Integer c=3; Integer a=new Integer(3); //2. double is numbers with decimal number double d= 2.1; //3. boolean two type true or false boolean bool= true; //true=1 boolean bool1=false;//false=0 //4. byte 8-bit data type byte b=123; //5. short 16-bit data type short srt=12345; //6. long 64-bit data type long lng= 4; //7. float data typr 32 bit float f=3; float f1='s'; //8. Char variable type char ch= 'C'; /**********complex objects or reference not *************/ //1. Strings variable type //string pool String s="hu"; //declaring String r= new String("hello"); r="hhh"; s="hi"; String str= " my name is rasmi"; //assigning the value of str to be h--> h does not equal to str // int num='x'; int sum=num+2; System.out.println("num:"+ num +" "+"sum:"+sum); /******* enums******/ Color c1=Color.RED; System.out.println( "Enum Color: " +c1); int num1=0,num2=0; String chair,table="metal"; //chair=chair+table; // chair not initialized //System.out.println("chair: "+chair); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic long as32Bit() throws AssembleError {\n\t\treturn 0;\n\t}", "public abstract Number getPrimitiveType();", "PrimitiveType createPrimitiveType();", "public boolean hasInteger32() {\n return result.hasInteger32();\n }", "public PrimitiveType getPrimitiveType();", "public LlvmValue visit(IntegerType n){\n\t\treturn LlvmPrimitiveType.I32;\n\t}", "Uint32 getType();", "public boolean is32bit() {\n\t\treturn true;\n\t}", "public Class<?> getPrimitiveType();", "public UnsignedInteger32(long a) {\r\n if ( (a < MIN_VALUE) || (a > MAX_VALUE)) {\r\n throw new NumberFormatException();\r\n }\r\n\r\n value = new Long(a);\r\n }", "public BuiltInAtomicType getPrimitiveType() {\n return BuiltInAtomicType.NOTATION;\n }", "public DataPrimitive(int value) {\n\t\tsuper();\n\t\tthis.value = Integer.toString(value);\n\t}", "private Bits32() {\r\n }", "public abstract int read_ulong();", "public static void main(String[] args) {\n\n int a = 5; // premitive data type\n\n Integer ii1 = new Integer(a); // boxing or wrapping\n System.out.println(\"ii1=\"+ii1);\n\n Integer ii2 = new Integer(10);\n System.out.println(\"ii2=\"+ii2);\n\n Integer ii3 = a;\n Integer ii4 = 15; // autoboxing or autowrapping\n System.out.println(\"ii3=\"+ii3);\n System.out.println(\"ii4=\"+ii4);\n\n // Integer ii1 = new Integer(a);\n // converting non premitive into premitive\n int a1 = ii1.intValue();// unboxing or unwrapping\n int a2 = ii1;// autounboxing or autounwrapping\n\n }", "public final int getInt32(int i) {\n if (isAvailable(i, 4)) {\n return this.data.getInt(i);\n }\n return -1;\n }", "@Override\n public String getDataType() {\n return getPrimitiveType().name();\n }", "private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }", "public static int int32_tToInt(byte b0, byte b1, byte b2, byte b3) {\n return unsignedByteToInt(b0) +\n (unsignedByteToInt(b1) << 8) +\n (unsignedByteToInt(b2) << 16) +\n (unsignedByteToInt(b3) << 24);\n }", "@Override\n\tpublic Type getType() {\n\t\treturn Type.INT_TYPE;\n\t}", "public final int fixed_32bit_literal() throws RecognitionException {\n int value = 0;\n\n\n int integer_literal55 = 0;\n long long_literal56 = 0;\n short short_literal57 = 0;\n byte byte_literal58 = 0;\n float float_literal59 = 0.0f;\n char char_literal60 = 0;\n boolean bool_literal61 = false;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:313:3: ( integer_literal | long_literal | short_literal | byte_literal | float_literal | char_literal | bool_literal )\n int alt12 = 7;\n switch (input.LA(1)) {\n case INTEGER_LITERAL: {\n alt12 = 1;\n }\n break;\n case LONG_LITERAL: {\n alt12 = 2;\n }\n break;\n case SHORT_LITERAL: {\n alt12 = 3;\n }\n break;\n case BYTE_LITERAL: {\n alt12 = 4;\n }\n break;\n case FLOAT_LITERAL: {\n alt12 = 5;\n }\n break;\n case CHAR_LITERAL: {\n alt12 = 6;\n }\n break;\n case BOOL_LITERAL: {\n alt12 = 7;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 12, 0, input);\n throw nvae;\n }\n switch (alt12) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:313:5: integer_literal\n {\n pushFollow(FOLLOW_integer_literal_in_fixed_32bit_literal722);\n integer_literal55 = integer_literal();\n state._fsp--;\n\n value = integer_literal55;\n }\n break;\n case 2:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:314:5: long_literal\n {\n pushFollow(FOLLOW_long_literal_in_fixed_32bit_literal730);\n long_literal56 = long_literal();\n state._fsp--;\n\n LiteralTools.checkInt(long_literal56);\n value = (int) long_literal56;\n }\n break;\n case 3:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:315:5: short_literal\n {\n pushFollow(FOLLOW_short_literal_in_fixed_32bit_literal738);\n short_literal57 = short_literal();\n state._fsp--;\n\n value = short_literal57;\n }\n break;\n case 4:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:316:5: byte_literal\n {\n pushFollow(FOLLOW_byte_literal_in_fixed_32bit_literal746);\n byte_literal58 = byte_literal();\n state._fsp--;\n\n value = byte_literal58;\n }\n break;\n case 5:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:317:5: float_literal\n {\n pushFollow(FOLLOW_float_literal_in_fixed_32bit_literal754);\n float_literal59 = float_literal();\n state._fsp--;\n\n value = Float.floatToRawIntBits(float_literal59);\n }\n break;\n case 6:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:318:5: char_literal\n {\n pushFollow(FOLLOW_char_literal_in_fixed_32bit_literal762);\n char_literal60 = char_literal();\n state._fsp--;\n\n value = char_literal60;\n }\n break;\n case 7:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:319:5: bool_literal\n {\n pushFollow(FOLLOW_bool_literal_in_fixed_32bit_literal770);\n bool_literal61 = bool_literal();\n state._fsp--;\n\n value = bool_literal61 ? 1 : 0;\n }\n break;\n\n }\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return value;\n }", "public int intValue();", "public String getPrimitiveType() {\r\n return type;\r\n }", "int getIntBitLength() {\r\n\t\treturn intBitLength;\r\n\t}", "public interface IPrimitiveSize {\r\n /**\r\n * The number of bits in byte.\r\n */\r\n int NumberOfBitsInByte = 8;\r\n\r\n interface InBytes {\r\n /**\r\n * The size of a byte in bytes.\r\n */\r\n int ByteSize = 1;\r\n\r\n /**\r\n * The size of a short in bytes.\r\n */\r\n int ShortSize = 2;\r\n\r\n /**\r\n * The size of an integer in bytes.\r\n */\r\n int IntegerSize = 4;\r\n\r\n /**\r\n * The size of a long in bytes.\r\n */\r\n int LongSize = 8;\r\n\r\n /**\r\n * The size of a float in bytes.\r\n */\r\n int FloatSize = 4;\r\n\r\n /**\r\n * The size of a double in bytes.\r\n */\r\n int DoubleSize = 8;\r\n\r\n /**\r\n * The size of a char in bytes.\r\n */\r\n int CharacterSize = 2;\r\n\r\n /**\r\n * The size of a reference in bytes.\r\n * Assuming 64-bit architecture.\r\n */\r\n int ReferenceSize = 8;\r\n }\r\n\r\n interface InBits {\r\n /**\r\n * The size of a byte in bytes.\r\n */\r\n int ByteSize = InBytes.ByteSize * NumberOfBitsInByte;\r\n\r\n /**\r\n * The size of a short in bytes.\r\n */\r\n int ShortSize = InBytes.ShortSize * NumberOfBitsInByte;\r\n\r\n /**\r\n * The size of an integer in bytes.\r\n */\r\n int IntegerSize = InBytes.IntegerSize * NumberOfBitsInByte;\r\n\r\n /**\r\n * The size of a long in bytes.\r\n */\r\n int LongSize = InBytes.LongSize * NumberOfBitsInByte;\r\n\r\n /**\r\n * The size of a float in bytes.\r\n */\r\n int FloatSize = InBytes.FloatSize * NumberOfBitsInByte;\r\n\r\n /**\r\n * The size of a double in bytes.\r\n */\r\n int DoubleSize = InBytes.DoubleSize * NumberOfBitsInByte;\r\n\r\n /**\r\n * The size of a char in bytes.\r\n */\r\n int CharacterSize = InBytes.CharacterSize * NumberOfBitsInByte;\r\n\r\n /**\r\n * The size of a reference in bytes.\r\n * Assuming 64-bit architecture.\r\n */\r\n int ReferenceSize = InBytes.ReferenceSize * NumberOfBitsInByte;\r\n }\r\n}", "public static void main(String[] args){\n byte b1=34;\n // -128, 127\n System.out.println(b1);\n\n\n // short example\n short s1=28;\n // stores whole numbers -32,768 to 32,767\n short s2=1000;\n short s3=35;\n\n //range of int 4 bytes stores -2,147,483,648 to 2,147,483,647\n int number=23456677;\n System.out.println(44); //as default it consider as \"int\"\n long l1= 200;\n long l2=9999999999L;/* when you move out of int range computer needs to know what is the number\n that is why you need to tell it is long by adding L at the end */\n System.out.println(999999999999L);\n\n //stores decimal numbers\n double d1= 5.5;\n System.out.println(d1);\n // as a default java picks double for decimal number\n System.out.println(3.5);\n float f1= 4.5f;\n System.out.println(f1);\n System.out.println(f1+d1);\n\n\n\n\n\n\n }", "long mo107678c(Integer num);", "public Object visitIntegerConstant(GNode n) {\n xtc.type.Type result;\n \n result = cops.typeInteger(n.getString(0));\n \n return result.getConstant().bigIntValue().longValue();\n }", "public int read_int32() throws IOException {\n byte bytes[] = read_bytes(4);\n\n return bytesToInt32(bytes, Endianness.BIG_ENNDIAN);\n }", "public short getPrimitiveType() {\n \t\treturn unitType;\n \t}", "public static void main(String[] args) {\n\r\n\t\tInteger obj = new Integer(10);\r\n\t\t\r\n\t\t//Converting Wrapper object to primitive data type\r\n\t\t\r\n\t\tint num = obj.intValue();\r\n\t\t\r\n\t\tSystem.out.println(num+ \" \"+ obj);\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tbyte aByte = (byte) 0b00100001;\r\n\r\n\t\t// A 16-bit 'short' value:\r\n\t\tshort aShort = (short) 0b1010000101000101;\r\n\r\n\t\t// Some 32-bit 'int' values:\r\n\t\tint anInt1 = 0b10100001010001011010000101000101;\r\n\t\tint anInt2 = 0b101;\r\n\t\tint anInt3 = 0B101; // The B can be upper or lower case.\r\n\r\n\t\t// A 64-bit 'long' value. Note the \"L\" suffix:\r\n\t\tlong aLong = 0b1010000101000101101000010100010110100001010001011010000101000101L;\r\n\t}", "@Override\n public final int readVarint32() throws IOException {\n return (int) readVarint64();\n }", "@Override\n public boolean ll_isPrimitiveType(int typeCode) {\n return !ll_isRefType(typeCode);\n }", "PrimitiveTypesLibrary createPrimitiveTypesLibrary();", "public static void main(String[] args) {\n\t\tString number = \"100\";\n\t\tint e = Integer.parseInt(number); // Convenience Method\n\t\tLong t = 1000l;\n\t\tbyte rr = t.byteValue(); // Convenience Method\n\t\tint bb = t.intValue();\n\t\tfloat cc = t.floatValue(); // xxxValue method\n\t\tlong r = 1000L;\n\t\tint r1 = (int)r;\n\t\t\n\t\t//********************************\n\t\tint r3 = 1000;\n\t\tInteger r4 = new Integer(r3); // Old Way Boxing\n\t\tint r6 = r4.intValue(); // Old Way UnBoxing\n\t\tr6++; // Increment\n\t\tr4 = new Integer(r6); // Old Way boxing\n\t\t\n\t\tInteger r5 = r3; // New Way Boxing\n\t\tr5++; // Unboxing , Increment , Boxing\n\t\tLinkedList l = new LinkedList();\n\t\tl.add(1000);\n\t\tint p1 = 1000; \n\t\tInteger p2 = 128; //-128 to 127\n\t\tInteger p3 = 128;\n\t\tif(p2==p3){\n\t\t\tSystem.out.println(\"Same Ref\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Not Same Ref\");\n\t\t}\n\n\t}", "protected final int get_INTEGER(int column) {\n // @AGG had to get integer as Little Endian\n if (metadata.isZos())\n return dataBuffer_.getInt(columnDataPosition_[column - 1]);\n else\n return dataBuffer_.getIntLE(columnDataPosition_[column - 1]);\n// return SignedBinary.getInt(dataBuffer_,\n// columnDataPosition_[column - 1]);\n }", "@Override\n public boolean isPrimitive() {\n return true;\n }", "public static void main(String[] args) {\r\n\t\r\n\t int numInt=10;\r\n\t Integer numInteger=10;\r\n\t \r\n\t double numdouble=5.5;\r\n\t Double numDouble=5.5;\r\n\t \r\n\t long longnum=20l;\r\n\t Long Longnum=longnum; //auto-boxing\r\n\t \r\n\t System.out.println(longnum);\r\n\t System.out.println(Longnum);\r\n\t \r\n\t Boolean Booleanresult=false;\r\n\t boolean boolresult=Booleanresult; //unboxing\r\n\t \r\n//\t Methods for wrapper classes:\r\n //max_value: returns the max value of the primitive\r\n\t char maximumChar=Character.MAX_VALUE;\r\n\t System.out.println(maximumChar);\r\n\t \r\n\t//min_value: returns the minimum value of primitive.\r\n\t \r\n\t int minimum=Integer.MIN_VALUE;\r\n\t System.out.println(minimum);\r\n\t \r\n\t byte miniByte=Byte.MIN_VALUE;\r\n\t System.out.println(miniByte);\r\n\t \r\n\t//parse methods: converts String values to primitives, nad returns values as primitives.\r\n\t \r\n\t //parseInt(\"strValue\"):takes the String and converts it to int.\r\n\t \r\n\t Integer num1=Integer.parseInt(\"123\"); //auto-boxing\r\n\t System.out.println(num1+1); //124\r\n\t \r\n\t //parseByte(\"strValue\"):takes a string value and converts it to primitive returning a byte value.\r\n\t \r\n\t int num3=Byte.parseByte(\"19\");\r\n\t System.out.println(num3+1); //20\r\n\t \r\n\t //parseShort(\"strValue\"):takes a string value and converts it to primitive returning a short value.\r\n\t \r\n\t short num4=Short.parseShort(\"123\");\r\n\t System.out.println(num4+5); //128\r\n\t \r\n\t //parseBoolean(\"strValue\"): takes string value and converts it to boolean primitive.\r\n\t boolean A=Boolean.parseBoolean(\"CybertekBatch12\"); //any string value other than true, it will return false\r\n\t System.out.println(A); //false\r\n\t \r\n\t boolean B=Boolean.parseBoolean(\"TrUe\");\r\n\t System.out.println(B); //parseBoolean method ignores the case sensitivity in this case.\r\n\t \r\n\t \r\n//\t ValueOf methods: converts String value to Wrapper class value.\r\n\t \r\n\t int z=Integer.valueOf(\"1234\");\r\n\t System.out.println(z);\r\n\t \r\n\t boolean result1=Boolean.valueOf(\"TRUE\"); //this method also ignores the case sensitivity and \r\n\t //since the result is primitive, it prints out the exact one as the string\r\n\t System.out.println(result1);\r\n\t \r\n\t \r\n\t int totalNum=100;\r\n\t \r\n}", "IntegerValue createIntegerValue();", "IntegerValue createIntegerValue();", "void mo107677b(Integer num);", "public void testToInt(){\t\t\r\n\t\tassertEquals(fIntToTest, ByteUtil.byteArrayToInt(fIntToTestByteArray));\r\n\t}", "public PrimitiveType getPrimitiveType() {\n return primitiveType;\n }", "public BuiltInAtomicType getPrimitiveType() {\r\n return BuiltInAtomicType.STRING;\r\n }", "IntegerLiteral getSize();", "public static void main(String[] args) {\n\t\t\n\t\tInteger obj= new Integer(10);\n\t\t\n\t\tint value=obj.intValue();\n\t\t\n\t\tint data=obj; //auto unboxing\n\t\t//int data=obj.intValue();\n\t\t\n\t\tobj=200; //autoboxing\n\t\t//obj=new Integer(200);\n\n\t}", "public static final long Integer(final Object o) {\n\t\t\n\t\treturn Convert.Any.toLong(o, 0);\n\t}", "public static int sizeBits_dataType() {\n return 8;\n }", "public static void main(String[] args) {\n\t\t short s = 1;\n\t\t byte c = 1;\n\t\t int i = 1;\n\t\t printIntBinary(i);\n\t\t \n\t}", "public int getOneof1132() {\n if (hugeOneofCase_ == 1132) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1128() {\n if (hugeOneofCase_ == 1128) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public static void main(String[] args) {\n byte contohByte = 100;\n short contohShort = 10000;\n int contohInt = 32000;\n long contohLong = 12000000;\n long contohLong2 = 120000000L;\n\n float contohFloat = 3.14F;\n double contohDouble = 3.12345667;\n\n int desimalInt = 43;\n int hexadecimalInt = 0x123fa;\n int binaryInt = 0b00010001;\n\n\n\n }", "public boolean isKnownPrimitive() {\r\n return id > 0 && type != null;\r\n }", "public int getOneof1132() {\n if (hugeOneofCase_ == 1132) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "@Override\n public int intValue(int numId) {\n return 0;\n }", "private native short Df1_Read_Integer(String plcAddress) throws Df1LibraryNativeException;", "public int getInt(){\n return new BigInteger(this.value).intValue();\n }", "public int getOneof1128() {\n if (hugeOneofCase_ == 1128) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public static byte[] convertInt32(int v, boolean isLE)\r\n {\r\n byte[] bytes = new byte[4];\r\n if (isLE)\r\n {\r\n bytes[3] = (byte) ((v >>> 24) & 0xFF);\r\n bytes[2] = (byte) ((v >>> 16) & 0xFF);\r\n bytes[1] = (byte) ((v >>> 8) & 0xFF);\r\n bytes[0] = (byte) ((v >>> 0) & 0xFF);\r\n }\r\n else\r\n {\r\n bytes[0] = (byte) ((v >>> 24) & 0xFF);\r\n bytes[1] = (byte) ((v >>> 16) & 0xFF);\r\n bytes[2] = (byte) ((v >>> 8) & 0xFF);\r\n bytes[3] = (byte) ((v >>> 0) & 0xFF);\r\n }\r\n return bytes;\r\n }", "private int intLength() {\n return (bitLength() >>> 5) + 1;\n }", "public static void main(String[] args) {\n\t\tInteger i =new Integer(10);\r\n\t\tInteger i1=new Integer(\"10\");\r\n\t\tSystem.out.println(\" \" +i+ +i1);\r\n\t\tBoolean b= new Boolean(true);\r\n\t\tBoolean b1 =new Boolean(\"true\");\r\n\t\tSystem.out.println( b +\"\"+b1);\r\n\t\tint iii=new Integer(10);//Auto-unboxing\r\nInteger iiiii =10;//Auto-boxing\r\n\r\n\t}", "int intValue();", "public DataInt(Integer b) {\n this.i = b;\n }", "public int getOneof1111() {\n if (hugeOneofCase_ == 1111) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1111() {\n if (hugeOneofCase_ == 1111) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getInt1() {\n\t\tfinal byte b1 = payload.get();\n\t\tfinal byte b2 = payload.get();\n\t\tfinal byte b3 = payload.get();\n\t\tfinal byte b4 = payload.get();\n\t\treturn b3 << 24 & 0xFF | b4 << 16 & 0xFF | b1 << 8 & 0xFF | b2 & 0xFF;\n\t}", "public Individual(int integerSize, int integerCount, boolean signedInt)\r\n\t{\r\n\t\tintSize = integerSize;\r\n\t\tintCount = integerCount;\r\n\t\tbinary = new boolean[integerSize * integerCount];\r\n\t\tthis.signedInt = signedInt;\r\n\t}", "private native void Df1_Write_Integer(String plcAddress,short value) throws Df1LibraryNativeException;", "public static void main(String[] args) {\n\t\n\tint i=100;\n\tInteger j=i; // auto boxing\n\t\n\tDouble d=34.2;\n\t\n\tboolean b=true;\n\tboolean b2=b;\n\t\n\tList<Integer>nums=new ArrayList<>();\n\tnums.add(433);\n\tint p=555;\n\tnums.add(p);\n\tnums.add(new Integer(77));\n\t\n\tSystem.out.println(nums);\n\t // UnBoxing == takind the wrapper class object and converting into primitive and happens automatically\n\tint r = nums.get(0);\n\t\n\tboolean bool= new Boolean(false);\n\tboolean boolprim=bool;\n\tSystem.out.println(boolprim);\n\t\n\tCharacter chObj='^'; //autoboxing\n\tchar chPrim=chObj;\n\t\n\tchar myChar='^';\n\tCharacter chObj2=myChar; // autoboxing\n\t\n\tchar chprim=chObj; // unboxing from character object\n\t\n\tInteger intValue = new Integer (400);\n\t\n\tif(intValue==400) { // unboxing \n\t\tSystem.out.println(\"Pass\");\n\t}else {\n\t\tSystem.out.println(\"Fail\");\n\t}\n\t\n\t\n\tString word=\"java\";\n\tword=word.toUpperCase();\n\tword=word+\"programminng\";\n\tSystem.out.println(word);\n}", "private TsPrimitiveType readOneValue() {\n switch (dataType) {\n case BOOLEAN:\n return new TsBoolean(valueDecoder.readBoolean(valueInputStream));\n case INT32:\n return new TsInt(valueDecoder.readInt(valueInputStream));\n case INT64:\n return new TsLong(valueDecoder.readLong(valueInputStream));\n case FLOAT:\n return new TsFloat(valueDecoder.readFloat(valueInputStream));\n case DOUBLE:\n return new TsDouble(valueDecoder.readDouble(valueInputStream));\n case TEXT:\n return new TsBinary(valueDecoder.readBinary(valueInputStream));\n default:\n break;\n }\n throw new UnSupportedDataTypeException(\"Unsupported data type :\" + dataType);\n }", "public static int toInt32(byte[] value) {\r\n\t\treturn toInt32(value, 0);\r\n\t}", "int getOneof1072();", "public final int integral_literal() throws RecognitionException {\n int value = 0;\n\n\n long long_literal187 = 0;\n int integer_literal188 = 0;\n short short_literal189 = 0;\n byte byte_literal190 = 0;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1173:3: ( long_literal | integer_literal | short_literal | byte_literal )\n int alt37 = 4;\n switch (input.LA(1)) {\n case LONG_LITERAL: {\n alt37 = 1;\n }\n break;\n case INTEGER_LITERAL: {\n alt37 = 2;\n }\n break;\n case SHORT_LITERAL: {\n alt37 = 3;\n }\n break;\n case BYTE_LITERAL: {\n alt37 = 4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 37, 0, input);\n throw nvae;\n }\n switch (alt37) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1173:5: long_literal\n {\n pushFollow(FOLLOW_long_literal_in_integral_literal3203);\n long_literal187 = long_literal();\n state._fsp--;\n\n\n LiteralTools.checkInt(long_literal187);\n value = (int) long_literal187;\n\n }\n break;\n case 2:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1178:5: integer_literal\n {\n pushFollow(FOLLOW_integer_literal_in_integral_literal3215);\n integer_literal188 = integer_literal();\n state._fsp--;\n\n value = integer_literal188;\n }\n break;\n case 3:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1179:5: short_literal\n {\n pushFollow(FOLLOW_short_literal_in_integral_literal3223);\n short_literal189 = short_literal();\n state._fsp--;\n\n value = short_literal189;\n }\n break;\n case 4:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1180:5: byte_literal\n {\n pushFollow(FOLLOW_byte_literal_in_integral_literal3231);\n byte_literal190 = byte_literal();\n state._fsp--;\n\n value = byte_literal190;\n }\n break;\n\n }\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return value;\n }", "public static int offsetBits_dataType() {\n return 0;\n }", "com.google.protobuf.Int32Value getSize();", "public static void main(String[] args) {\n int a=I;\n System.out.println(\"Auto_unboxing\"+a);\n Integer b=new Integer(a);\n System.out.println(\"Auto_boxing\"+b);\n\t}", "String getModeledPrimitiveType(Object elementID) throws Exception;", "private long packValues(int key, int next) {\n return ((long)next << 32) | ((long)key & 0xFFFFFFFFL);\n }", "public static void main(String[] args) {\n\t\tint i = 10;\n\t\tInteger I = Integer.valueOf(i);\n\t\tSystem.out.println(I);\n\t\t\n\t\t//Un boxing : Conversion of Wrapper class to Primitive type\n\t\t\n\t\t//Auto boxing\n\t\tI = 100;\n\t\tString S = Integer.toString(1290);\n\t\t\n\t}", "@Override\n public long readSInt64() throws IOException {\n long value = decoder.readVarint64();\n return (value >>> 1) ^ -(value & 1);\n }", "public int getOneof1086() {\n if (hugeOneofCase_ == 1086) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "long readS32BE()\n throws IOException, EOFException;", "public int getOneof1110() {\n if (hugeOneofCase_ == 1110) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "private static int readInt(@Nullable byte[] data) {\n if (data == null || data.length == 0) {\n return 0;\n }\n int value = 0;\n for (byte b : data) {\n value <<= 8;\n value += (0xff & b);\n }\n return value;\n }", "public int getOneof1110() {\n if (hugeOneofCase_ == 1110) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "static private int makeInt(int b3, int b2, int b1, int b0) {\n return (((b3 ) << 24) |\n ((b2 & 0xff) << 16) |\n ((b1 & 0xff) << 8) |\n ((b0 & 0xff) ));\n }", "public int getOneof1086() {\n if (hugeOneofCase_ == 1086) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public static void main(String[] args) {\n\n byte byteVal = 5;\n short shortVal = 10;\n int intVal = 100;\n long longVal = 50000L + (byteVal + shortVal + intVal) * 10L;\n\n System.out.println(longVal);\n\n }", "private static long tagId(long x) {\n return x & 0xFFFFFFFFFFFFL; // 1\n }", "Long mo20729a();", "@Test(expected = IOException.class)\n\tpublic void testUint32Overflow() throws IOException {\n\t\tBinaryReader br = br(true, 0xff, 0xff, 0xff, 0xff, 0xff);\n\t\tint value = br.readNextUnsignedIntExact();\n\t\tAssert.fail(\n\t\t\t\"Should not be able to read a value that is larger than what can fit in java 32 bit int: \" +\n\t\t\t\tInteger.toUnsignedString(value));\n\t}", "int intOf();", "public int getOneof1127() {\n if (hugeOneofCase_ == 1127) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public static int INT(byte[] sz, int type) {\n int num = 0, i = 0, s = 1 , itr = 0;\n if(type == 1) {\n s = -1;\n i = sz.length;\n }//set loop from end for little indian \n while(itr < 4 && itr < sz.length) {\n i = i + s * 1;\n //System.out.println(\"INT \"+itr+\" : IN \" + HEX(num));\n // System.out.println(\"BYTE : IN \" + HEX(sz[i]));\n num = num << 8;\n num = num + (sz[i] & 0xff);\n //System.out.println(\"INT : IN \" + HEX(num));\n itr++;\n }return num;\n }", "public long getPrimitiveId() {\r\n return id;\r\n }", "public int getOneof1286() {\n if (hugeOneofCase_ == 1286) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1186() {\n if (hugeOneofCase_ == 1186) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1127() {\n if (hugeOneofCase_ == 1127) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public long longValue();", "public static void main(String[] args) {\n\t\tbyte datoByte = 2; // Primitivo\n\t\tByte datoByteWrapper = 3; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + datoByte);\n\t\tSystem.out.println(\"Wrapper: \" + datoByteWrapper);\n\t\t// Conversiones\n\t\tbyte datoByte1 = 5;\n\t\tByte datoConvertido = datoByte1;\n\t\tSystem.out.println(\"Dato Convertido: \" + datoConvertido);\n\t\t// Conversiones 2\n\t\tByte datoConvertido1 = 6;\n\t\tbyte datoByte2 = datoConvertido1.byteValue();\n\t\tSystem.out.println(\"Dato Byte: \" + datoConvertido1);\n\t\tSystem.out.println();\n\t\t\n\t\t// short\n\t\tshort datoShort = 1; // Primitivo\n\t\tShort datoShortWrapper = 1; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + datoShort);\n\t\tSystem.out.println(\"Wrapper: \" + datoShortWrapper);\n\t\t// Conversiones\n\t\tshort datoShort1 = 4;\n\t\tShort shortConvertido = datoShort1;\n\t\tSystem.out.println(\"Dato Convertido: \" + datoShort1);\n\t\t// Conversiones 2\n\t\tShort shortConvertido1 = 6;\n\t\tshort datoShort2 = shortConvertido1.shortValue();\n\t\tSystem.out.println(\"Dato Short: \" + shortConvertido1);\n\t\tSystem.out.println();\n\n\t\t// int\n\t\tint edad = 45; // Primitivo\n\t\tInteger edadWrapper = 48; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + edad);\n\t\tSystem.out.println(\"Wrapper: \" + edadWrapper);\n\t\t// Conversiones\n\t\tint edad1 = 4;\n\t\tInteger integerConvertido = edad1;\n\t\tSystem.out.println(\"Dato Convertido: \" + edad1);\n\t\t// Conversiones 2\n\t\tInteger integerConvertido1 = 6;\n\t\tint edad2 = integerConvertido1.intValue();\n\t\tSystem.out.println(\"Int Convertido: \" + integerConvertido1);\n\t\tSystem.out.println();\n\t\t\n\t\t// long\n\t\tlong valorGrande = 12321; // Primitivo\n\t\tLong valorGrandeWrapper = 123123L; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valorGrande);\n\t\tSystem.out.println(\"Wrapper: \" + valorGrandeWrapper);\n\t\t// Conversiones\n\t\tlong valorGrande1 = 4;\n\t\tLong longConvertido = valorGrande1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valorGrande1);\n\t\t// Conversiones 2\n\t\tLong longConvertido1 = 23423L;\n\t\tlong valorGrande2 = longConvertido1.longValue();\n\t\tSystem.out.println(\"Int Convertido: \" + longConvertido1);\n\t\tSystem.out.println();\n\n\t\t// boolean\n\t\tboolean valorVerdad = true; // Primitivo\n\t\tBoolean valorVerdadWrapper = false; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valorVerdad);\n\t\tSystem.out.println(\"Wrapper: \" + valorVerdadWrapper);\n\t\t// Conversiones\n\t\tboolean valorVerdad1 = true;\n\t\tBoolean booleanConvertido = valorVerdad1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valorVerdad1);\n\t\t// Conversiones 2\n\t\tBoolean booleanConvertido1 = false;\n\t\tboolean valorVerdad2 = booleanConvertido1.booleanValue();\n\t\tSystem.out.println(\"Int Convertido: \" + booleanConvertido1);\n\t\tSystem.out.println();\n\n\t\t// float\n\t\tfloat valor = 1; // Primitivo\n\t\tFloat valorWrapper = 9F; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valor);\n\t\tSystem.out.println(\"Wrapper: \" + valorWrapper);\n\t\t// Conversiones\n\t\tfloat valor1 = 23;\n\t\tFloat floatConvertido = valor1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valor1);\n\t\t// Conversiones 2\n\t\tFloat floatConvertido1 = 65F;\n\t\tfloat valor2 = floatConvertido1.floatValue();\n\t\tSystem.out.println(\"Int Convertido: \" + floatConvertido1);\n\t\tSystem.out.println();\n\n\t\t// double\n\t\tdouble valorDecimal = 12.34; // Primitivo\n\t\tDouble valorDecimalWrapper = 34.78; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valorDecimal);\n\t\tSystem.out.println(\"Wrapper: \" + valorDecimalWrapper);\n\t\t// Conversiones\n\t\tdouble valorDecimal1 = 23.65;\n\t\tDouble doubleConvertido = valorDecimal1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valorDecimal1);\n\t\t// Conversiones 2\n\t\tDouble doubleConvertido1 = 65.78;\n\t\tdouble valorDecimal2 = doubleConvertido1.doubleValue();\n\t\tSystem.out.println(\"Int Convertido: \" + doubleConvertido1);\n\t\tSystem.out.println();\n\n\t\t// char\n\t\tchar letraAlfabeto = 'J'; // Primitivo\n\t\tCharacter letraAlfabetoWrapper = 'C'; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + letraAlfabeto);\n\t\tSystem.out.println(\"Wrapper: \" + letraAlfabetoWrapper);\n\t\t// Conversiones\n\t\tchar letraAlfabeto1 = 'F';\n\t\tCharacter charConvertido = letraAlfabeto1;\n\t\tSystem.out.println(\"Dato Convertido: \" + letraAlfabeto1);\n\t\t// Conversiones 2\n\t\tCharacter charConvertido1 = 'R';\n\t\tchar letraAlfabeto2 = charConvertido1.charValue();\n\t\tSystem.out.println(\"Int Convertido: \" + charConvertido1);\n\n\t}" ]
[ "0.6975011", "0.6815955", "0.66700584", "0.63773143", "0.6373265", "0.63350284", "0.63326395", "0.6210364", "0.61883676", "0.6146998", "0.61278147", "0.6111898", "0.6106834", "0.6097822", "0.6070073", "0.6069903", "0.6056452", "0.5998018", "0.5994188", "0.59776187", "0.59733194", "0.59731907", "0.5957719", "0.5956632", "0.5938607", "0.5937048", "0.59205353", "0.59193116", "0.5903928", "0.5903878", "0.58910197", "0.58643824", "0.58607465", "0.5859055", "0.5825843", "0.580843", "0.5805493", "0.5805205", "0.57658297", "0.5764118", "0.5764118", "0.57549924", "0.5750225", "0.5747405", "0.5745826", "0.57457775", "0.5744328", "0.57428", "0.5732247", "0.5725073", "0.5721354", "0.57211405", "0.571768", "0.57137424", "0.5710293", "0.5704398", "0.5699787", "0.56956416", "0.56920516", "0.5690973", "0.5690762", "0.5690092", "0.56778604", "0.5669232", "0.5668338", "0.5665451", "0.56590205", "0.5654717", "0.5651486", "0.5646454", "0.5644106", "0.563855", "0.5636167", "0.563379", "0.562252", "0.56198907", "0.5617599", "0.56131357", "0.55978286", "0.55958426", "0.5591375", "0.5586621", "0.55850786", "0.5577827", "0.557248", "0.5568429", "0.55629957", "0.5560992", "0.556068", "0.5554695", "0.5552661", "0.5546923", "0.55454797", "0.55448556", "0.55445814", "0.5543348", "0.55423063", "0.55400515", "0.55384666", "0.55339026", "0.5533248" ]
0.0
-1
prints the current high scores to the highscores menu
private void settings() { mainTitle = makeLabel("Settings", true); add(mainTitle); add(content); add(diffSlider); add(colourChooser); add(mainB);//button to main menu diffSlider.requestFocus(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showScores() {\n levelNumber.setText(String.format(\"%s%d\", getResources().getString(R.string.level), level));\n Level l = Level.getLevel(level);\n for (int i = 0; i < Level.MAX_SCORES; i++) {\n Level.Player p = l.getPlayer(i);\n if (p != null) new ScoreTextView(i + 1, p.toString());\n }\n }", "private void showHighscore(int keynumber) {\n int highscore = getHighscore(keynumber);\n if (highscore > 0) {\n if (keynumber == 1) {\n tVHighscore.setText(Integer.toString(highscore) + getString(R.string.HighscoreFrom) + getHighscoreName(keynumber) + \"\\n\");\n } else{\n tVHighscore.append(Integer.toString(highscore) + getString(R.string.HighscoreFrom) + getHighscoreName(keynumber) + \"\\n\");\n }\n } else {\n tVHighscore.append(\"-\\n\");\n }\n }", "public void displayhs()\n {\n FileReader filereader;\n //System.out.println(dateFormat.format(date));\n try{\n filereader = new FileReader(getLevel());\n BufferedReader bufferedreader = new BufferedReader(filereader);\n \n String str = \"High Scores\\n\";\n int hscount = 1;\n String line = bufferedreader.readLine();\n while(line!=null)\n {\n str += hscount +\". \" + line.split(\":\")[0] + \", \" + line.split(\":\")[1] + \", \" + line.split(\":\")[2] + \"\\n\";\n hscount++;\n line = bufferedreader.readLine();\n }\n //JOptionPane.showMessageDialog(null,str);\n String[] options = {\"OK\",\"Reset\"};\n \n int choice = JOptionPane.showOptionDialog(null,str,\"High Scores\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,null,options,options[0]);\n if(choice == 0)\n {\n //JOptionPane.showMessageDialog(null,\"Game will resume\");\n }\n else\n { //Reset was chosen\n int n = JOptionPane.showConfirmDialog(null,\"Are you sure you would like to reset all high scores?\",\"Are you sure?\",JOptionPane.YES_NO_OPTION);\n if(n == 0)\n {\n JOptionPane.showMessageDialog(null,\"Scores will reset\");\n PrintWriter writer;\n writer = new PrintWriter(new File(getLevel()));\n for(int i=0;i<5;i++)\n writer.println(\"null:0:n/a\");\n writer.close();\n }\n else\n JOptionPane.showMessageDialog(null,\"Scores will NOT reset\");\n }\n }\n catch(IOException e)\n {\n System.out.println(\"There is an error\");\n }\n }", "public void updateHighScoreText(int pacScore,int currentHighScore) {\n\t\tif(pacScore>currentHighScore)\n\t\t\thighScore.setText(\"\"+pacScore);\n\t}", "private void showGameScore() {\n System.out.println(messageProvider.provideMessage(\"score\"));\n System.out.println(settings.getPlayers().get(0).getScore()\n + \" vs \" + settings.getPlayers().get(1).getScore());\n }", "public void drawEndScreen() {\n\t\tint highScore = getHighScore();\n\t\tif (highScore <= score) {\n\t\t\thighScore = score;\n\t\t\tsetHighScore(highScore);\n\t\t}\n\t\tdisplayText(\"High Score \" + String.valueOf(highScore), 0, 0, false);\n\t\tdisplayText(\"Score\" + String.valueOf(score), 0, -100, false);\n\t}", "public void displayHighScoreInfo(String[][] highScoreList, String highScoreTitle) {\n System.out.println(highScoreTitle + \"\\n\");\n for (int i = 0; i < highScoreList.length; i++) {\n System.out.println((i + 1) + \". \" + highScoreList[i][0] + \" \" + highScoreList[i][1]);\n }\n }", "public void writeScores(){\r\n // TODO: Write the high scores data to the file name indicated\r\n // TODO: by Settings.highScoresFileName.\r\n \tFile outFile=new File(Settings.highScoresFileName);\r\n \tPrintWriter out=null;\r\n \ttry{\r\n \t\tout=new PrintWriter(outFile);\r\n \t\tfor(int i=0; i<Settings.numScores; i++){\r\n \t\t\tout.println(scores[i]+\" \"+names[i]);\r\n \t\t}\r\n \t}catch(Exception e){} \t\r\n \tfinally{\r\n \t\tif(out!=null) out.close();\r\n }\r\n }", "private void printScore() {\r\n View.print(score);\r\n }", "public void switchToHighScoresScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"highscores\");\n }", "public void helpMenu()\n {\n System.out.println(\"*********************************************Help Menue**************************************************************\");\n System.out.println(\"Each player starts the game with zero points.\");\n System.out.println(\"Each player is given the following set of five tiles. Each tile has a value and an associated score\");\n System.out.println(\"For each round, each player will play ONE tile, with the tile value adding to the game total for that round.\"); \n System.out.println(\"Provided the game total is less than or equal to 21, the player will get the score for using that tile.\");\n System.out.println(\"If the game total is greater than 21\");\n System.out.println(\"no score is allocated to the player who played the last tile causing the score to become greater than 21.\");\n System.out.println(\"Once the round ends, Each player will get their score based on the total of the tiles they have used during the round.\");\n System.out.println(\"Any player who has NOT used the tile with the value of 5, will get a penalty of -3 points.\");\n System.out.println(\"The player who, after all deductions, has the highest score, will be the winner of that round and will get 5 points.\"); \n System.out.println(\"At the end of all the rounds, the player who has won the most rounds is declared the winner of the game.\");\n System.out.println(\"**********************************************************************************************************************\");\n getUserStringInput(\"Please enter continue\");\n }", "public void drawHighscores(){\n JFrame highScoreFrame = new JFrame();\n highScoreFrame.setLayout(new BorderLayout());\n highScoreFrame.setSize(new Dimension(280,400));\n String top = \"<h1><u>Highscores</u></h1>\";\n String numbers = getNumbers();\n String scoreString = getTop();\n JLabel enumeration = new JLabel(\"<html>\" + numbers + \"<html>\");\n JLabel scores = new JLabel(\"<html>\" + scoreString + \"<html>\");\n JLabel title = new JLabel(\"<html>\" + top + \"<html>\");\n title.setHorizontalAlignment(SwingConstants.CENTER);\n enumeration.setBorder(BorderFactory.createEmptyBorder(0,85,0,30));\n highScoreFrame.add(title, BorderLayout.PAGE_START);\n highScoreFrame.add(enumeration, BorderLayout.LINE_START);\n highScoreFrame.add(scores, BorderLayout.CENTER);\n highScoreFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n highScoreFrame.setLocationRelativeTo(null);\n highScoreFrame.setVisible(true);\n\n for (int i = 1 ; i <= 10 ; i++){\n System.out.println(i);\n }\n }", "void win() {\n String name = score.getName();\n if (Time.getSecondsPassed() < 1) {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / 1);\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + 1 + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n } else {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / Time.getSecondsPassed());\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n }\n }", "public void showScore()\n {\n showText(\"Score:\" + score,550,50);\n }", "private void updateHighscore() {\n if(getScore() > highscore)\n highscore = getScore();\n }", "public void displayDBScores(){\n\t\tCursor c = db.getScores();\n\t\tif(c!=null) {\n\t\t\tc.moveToFirst();\n\t\t\twhile(!c.isAfterLast()){\n\t\t\t\tdisplayScore(c.getString(0),c.getInt(1));\n\t\t\t\tc.moveToNext();\n\t\t\t}\n\t\t\tc.close();\n\t\t}\n\t}", "public void toHighScore(View view)\n {\n scoreSettings = getSharedPreferences(scoreFile,PREFERENCE_MODE_PRIVATE);\n setContentView(R.layout.highscore_layout);\n TextView firstView = (TextView) findViewById(R.id.first);\n firstView.setText(\"1st: \"+scoreSettings.getString(\"goldName\",\"\")+\", \"+scoreSettings.getInt(\"goldScore\",0)+\" points\");\n TextView secondView = (TextView) findViewById(R.id.second);\n secondView.setText(\"2nd: \"+scoreSettings.getString(\"silverName\",\"\")+\", \"+scoreSettings.getInt(\"silverScore\",0)+\" points\");\n TextView thirdView = (TextView) findViewById(R.id.third);\n thirdView.setText(\"3rd: \"+scoreSettings.getString(\"bronzeName\",\"\")+\", \"+scoreSettings.getInt(\"bronzeScore\",0)+\" points\");\n }", "public void drawStartScreen() {\n\t\tint highScore = getHighScore();\n\t\tdisplayText(\"High Score \" + String.valueOf(highScore), 0, 0, false);\n\t\tdisplayText(\"Press to Start Game\", 0, -100, false);\n\t}", "@Override\n public void display() {\n Game game = PiggysRevenge.getCurrentGame();\n int bricks = 0;\n House house = game.getHouse();\n if (game.getHouse().isCompleted()) {\n try {\n bricks = GameControl.calcNumberOfBricks(house.getLength(), house.getWidth(), house.getHeight(), house.getStories());\n } catch (GameControlException ex) {\n this.console.println(ex.getMessage());\n }\n } else {\n bricks = 0;\n }\n int turns = game.getTurns();\n boolean hasEaten = game.getPlayer().isHasEaten();\n boolean wolfKilled = game.isWolfKilled();\n int result = 0;\n try {\n result = GameControl.calcScore(bricks, turns, hasEaten, wolfKilled);\n } catch (GameControlException ex) {\n this.console.println(ex.getMessage());\n }\n if (result>0) {\n this.console.println(\"+\" + (bricks*10) + \" Points for building the house.\");\n this.console.println(\"-\" + (turns*10) + \" Points for the number of turns taken (\" + turns + \" turns).\");\n } else {\n this.console.println(\"You get no points if you do not build a house,\"\n + \"\\neat the roast beef, or kill the wolf.\");\n }\n if (hasEaten) {\n this.console.println(\"+1000 Points for eating roast beef.\");\n }\n if (wolfKilled) {\n this.console.println(\"+2000 Points for killing the wolf.\");\n }\n this.console.println(\"\\nYOUR SCORE IS: \" + result);\n\n if (gameOver) {\n HighScore[] highScores;\n\n File varTmpDir = new File(\"highscores.txt\");\n\n if (varTmpDir.exists()) {\n try (FileInputStream fips = new FileInputStream(\"highscores.txt\");\n ObjectInputStream input = new ObjectInputStream(fips);) {\n \n\n highScores = (HighScore[]) input.readObject();\n highScores[10] = new HighScore(game.getPlayer().getName(), result, house);\n\n for (int n = 0; n < highScores.length; n++) {\n for (int m = 0; m < highScores.length - 1 - n; m++) {\n if (highScores[m].getScore() < highScores[m + 1].getScore()\n || \"---\".equals(highScores[m].getName())) {\n HighScore swapHighScore = highScores[m];\n highScores[m] = highScores[m + 1];\n highScores[m + 1] = swapHighScore;\n }\n }\n }\n\n try (FileOutputStream fops = new FileOutputStream(\"highscores.txt\");\n ObjectOutputStream output = new ObjectOutputStream(fops);) {\n \n output.writeObject(highScores);\n this.console.println(\"Score saved successfully\");\n \n } catch (Exception e) {\n ErrorView.display(\"ScoreView\", e.getMessage());\n }\n } catch (Exception e) {\n ErrorView.display(\"ScoreView\", e.getMessage());\n }\n\n } else {\n try (FileOutputStream fops = new FileOutputStream(\"highscores.txt\");\n ObjectOutputStream output = new ObjectOutputStream(fops);) {\n \n\n highScores = new HighScore[11];\n for (int i = 0; i < highScores.length; i++){\n highScores[i] = new HighScore(\"---\", 0, new House(5, 5, 6, 1));\n \n }\n\n highScores[0] = new HighScore(game.getPlayer().getName(), result, house);\n output.writeObject(highScores);\n this.console.println(\"New highscore file created. Score saved successfully\");\n } catch (Exception e) {\n ErrorView.display(\"ScoreView\", e.getMessage());\n }\n\n }\n }\n }", "public void updateHighestScoreDisplay(int score){\n this.score.setText(\"Highest Score: \"+score);\n }", "public String getHighscore() {\n String str = \"\";\n\t int max = 10;\n \n ArrayList<Score> scores;\n scores = getScores();\n \n int i = 0;\n int x = scores.size();\n if (x > max) {\n x = max;\n } \n while (i < x) {\n \t str += (i + 1) + \".\\t \" + scores.get(i).getNaam() + \"\\t\\t \" + scores.get(i).getScore() + \"\\n\";\n i++;\n }\n if(x == 0) str = \"No scores for \"+SlidePuzzleGUI.getRows()+\"x\"+SlidePuzzleGUI.getCols()+ \" puzzle!\";\n return str;\n }", "public void run(){\n ArrayList<String> menuItems = new ArrayList<>();\n menuItems.add(\"Play the Game\");\n menuItems.add(\"Close the Program\");\n menuItems.add(\"Show the highest score\");\n String menu = CollectionTools.collectionPrinter('S', menuItems);\n runMenu(menu);\n }", "static void showHighScoreWindow( Frame owner, HighScore [] scores )\n\t{\n\t\tString message;\n\n\t\t// Special message if there are no high scores set\n\t\tif( scores[0] == null )\n\t\t\tmessage = \"No high scores.\";\n\t\telse\n\t\t\tmessage = \"\";\n\n\t\t// Show all non-null high scores\n\t\tfor( int i = 0; i < scores.length && scores[i] != null; i++ )\n\t\t\tmessage += scores[i].getName() + \": \" + scores[i].getScore() + \"\\n\";\n\n\t\tJOptionPane.showMessageDialog( owner, message, \"High Scores\",\n\t\t\t\t JOptionPane.INFORMATION_MESSAGE );\n\t}", "private void setPreviousHighScores() {\n highScoreSharedPref = this.getSharedPreferences(\"MyPref\", Context.MODE_PRIVATE);\n highScore = highScoreSharedPref.getInt(\"Score\", 0);\n tvHighScore.setText(String.format(\"%d\", highScore));\n }", "public void topScore() {\n\t\tif (playern.getExp() >= 100) {\n\t\t\tSystem.out.println(\"You become a Warrior and win the game\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void printScores() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Players \\t\" + \"Score\");\n\t\tSystem.out.println(\"---------------------\");\n\t\tfor (Player p : players) {\n\t\t\tSystem.out.println(p.name + \" \\t\\t\" + p.updateScores());\n\t\t}\n\t}", "private void writeHighscore(int highscore) {\n EditText eTName = findViewById(R.id.eTName);\n String name = eTName.getText().toString().trim();\n String name1 = preferences.getString(KEY_NAME+\"1\",\"\");\n String name2 = preferences.getString(KEY_NAME+\"2\",\"\");\n String name3 = preferences.getString(KEY_NAME+\"3\",\"\");\n int topscore1 = preferences.getInt(KEY+\"1\",0);\n int topscore2 = preferences.getInt(KEY+\"2\",0);\n int topscore3 = preferences.getInt(KEY+\"3\",0);\n if (highscore >= topscore1) {\n preferencesEditor.putInt(KEY+\"1\",highscore);\n preferencesEditor.putString(KEY_NAME+\"1\", name);\n preferencesEditor.putInt(KEY+\"2\",topscore1);\n preferencesEditor.putString(KEY_NAME+\"2\", name1);\n preferencesEditor.putInt(KEY+\"3\",topscore2);\n preferencesEditor.putString(KEY_NAME+\"3\", name2);\n } else if (highscore >= topscore2) {\n preferencesEditor.putInt(KEY+\"1\", topscore1);\n preferencesEditor.putString(KEY_NAME+\"1\", name1);\n preferencesEditor.putInt(KEY+\"2\", highscore);\n preferencesEditor.putString(KEY_NAME+\"2\", name);\n preferencesEditor.putInt(KEY+\"3\", topscore2);\n preferencesEditor.putString(KEY_NAME+\"3\", name2);\n } else {\n preferencesEditor.putInt(KEY+\"1\", topscore1);\n preferencesEditor.putString(KEY_NAME+\"1\", name1);\n preferencesEditor.putInt(KEY+\"2\", topscore2);\n preferencesEditor.putString(KEY_NAME+\"2\", name2);\n preferencesEditor.putInt(KEY+\"3\", highscore);\n preferencesEditor.putString(KEY_NAME+\"3\", name);\n }\n preferencesEditor.commit();\n }", "@Override\n\tpublic void printScore() {\n\n\t}", "public void checkHighScore() {\n\t\t//start only if inserting highscore is needed\n\t\tlevel.animal.gamePaused = true;\n\t\tlevel.createTimer();\n\t\tlevel.timer.start();\n\t\t\t\t\n\t\tlevel.setWord(\"hiscores\", 7, 175, 130);\n\t\t\n\t\treadFile();\n\t}", "public StateHighScores(GLCanvas canvass, StateMainMenu mainmenu) {\n\t\tStateHighScores.canvas = canvass;\n\t\tthis.mainmenu = mainmenu;\n\t\tcanvas.setCursor(null);\n\t\tscreenHeight = canvas.getHeight();\n\t\tscreenWidth = canvas.getWidth();\n\t\tcanvas.addKeyListener(this);\n\t\tcanvas.addGLEventListener(this);\n\t\tcanvas.addMouseListener(this);\n\n\t\tstartup = true;\n\n\t\tfor (HighScore score : highScoreList) {\n\t\t\tplayerNameString += \" \" + score.getPlayerName() + \"\\n\";\n\t\t\tscoreString += \" \" + score.getScore() + \"\\n\";\n\t\t\tlevelNameString += \" \" + score.getLevelName() + \"\\n\";\n\t\t}\n\t}", "public void printScore(PrintWriter out) {\n out.format(\"SCORE OF %d PLAYERS%n\", players.size());\n out.println(\"ID\\tCASH\\tTYPE\");\n \t\n // Cria uma lista com os jogadores\n \tList<Competitor> score = new ArrayList<Competitor>(players.keySet());\n\n \t// Ordena os jogadores com base no total de cash\n \tCollections.sort(score, new PlayerComparator());\n\n \t// Imprime os resultados\n \tfor(Competitor c : score) {\n \t\tout.format(\"%d.%d\\t%.2f\\t(%s)%n\", players.get(c).Type,\n players.get(c).Id, c.getTotalCash(),\n c.getClass().getSimpleName());\n \t}\n out.flush();\n }", "private static void displayMenu() {\n System.out.println(\"Menu : \");\n System.out.println(\"Type any number for selection\");\n for (int i = 1; i <= totalPlayers; i++) {\n System.out.println(i + \")View \" + playerList.get(i - 1) + \" cards\");\n }\n System.out.println(\"8)Display Each Player's Hand Strength\");\n System.out.println(\"9)Declare Winner\");\n System.out.println(\"10)Exit\");\n }", "public void updateScores() {\n\t\tscoreText.setText(\"Score: \" + ultraland.getScore());\n\t}", "void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }", "@Override\r\n\tpublic String toString(){\r\n\t\tString str = \"\";\r\n\t\t\r\n\t\tfor (int i = 0; i < scoreNumber; i++)\r\n\t\t\tstr += highScores[i].toString() + \"\\n\";\r\n\t\t\r\n\t\treturn str;\r\n\t}", "public void printScores(String currentPlayerName) {\n System.out.println(\"SCORE BOARD:\");\n System.out.print(\"--------------------\");\n\n System.out.println(\"\\nTOP 5 SCORES OF CURRENT QUIZ TAKER\");\n\n // prints out the current quiz taker's name and top 5 highest scores in\n // descending order\n for (int i = 0; i < allQuizTakers.size() && allQuizTakers.size() > 0; i++) {\n if (allQuizTakers.get(i).getName().equals(currentPlayerName)) {\n System.out.println(allQuizTakers.get(i).toString());\n break;\n }\n }\n\n System.out.println(\"\\nHIGHEST SCORE EVER (\" + findHighestScore() + \") WAS ACHIEVED BY\");\n System.out.println(findHighestScorers());\n\n }", "public void printScore()\n {\n if (score.isEmpty())\n System.out.println(\"\\nThe score is currently empty\");\n else\n {\n for (int i = 0; i < score.size(); i++)\n {\n System.out.format(\"%n%s%d%s %c %d\", \"Note \", i + 1, \":\", score.get(i).getNote(), score.get(i).getBeat());\n }\n System.out.println();\n }\n removeNote();\n }", "public String getHighscores(){\r\n\t\tString returnString = \"\";\r\n\t\tList<Score> allScores = database.getAllScores(\"hard\");\r\n\t\t\r\n\t\t//loop through top 4 entries of table as obtained in the allScores list\r\n\t\tfor(int i = allScores.size()-1, j = 3; i>=0 && j>=0; j--, i--){\r\n\t\t\treturnString += String.valueOf(allScores.get(i).score + \" | \" + allScores.get(i).time + \"\\n\");\r\n\t\t}\r\n\t\treturn returnString;\r\n\t}", "void displayScores(int pts)\n\t{\n\t\tString[][] scs = new String[10][2];\n\t\ttry\n\t\t{\n\t\t\tScanner str = new Scanner(new File(\"./scores.log\"));\n\t\t\tfor (int i = 0; i < 10; i++)\n\t\t\t{\n\t\t\t\tscs[i] = str.nextLine().split(\"\\t\");\n\t\t\t}\n\t\t\tstr.close();\n\t\t}\n\t\tcatch (FileNotFoundException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tString scores = \"\";\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tscores += scs[i][0] + \"\\t\" + scs[i][1] + \"\\n\";\n\t\t\n\t\tint place = 10; // > 9; remains if the new score below the scoreboard\n\t\t\n\t\t// if new highscore\n\t\tif (pts > Integer.parseInt(scs[9][1]))\n\t\t{\n\t\t\t// determine the place\n\t\t\tplace = 9;\n\t\t\twhile (pts > Integer.parseInt(scs[place-1][1])) // place is too low\n\t\t\t{\n\t\t\t\tplace--; // move the \"pointer\" to higher place\n\t\t\t\tif (place == 0) break; // 1st place!\n\t\t\t}\n\t\t\t\n\t\t\t// insert where it should be\n\t\t\tfor (int i = 8; i >= place; i--)\n\t\t\t{\n\t\t\t\tscs[i+1][0] = new String(scs[i][0]); // drop place to lower\n\t\t\t\tscs[i+1][1] = new String(scs[i][1]);\n\t\t\t}\n\t\t\tscs[place][0] = parent.getUsername();\n\t\t\tscs[place][1] = \"\" + pts;\n\t\t}\n\t\t\n\t\t// prepare text for writing to file\n\t\tString textToWrite = \"\";\n\t\tfor (int i = 0; i < 10; i++) // for every place\n\t\t\ttextToWrite += scs[i][0] + \"\\t\" + scs[i][1] + \"\\n\";\n\t\t\n\t\t// write to scores.log\n\t\ttry\n\t\t{\n\t\t\tFileWriter str = new FileWriter(new File(\"./scores.log\"), false);\n\t\t\tstr.write(textToWrite);\n\t\t\tstr.close();\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// prepare text for displaying in the scoreboard\n\t\tString textDisplayed = \"<html><style>p{font-size:40px; font-family:\\\"Lucida Console\\\"}</style>\";\n\t\tfor (int i = 0; i < 10; i++) // for every place\n\t\t{\n\t\t\tif (i == place) textDisplayed += \"<font color=\\\"red\\\">\";\n\t\t\ttextDisplayed += \"<p>\" + scs[i][0] + \" \";\n\t\t\t// add dots to fill places up to 30\n\t\t\tfor (int j = 30; j > scs[i][0].length(); j--)\n\t\t\t\ttextDisplayed += \".\";\n\t\t\ttextDisplayed += \" \" + scs[i][1] + \"</p>\";\n\t\t\tif (i == place) textDisplayed += \"</font>\";\n\t\t}\n\t\t\n\t\tscoreboard.setText(textDisplayed);\n\t}", "public void displayHomeScore(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.home_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "private void newHighScoreAlert() {\n\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\t\n\t\talert.setTitle(\"New High Score!\");\n \talert.setHeaderText(\"You Got A New High Score!\\nYour High Score: \" + level.animal.getPoints());\n \talert.setContentText(\"Enter Your Name With Alphabet Or Digit Keys.\\nPress 'Enter' To Confirm Your Name Afterwards.\");\n \talert.show();\n\t}", "public void display(){\n\t\tSystem.out.print(programGrade + \" \" + examGrade );\n\t\t\n\t\t\n\t}", "public static void displayHighScorePosition(String playersName, int position){\n System.out.println(playersName + \" managed to get into position \" + position + \" on the high score table\");\n }", "public void statistics(){\n System.out.println(this.scoreboard.toString());\n }", "public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}", "private void displayPlayerMenu () {\n System.out.println();\n System.out.println(\"Player Selection Menu:\");\n System.out.println(\n \"Timid player...........\" + TIMID);\n System.out.println(\n \"Greedy player..........\" + GREEDY);\n System.out.println(\n \"Clever player..........\" + CLEVER);\n System.out.println(\n \"Interactive player.....\" + INTERACTIVE);\n }", "public void setHighscore(int score)\n {\n this.highscore = score;\n }", "private void display(){\n out.println(\"\\n-STOCK EXCHANGE-\");\n out.println(\"Apple - Share Price: \" + game.apple.getSharePrice() + \" [\" + game.apple.top() + \"]\");\n out.println(\"BP - Share Price: \" + game.bp.getSharePrice() + \" [\" + game.bp.top() + \"]\");\n out.println(\"Cisco - Share Price: \" + game.cisco.getSharePrice() + \" [\" + game.cisco.top() + \"]\");\n out.println(\"Dell - Share Price: \" + game.dell.getSharePrice() + \" [\" + game.dell.top() + \"]\");\n out.println(\"Ericsson - Share Price: \" + game.ericsson.getSharePrice() + \" [\" + game.ericsson.top() + \"]\");\n\n out.println(\"\\n-PLAYERS-\");\n// System.out.println(playerList.toString());\n for (Player e : playerList) {\n if (e.equals(player)) {\n out.println(e.toString() + \" (you)\");\n } else {\n out.println(e.toString());\n }\n }\n }", "public void outputStats (){\n System.out.println(\"Your sorcerer's stats:\");\n System.out.println(\"HP = \" + hp);\n System.out.println(\"Mana = \" + mana);\n System.out.println(\"Strength = \" + strength);\n System.out.println(\"Vitality = \" + vitality);\n System.out.println(\"Energy = \" + energy);\n }", "private void displayMainMenu () {\n System.out.println();\n System.out.println(\n \"Enter the number of the action to perform: \");\n System.out.println(\n \"Run game...............\" + PLAY_GAME);\n System.out.println(\n \"Exit...................\" + EXIT);\n }", "public static void displayHighScorePosition(String name, int position){\n System.out.println(name + \" managed to get into position \" + position + \" on the high score table\");\n }", "public String getTop(){\n StringBuilder htmlTop = new StringBuilder(\"<h2>\");\n for (int i = 0; i<10; i++){\n if (i >= this.highscores.size()){\n htmlTop.append(\" ----<br>\");\n } else {\n htmlTop.append(String.valueOf(this.highscores.get(i))).append(\"<br>\");\n }\n }\n htmlTop.append(\"</h2>\");\n return htmlTop.toString();\n }", "public void saveScores(){\n try {\n File f = new File(filePath, highScores);\n FileWriter output = new FileWriter(f);\n BufferedWriter writer = new BufferedWriter(output);\n\n writer.write(topScores.get(0) + \"-\" + topScores.get(1) + \"-\" + topScores.get(2) + \"-\" + topScores.get(3) + \"-\" + topScores.get(4));\n writer.newLine();\n writer.write(topName.get(0) + \"-\" + topName.get(1) + \"-\" + topName.get(2) + \"-\" + topName.get(3) + \"-\" + topName.get(4));\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Text displayBar(int score, int lives, int level, int highScore){\n if (highScore<score){\n statusBar.setText(\"Score: \"+ (score)+ \" Lives: \"+ (lives)+ \" Level: \"+ level + \" High Score: \"+ score);\n }\n else{\n statusBar.setText(\"Score: \"+ (score)+ \" Lives: \"+ (lives)+ \" Level: \"+ level+ \" High Score: \"+ highScore);}\n statusBar.setX(550);\n statusBar.setY(50);\n\n return statusBar;\n }", "public void addHighScoreText(Pane root,int currentHighScore) throws FileNotFoundException{\n\t\thighScore=new Text(level.columnX(12),level.rowX(-1)+10,\"\"+currentHighScore);\n\t\thighScore.setFill(Color.WHITE);\n\t\thighScore.setFont(Font.loadFont(\"file:recources\\\\Font\\\\PressStart2P-Regular.ttf\", 20));\n\t\tif(Level.getHieght()==720)\n\t\t\thighScore.setFont(Font.loadFont(\"file:recources\\\\Font\\\\PressStart2P-Regular.ttf\", 10));\n\t\tif(GameLoop.getLevelSelector()==1)\n\t\t\thighScore.setTranslateX(40);\n\t\tif(GameLoop.getLevelSelector()==1&&Level.getHieght()==1080)\n\t\t\thighScore.setTranslateX(80);\n\t\troot.getChildren().add(highScore);\n\t}", "void displayScore(){\n\t\tTextView yourScore = (TextView) findViewById (R.id.yourscore); \n String currentScoreText;\n currentScoreText = Integer.toString(currentScore);\n\t\tyourScore.setText(currentScoreText);\n\t\t\n\t}", "public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }", "private void persistHighScore() {\n final String userHomeFolder = System.getProperty(USER_HOME); \n final Path higheScoreFilePath = Paths.get(userHomeFolder, HIGH_SCORE_FILE);\n \n final File f = new File(higheScoreFilePath.toString());\n if (f.exists() && !f.isDirectory()) {\n PrintWriter writer = null;\n try {\n writer = new PrintWriter(higheScoreFilePath.toString());\n writer.print(\"\");\n writer.close();\n \n } catch (final IOException e) {\n emptyFunc();\n } \n \n try {\n writer = new PrintWriter(higheScoreFilePath.toString());\n writer.print(Integer.toString(this.myHighScoreInt));\n writer.close();\n \n } catch (final IOException e) {\n emptyFunc();\n } \n \n if (writer != null) {\n writer.close();\n } \n }\n }", "public void menu(){\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"<=======|\" + name + \"|=======>\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tSystem.out.println(\"1 -> Jouer\");\n\t\tSystem.out.println(\"2 -> Creer votre personnage\");\n\t\tSystem.out.println(\"3 -> Charger\");\n\t\tSystem.out.println(\"4 -> Best Score\");\n\t\tSystem.out.println(\"5 -> Instruction\");\n\t\tSystem.out.println(\"6 -> Quitter\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tint choice = in.nextInt();\n\n\t\t\tswitch (choice){\n\t\t\t\tcase 1:\n\t\t\t\t\tstartPlay();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreateChar();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tchargeGame();\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.print(\" NOM -\");\n\t\t\t\t\tSystem.out.print(\" GENRE -\");\n\t\t\t\t\tSystem.out.print(\" SANTEE -\");\n\t\t\t\t\tSystem.out.print(\" FORCE -\");\n\t\t\t\t\tSystem.out.print(\" ARMES -\");\n\t\t\t\t\tSystem.out.println(\" ARGENT -\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tbdd.dbQuery(\"SELECT * FROM score ORDER BY health DESC\");\n\t\t\t\t\tmenu();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\trules();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\texit();\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Choix non valide\");\n\t\t\t\t\tmenu();\n\t\t\t}\n\t}", "private void displayGameHeader()\n {\n System.out.println(\"########Welcome to Formula 9131 Championship########\");\n }", "@SuppressLint(\"SetTextI18n\")\r\n private void displayScore() {\r\n\r\n\r\n mFinalScore.setText(\"Final score: \" + mScore);\r\n mQuestionView.setVisibility(View.GONE);\r\n mOption1.setVisibility(View.GONE);\r\n mOption2.setVisibility(View.GONE);\r\n mOption3.setVisibility(View.GONE);\r\n mNext.setVisibility(View.GONE);\r\n mTimer.setVisibility(View.GONE);\r\n mScoreView.setVisibility(View.GONE);\r\n mTimerLabel.setVisibility(View.GONE);\r\n mBackToStart.setVisibility(View.VISIBLE);\r\n\r\n }", "public static void f_menu(){\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"-------------Soft_AVERAGE_HEIGHT-----------------\");\n System.out.println(\"-------------version 1.0 23-oct-2020------------\");\n System.out.println(\"-------------make by Esteban Gaona--------------\");\n System.out.println(\"-------------------------------------------------\");\n System.out.println(\"-------------------------------------------------\");\n}", "public void displayMenu()\n {\n System.out.println(\"-----------------Welcome to 256 Game------------------\");\n System.out.println(\"press 1 to register a player\");\n System.out.println(\"press 2 to start a new game\");\n System.out.println(\"press 3 to view a help menu\");\n System.out.println(\"press 4 to exist\");\n System.out.println(\"------------------------------------------------------\");\n }", "public static void showResualt() throws InterruptedException\n {\n for (int i = 0; i < allScores.length; i++) {\n System.out.println(allScores[i]);\n }\n JOptionPane.showMessageDialog(new JFrame(), allScores, \"Champions league Finished : \" , JOptionPane.INFORMATION_MESSAGE);\n }", "public static void main(String[] args) {\n HighScoresTable highScoresTable = null;\n // trying to read the high score file\n try {\n highScoresTable = HighScoresTable.loadFromFile((new File(\"highScores.txt\")));\n } catch (IOException e) {\n e.printStackTrace();\n } // if the table is empty\n if (highScoresTable.getHighScores().isEmpty()) {\n highScoresTable = new HighScoresTable(5);\n }\n final HighScoresTable scoresTable = highScoresTable;\n GUI gui = new GUI(\"arknoid\", 800, 600);\n // creating a runner\n final AnimationRunner runner = new AnimationRunner(gui);\n final KeyboardSensor keyborad = runner.getGui().getKeyboardSensor();\n // creating a menu\n Menu<Task<Void>> mainMenu = new MenuAnimation<Task<Void>>(\"chicken invaders\", keyborad);\n mainMenu.addSelection(\"s\", \"Start game\", new Task<Void>() {\n // run the levels\n public Void run() {\n // creating a level information object to run over finally\n LevelInformation spaceInvader = new SpaceInvadersLevel();\n GameFlow flow = new GameFlow(800, 600, scoresTable, gui, keyborad);\n flow.runLevels(spaceInvader);\n return null;\n }\n }); // the option for watching the high score table\n mainMenu.addSelection(\"h\", \"High Scores\", new Task<Void>() {\n // show the highScoreAnimation with the scores table\n public Void run() {\n runner.run(new KeyPressStoppableAnimation(keyborad, KeyboardSensor.SPACE_KEY,\n new HighScoresAnimation(scoresTable)));\n return null;\n }\n }); // the option of quiting\n mainMenu.addSelection(\"q\", \"Exit\", new Task<Void>() {\n // q to quit game\n public Void run() {\n System.exit(0);\n return null;\n }\n });\n while (true) {\n // run the main menu\n runner.run(mainMenu);\n Task<Void> task = mainMenu.getStatus();\n // as long the task is not null - run it.\n if (task != null) {\n task.run();\n mainMenu.setStop(false);\n }\n }\n\n }", "public void updateScoreUI() {\n\t\tMap<Integer, Integer> scoreMap = gameLogic.getScoreboard().getTotalScore();\n\n\t\tlblScoreA.setText(String.valueOf(scoreMap.get(0)));\n lblScoreB.setText(String.valueOf(scoreMap.get(1)));\n lblScoreC.setText(String.valueOf(scoreMap.get(2)));\n lblScoreD.setText(String.valueOf(scoreMap.get(3)));\n\t}", "private String formatHighScore(HighScore highScore){\n return formatTime(highScore.getSeconds()) + \" \" + highScore.getName();\n }", "private void refreshScore(){\n String info = players[0] + \" \"+playerScores[0]+\":\" +playerScores[1]+ \" \"+players[1];\n scoreInfo.setText(info);\n }", "public void displayRoundScore() {\n\n System.out.println(\"Round stats: \");\n System.out.println(\"Par: \" + parTotal);\n System.out.println(\"Strokes: \" + strokesTotal);\n\n if(strokesTotal > parTotal) {\n System.out.println(strokesTotal-parTotal + \" over par\\n\");\n } \n else if (strokesTotal < parTotal) {\n System.out.println(parTotal-strokesTotal + \" under par\\n\");\n }\n else {\n System.out.println(\"Making par\\n\");\n }\n }", "public static void gameOver() {\n ScoreBoard.write(ScoreController.getScoresPath());\n populate();\n }", "public static void newHighscore(int h){\n highscore = h;\n SharedPreferences prefs = cont.getSharedPreferences(\"PAFF_SETTINGS\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putInt(\"highscore\",highscore);\n editor.commit();\n }", "public void CheckScore(){\n \tif(killed > highScore) {\n \t\tname = JOptionPane.showInputDialog(\"You set a HighScore!\\n What is your Name?\");\n \t\thighScore = killed;\n \t}\n }", "@Override\n public void showScoreBoard() {\n calledMethods.add(\"showScoreBoard\");\n }", "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 }", "@Override\n\tpublic String printToScreen(){\n\t\n\t\tif(this.getyMaxLines() == 0){return \"\";}\n\t\tTextProfile textProfile= new TextProfile(this.getScreenScores(), this.getyMaxLines(), this.getYLimitMin(), this.getYLimitMax());\n\t\t\n\t\tArrayList<String> lineStrings= new ArrayList<String>();\n\t\tfor(int i= (textProfile.getProfile().size() - 1); i >= 0; i--){\n\t\t\tList<String> xl= textProfile.getProfile().get(i);\n\t\t\tlineStrings.add(StringUtils.join(xl, \"\"));\n\t\t}\t\t\n\t\treturn Joiner.on(\"\\n\").join(lineStrings);\n\t}", "public void endGame(){\t\t\r\n\t\tString inits = \r\n\t\t\t\tJOptionPane.showInputDialog(\r\n\t\t\t\t\t\t\"High Scores:\\n\"\r\n\t\t\t\t\t\t+scores[9].toString()\r\n\t\t\t\t\t\t+scores[8].toString()\r\n\t\t\t\t\t\t+scores[7].toString()\r\n\t\t\t\t\t\t+scores[6].toString()\r\n\t\t\t\t\t\t+scores[5].toString()\r\n\t\t\t\t\t\t+scores[4].toString()\r\n\t\t\t\t\t\t+scores[3].toString()\r\n\t\t\t\t\t\t+scores[2].toString()\r\n\t\t\t\t\t\t+scores[1].toString()\r\n\t\t\t\t\t\t+scores[0].toString()\r\n\t\t\t\t\t\t, \"\");\r\n\t\t\r\n\t\tcheckIfHighScore(inits);\r\n\t\t\r\n\t\ttry{\r\n\t\t\tthis.writeScoresToFile(file);\r\n\t\t} catch (Exception e){\r\n\t\t\t\r\n\t\t}\r\n\t}", "public static void main(String[] args)\n\t{\n\t// ***\n\t// *** Complete this\n\t// *** \n\t\tHighScoresImpl highScore = new HighScoresImpl(); //init highScore\n\t\tdo {\n\t\t\tTextIO.putln(\"1: Print Scores\");\n\t\t\tTextIO.putln(\"2: Add Score\");\n\t\t\tTextIO.putln(\"3: Print nth Score\");\n\t\t\tTextIO.putln(\"-1: EXIT\");\n\t\t\tint choice = TextIO.getlnInt();\n\t\t\tswitch (choice) {\n\t\t\tcase 1:highScore.print();break;\n\t\t\tcase 2:TextIO.putln(\"Enter score to add: \");\n\t\t\t\tint score = TextIO.getInt();\n\t\t\t\thighScore.addScore(score);\n\t\t\t\tbreak;\n\t\t\tcase 3:TextIO.putln(\"Which place to view: \");\n\t\t\t\tint n = TextIO.getInt();\n\t\t\t\tif (n < 1 || n > 10){\n\t\t\t\t\tTextIO.putln(\"That choice is invalid\");\n\t\t\t\t\tbreak;\n\t\t\t\t}//end if\n\t\t\t\tTextIO.putln(place(n)+\"place score is: \"+highScore.nthHighest(n));\n\t\t\t\tbreak;\t\t\t\t\t\n\t\t\tcase -1:System.exit(0);\n\t\t\tdefault:break;\n\t\t\t}//end switch\n\t\t}while(true);\n\t}", "public void setHomeScore(int h);", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "public void saveScore() {\n if (this.currentScore > this.highScore) {\n this.highScore = this.currentScore;\n SharedPreferences sharedPref = this.getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putInt(\"High Score\", this.highScore);\n editor.commit();\n }\n }", "public void scores(HashMap<String, Integer> scoreboard) {\r\n\t\tclear_screen();\r\n\t\t// Le tableau de scores arrive déjà trié.\r\n\t\tJLabel sc = new JLabel(\"Partie Terminé. Tableau des scores : \");\r\n\t\tsc.setBounds(0, 0, 1280, 40);\r\n\t\tsc.setFont(new Font(sc.getFont().getName(), Font.BOLD, 30));\r\n\t\tthis.add(sc);\r\n\r\n\t\tint begin = 60;\r\n\r\n\t\tfor (Map.Entry<String, Integer> elt : scoreboard.entrySet()) {\r\n\t\t\tJLabel u_score = new JLabel(elt.getKey()+\" : \"+elt.getValue()+\" points\", SwingConstants.CENTER);\r\n\t\t\tu_score.setFont(new Font(sc.getFont().getName(), Font.PLAIN, 20));\r\n\t\t\tu_score.setBounds(0, begin, 1280, 30);\r\n\t\t\tthis.add(u_score);\r\n\t\t\tbegin+=40;\r\n\t\t}\r\n\r\n\t\tclose = new JButton(\"Fermer\");\r\n\t\tclose.setBounds(5, 640,150,40);\r\n\t\tthis.add(close);\r\n\t\tclose.addActionListener(this);\r\n\t}", "public void updatePlayerHealthUI() {\n CharSequence text = String.format(\"Score: %d\", getscore());\n scoreLabel.setText(text);\n }", "private void setHighScore(int hs) {\n setStat(hs, highScore);\n }", "private void showScore(Skin skin) {\r\n \tif(PlayerProfileManager.getInstance().getCurrentPlayerProfile().getCurrentLevelProfile().isTutorial()) {\r\n \t\treturn;\r\n \t}\r\n \r\n newScore = gameController.getScoreController().generateEndScore(gameController);\r\n \r\n // define some space between the labels and the values\r\n messageTable.columnDefaults(1).width(50f);\r\n \r\n int gainMoney = 0;\r\n \r\n Score recentBestScore = ScoreManager.getInstance().getCurrentLevelBestScore();\r\n if ((recentBestScore == null && newScore.getTotalScore() > 0) || newScore.getTotalScore() > recentBestScore.getTotalScore()) {\r\n \r\n \tgainMoney = (int)(newScore.getTotalScore() * PlayerProfileManager.getInstance().getCurrentPlayerProfile().getCurrentLevelGroup().getMoneyFactor());\r\n \r\n newScore.setServerScoreId(recentBestScore == null ? -1 : recentBestScore.getServerScoreId());\r\n ScoreManager.getInstance().saveBestScore(newScore);\r\n \r\n messageTable.row();\r\n messageTable.add(new Label(I18n.t(\"newRecord\") + \":\", skin)).right();\r\n messageTable.add();\r\n messageTable.add(new Label(String.valueOf(newScore.getTotalScore()), skin)).left();\r\n }\r\n else {\r\n \tgainMoney = (int)(newScore.getTotalScore() * PlayerProfileManager.getInstance().getCurrentPlayerProfile().getCurrentLevelGroup().getMoneyFactor()*0.25);\r\n \r\n \r\n Label scoreName = new Label(I18n.t(\"newScore\"), skin);\r\n \r\n messageTable.add(scoreName).right();\r\n messageTable.add();\r\n StringBuilder builder = new StringBuilder();\r\n builder.append(newScore.getTotalScore());\r\n builder.append(\", \");\r\n builder.append(I18n.t(\"record\"));\r\n builder.append(\": \");\r\n builder.append(recentBestScore.getTotalScore());\r\n messageTable.add(new Label(builder.toString(), skin)).left();\r\n }\r\n messageTable.row().expand();\r\n \r\n // adds an amount of money to the players profile that equals the score\r\n // he got in this level\r\n PlayerProfileManager.getInstance().getCurrentPlayerProfile().addMoney(gainMoney);\r\n \r\n // gates\r\n ScoreDetail detail = newScore.getScoreDetails().get(0);\r\n messageTable.add(new Label(I18n.t(detail.getDetailName()), skin, \"medium-font\")).right();\r\n messageTable.add();\r\n StringBuilder gatesBuilder = new StringBuilder();\r\n gatesBuilder.append(GameController.getInstance().getScoreController().getGatesPassed());\r\n gatesBuilder.append(\" (\");\r\n gatesBuilder.append(detail.getValue());\r\n gatesBuilder.append(\")\");\r\n \r\n messageTable.add(new Label(gatesBuilder, skin, \"medium-font\")).left();\r\n \r\n // time\r\n messageTable.row().expand();\r\n detail = newScore.getScoreDetails().get(1);\r\n messageTable.add(new Label(I18n.t(detail.getDetailName()), skin, \"medium-font\")).right();\r\n messageTable.add();\r\n StringBuilder timeBuilder = new StringBuilder();\r\n timeBuilder.append(gameController.getTimeController().getIntegerTime());\r\n timeBuilder.append(\" s (\");\r\n timeBuilder.append(detail.getValue());\r\n timeBuilder.append(\")\");\r\n messageTable.add(new Label(timeBuilder, skin, \"medium-font\")).left();\r\n \r\n // bonus points\r\n messageTable.row().expand();\r\n detail = newScore.getScoreDetails().get(2);\r\n messageTable.add(new Label(I18n.t(detail.getDetailName()), skin, \"medium-font\")).right();\r\n messageTable.add();\r\n messageTable.add(new Label(detail.getValue(), skin, \"medium-font\")).left();\r\n messageTable.row();\r\n \r\n //gain money\r\n messageTable.row().expand(); \r\n messageTable.add(new Label(I18n.t(\"gainMoney\") + \":\", skin)).right();\r\n messageTable.add();\r\n messageTable.add(new Label(gainMoney+\"\", skin)).left();\r\n messageTable.row();\r\n \r\n }", "private void printMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opret\");\n System.out.println(\"(2) Find\");\n System.out.println(\"(3) Slet\");\n System.out.print(\"Valg: \");\n }", "public String toString() {\n String table = \"\";\n if (this.highScores.isEmpty()) {\n return \"[]\";\n }\n for (ScoreInfo s: this.highScores) {\n table = table.concat(s.getName()).concat(\" : \").concat(Integer.toString(s.getScore())).concat(\"\\n\");\n }\n return table;\n }", "public void print()\n {\n if (totalCredits >= 60)\n {\n // Print out the course number and title\n System.out.println(\"Course \" + codeNo + \" - \" + title);\n \n // Print out the four individual module details along with their marks awarded\n System.out.println(\n \"Module: \" + moduleProgramming.moduleTitle +\n \"\\t\\tCode: \" + moduleProgramming.moduleCode + \n \"\\tMark: \" + moduleProgramming.moduleMark);\n \n System.out.println(\n \"Module: \" + moduleWeb.moduleTitle +\n \"\\t\\tCode: \"+ moduleWeb.moduleCode + \n \"\\t\\tMark: \"+ moduleWeb.moduleMark);\n \n System.out.println(\n \"Module: \" + moduleDigitalTech.moduleTitle + \n \"\\t\\tCode: \" + moduleDigitalTech.moduleCode + \n \"\\t\\tMark: \" + moduleDigitalTech.moduleMark);\n \n System.out.println(\n \"Module: \" + moduleCompArchitecture.moduleTitle + \n \"\\t\\tCode: \" + moduleCompArchitecture.moduleCode + \n \"\\t\\tMark: \" + moduleCompArchitecture.moduleMark);\n \n // Print the total marks for all four modules\n System.out.println(\"Total Mark: \" + sumOfMarks());\n \n // Print the mean marks\n System.out.println(\"Total mean marks: \" + getMeanMarks());\n \n // Convert the total marks into a grade character\n System.out.println(\"Final Grade:\" + convertToGradeChar(meanMark));\n } else\n System.out.println(\"You haven't completed all the modules yet\");\n }", "private void showScore() {\r\n View.show(score, this.getSize().width + 15, 0);\r\n }", "private void drawScore() {\n\t\tString score = myWorld.getScore() + \"\";\n\n\t\t// Draw shadow first\n\t\tAssetLoader.shadow.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length()), 12);\n\t\t// Draw text\n\t\tAssetLoader.font.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length() - 1), 11);\n\n\t}", "private void updateHighScore(int newHighScore) {\n highScore = newHighScore;\n SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(HIGHSCORE_KEY, highScore);\n editor.commit();\n\n }", "public MenuButton getHighscoreButton() {\n return highscoreButton;\n }", "public void outputGrades() {\n System.out.printf(\"The grades are:%n%n\");\n\n // generates output grades each student\n for (int student =0; student < grades.length; student++)\n System.out.printf(\"Student %2d: %3d%n\", student + 1, grades[student]);\n }", "@Override\r\n public final void display() {\r\n System.out.println(\"\\n\\t===============================================================\");\r\n System.out.println(\"\\tEnter the letter associated with one of the following commands:\");\r\n \r\n for (String[] menuItem : HelpMenuView.menuItems) {\r\n System.out.println(\"\\t \" + menuItem[0] + \"\\t\" + menuItem[1]);\r\n }\r\n System.out.println(\"\\t===============================================================\\n\");\r\n }", "private void fillLeaderboard() {\n highscore_flwPane.getChildren().clear();\n List<HighScore> hList = mainController.getJSONHighScores();\n\n for(int i = 0; i < hList.size(); i++){\n HighscoreController hc = new HighscoreController(this, String.valueOf(i+1), hList.get(i).getName(),hList.get(i).getMode(),hList.get(i).getScore());\n highscore_flwPane.getChildren().add(hc);\n }\n\n }", "protected List<Score> getScoresToDisplay(){\n boolean allUsers = btnUser.getText() == btnUser.getTextOff();\n Integer selectedOption = gameOptions.get(spinGameOptions.getSelectedItem().toString());\n String fileName = Board.getHighScoreFile(Game.SLIDING_TILES, selectedOption);\n return allUsers?\n GameScoreboard.getScores(this, fileName, Board.getComparator()) :\n GameScoreboard.getScoresByUser(this, fileName, user, Board.getComparator());\n }", "private void gameOverAlert() {\n \tAlert alert = new Alert(AlertType.INFORMATION);\n \t\n \talert.setTitle(\"Game Over!\");\n \talert.setHeaderText(\"You Did Not Get A New High Score!\\nYour High Score: \" + level.animal.getPoints());\n \talert.setContentText(\"Try Again Next Time!\");\n \talert.show();\n\t}", "protected void addScoreToLeaderboard() {\n\n\t\tif (onlineLeaderboard) {\n\t\t jsonFunctions = new JSONFunctions();\n\t\t jsonFunctions.setUploadScore(score);\n\t\t \n\t\t Handler handler = new Handler() {\n\t\t\t @Override\n\t\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\t ArrayList<Score> s = (ArrayList<Score>) msg.obj;\n\t\t\t\t globalScores = helper.sortScores(s);\n\t\t\t }\n\t\t };\n\t\t \n\t\t jsonFunctions.setHandler(handler);\n\t\t jsonFunctions\n\t\t\t .execute(\"http://brockcoscbrickbreakerleaderboard.web44.net/\");\n\t\t}\n\t\tsaveHighScore();\n }", "private void printMainMenu() {\n\t\tSystem.out.println(\"1. Go adventuring\");\n\t\tSystem.out.println(\"2. Enter tavern\");\n\t\tSystem.out.println(\"3. Show details about your character\");\n\t\tSystem.out.println(\"4. Exit game\");\n\t}", "public void print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }", "@Override\n\tpublic void printStudent() {\n\t\tSystem.out.print(\"학번\\t국어\\t영어\\t수학\\n\");\n\t\tSystem.out.println(\"=\".repeat(60));\n\t\tint nSize = scoreList.size();\n\t\tfor(int i = 0 ; i < nSize ; i++) {\n\t\t\tScoreVO vo = new ScoreVO();\n\t\t\tSystem.out.print(vo.getNum() + \"\\t\");\n\t\t\tSystem.out.print(vo.getKor() + \"\\t\");\n\t\t\tSystem.out.print(vo.getEng() + \"\\t\");\n\t\t\tSystem.out.print(vo.getMath() + \"\\n\");\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public static void outputWinner(String scene)\n\t\t{\n\t\t\tint maxscore = scores[0];\n\t\t\tfor(int i = 1; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tif(scores[i] > maxscore)\n\t\t\t\t\tmaxscore = scores[i];\n\t\t\t}\n\t\t\tSystem.out.print(\"Winner(s) for \" + scene +\": \");\n\t\t\tfor(int j = 0; j < scores.length; j++)\n\t\t\t{\n\t\t\t\tif(scores[j]==maxscore)\n\t\t\t\t\tSystem.out.print(entrants[j]+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}" ]
[ "0.68725866", "0.6814455", "0.67859405", "0.6766853", "0.6754001", "0.67511994", "0.67451966", "0.6736652", "0.6708402", "0.6693114", "0.66735107", "0.65892935", "0.65201056", "0.6508623", "0.6505515", "0.6491966", "0.6489947", "0.6475344", "0.64325", "0.6398136", "0.6395976", "0.6388963", "0.6386587", "0.63846296", "0.6374214", "0.636961", "0.6367267", "0.6365189", "0.6342737", "0.63318145", "0.6330928", "0.6329547", "0.63218606", "0.6309564", "0.6289162", "0.6278819", "0.62777746", "0.6265309", "0.6264819", "0.6245046", "0.6244899", "0.6231736", "0.62246", "0.62036604", "0.61838794", "0.6179585", "0.613926", "0.61347765", "0.61293995", "0.6122157", "0.611627", "0.61090314", "0.61082494", "0.6107497", "0.6105726", "0.60922664", "0.6087297", "0.6086617", "0.60749173", "0.6068437", "0.6066994", "0.6064122", "0.606162", "0.6054767", "0.6054636", "0.6045108", "0.60421354", "0.6032875", "0.6021907", "0.60209936", "0.601819", "0.6017387", "0.60116625", "0.60077095", "0.59992117", "0.5986228", "0.5974827", "0.59725106", "0.5971948", "0.59712434", "0.596647", "0.5964385", "0.5962711", "0.5922197", "0.59209746", "0.59175104", "0.5904025", "0.5897837", "0.5885821", "0.5871603", "0.5870757", "0.58539325", "0.58485156", "0.5843254", "0.58395886", "0.5828977", "0.5828953", "0.58151907", "0.58143574", "0.58133644", "0.5795403" ]
0.0
-1
when button is pressed
@Override public void actionPerformed(ActionEvent e) { removeAll(); switch (in) { case 1: initial(); button.setToolTipText("To main menu"); break; case 2: settings(); button.setToolTipText("To settings"); break; default: highScores(); button.setToolTipText("To high scores"); break; } revalidate(); repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buttonClicked();", "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "public void onButtonAPressed();", "void buttonGo_actionPerformed(ActionEvent e) {\n\n\n }", "void mainButtonPressed();", "public void sButton() {\n\n\n\n }", "public void ipcallButtonPressed() {\n\t\tdialButtonPressed(true) ;\n\t}", "public void settingBtnClick() {\n\t}", "private void devBtnActionPerformed(ActionEvent evt) {\n }", "public abstract void buttonPressed();", "void buttonPressed(ButtonType type);", "void enablButtonListener();", "String handleButtonPress(Button button);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "public void clickButton()\n {\n fieldChangeNotify( 0 );\n }", "public void onClicked();", "public void actionPerformed(ActionEvent e) {\n \n // YOUR CODE HERE\n\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "protected abstract void pressedOKButton( );", "private void button1MouseClicked(MouseEvent e) {\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void onButtonBPressed();", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}", "private void designBtnActionPerformed(ActionEvent evt) {\n }", "void userPressConnectButton();", "public void buttonClick() {\n if (soundToggle == true) {\n buttonClick.start();\n } // if\n }", "@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}", "@Override\n protected void actionPerformed(GuiButton button)\n {\n super.actionPerformed(button);\n }", "private void ViewActionPerformed(ActionEvent e) {\n\t}", "@Override\n\tpublic void pressed(PushButton button) {\n\t\tvm.getConfigurationPanel().getButton(index);\n\t\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void submit_intsatpos(View button) {\n }", "public void testing() {\n System.out.println(\"button pressed!\");\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJButton btn = (JButton) e.getSource();\n\t lev_no = (int) btn.getClientProperty(\"column\") + 3 * ((int) btn.getClientProperty(\"row\"));\n\t\t\tselect.setVisible(false);\n\t\t\ttitle.setVisible(true);\n\t\t\tstart.setVisible(true);\n\t\t\texit.setVisible(true);\n\t\t\tlev_button.setVisible(true);\n\t \n\t\t}", "public void trigger() {\n button.release(true);\n }", "protected void execute() { \t\n// \tboolean toggle=true;\n// \tboolean grab = false;\n// \tif(toggle&&button.get()) {//execute once per button push\n// \t\ttoggle=false;//prevents code from being called again until button is released and pressed again\n// \t\tif(grab){\n// \t\t\tgrab=false;\n// \t\t\tclaw.open();\n// \t\t}else {\n// \t\t\tgrab=true;\n// \t\t\tclaw.close();\n// \t\t}\n// \t}else if(!button.get()) {\n// \t\ttoggle=true;//button has been released\n// \t}\n \tclaw.open();\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) \n\t\t{\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "public void buttonPress(ActionEvent event) {\r\n Button clickedButton = (Button) event.getSource();\r\n String selectedButton = clickedButton.getId();\r\n System.out.print(selectedButton);\r\n \r\n // If the user correctly guesses the winning button\r\n if (correctButtonName.equals(selectedButton)) {\r\n \r\n //Displays a popup alerting the user that they won the game.\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"You Win!\");\r\n alert.setHeaderText(\"Congratulations, you found the treasure!\");\r\n alert.setContentText(\"Would you like to play again?\");\r\n ButtonType okButton = new ButtonType(\"Play again\");\r\n ButtonType noThanksButton = new ButtonType(\"No Thanks!\");\r\n alert.getButtonTypes().setAll(okButton, noThanksButton);\r\n Optional<ButtonType> result = alert.showAndWait();\r\n \r\n //If the user selects \"Play again\" a new button will be randomly selected\r\n if (result.get() == okButton ){\r\n //Chooses a random button from the list of buttons\r\n correctButtonName = buttonList[(int)(Math.random() * buttonList.length)];\r\n }\r\n //If the user does not select \"Play again\", the application will be closed\r\n else {System.exit(0);}\r\n \r\n }\r\n \r\n //If the user chooses any button except for the winning button\r\n else if (!selectedButton.equals(correctButtonName)) {\r\n \r\n //Displays a popup alerting the user that they did not find the treasure.\r\n Alert alert2 = new Alert(Alert.AlertType.INFORMATION);\r\n alert2.setTitle(\"No treasure!\");\r\n alert2.setHeaderText(\"There was no treasure found on that island\");\r\n alert2.setContentText(\"Would you like to continue searching for treasure?\");\r\n ButtonType ayeCaptain = new ButtonType (\"Continue Searching\");\r\n ButtonType noCaptain = new ButtonType (\"Quit\");\r\n alert2.getButtonTypes().setAll(ayeCaptain,noCaptain);\r\n Optional<ButtonType> result2 = alert2.showAndWait();\r\n \r\n if (result2.get() == ayeCaptain){\r\n //The search for treasure continues!\r\n }\r\n else{ \r\n System.exit(0);\r\n }\r\n }\r\n }", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tButtonPress();\n\t}", "public void buttonPressed(){\r\n\t\tsetBorder(new BevelBorder(10));\r\n\t}", "@Override\n public void onClick() {\n System.out.println(\"Button has been JUST clicked\");\n }", "void okButtonClicked();", "void actionButton ( ) throws IOException {\n String textOfField = this.gui.wdgInputText.getText();\n this.gui.widgOutput.append(\"Button1 \" + (++this.ctKeyStroke1) + \" time, text=\" + textOfField + \"\\n\");\n }", "@Override\n public void actionPerformed(ActionEvent e)\n {\n \n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "private void button1MouseClicked(MouseEvent e) {\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == button1) {\n\t\t prefDisplay();\n\t\t }\n\t}", "abstract void botonAyuda_actionPerformed(ActionEvent e);", "void viewButton_actionPerformed(ActionEvent e) {\n doView();\n }", "@Override\n public void onBoomButtonClick(int index) {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n Main.switchViews();\n }", "public void buttonShowComplete(ActionEvent actionEvent) {\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) \n\t\t{\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}", "protected abstract boolean up(int button);", "@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n\n }", "private void button1ActionPerformed(ActionEvent e) {\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) { // ueberprueft das Event fuer den Button\r\n\t\t\t\tif (e.getSource() == alarm \r\n\t\t\t\t\t\t&& alarm.getText().equals(\"Alarm setzen\")) { // schaut ob der geklickte Button den gleichen Text hat wieder der Alarmbutton\r\n\t\t\t\t\tabfrageFenster(); // bei Uebereinstimmung wird Abfragefenster aufgerufen\r\n\t\t\t\t}\r\n\t\t\t}", "public void onYesButtonClicked() {\n changeAfterClientPick();\n }", "@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }", "@Override\n\tprotected void OnClick() {\n\t\t\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if(e.getSource().equals(btnQuayLai)){\n btnquaylaiclick();}\n }", "private void button1MousePressed(MouseEvent e) {\n }", "@Override\npublic void actionPerformed(ActionEvent e) {\n\nJButton b1 = (JButton)(e.getSource());\n\tString text = b1.getText();\n\tSystem.out.println(\"buttn pressed \"+ text);\n\tcm.addADigit(text);\n\n\tcv.update();\n\n}", "@Override\r\n \t\tpublic void actionPerformed(ActionEvent e) {\n \t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tgetControleur(). saisirOuvrage() ;}", "void onClick();", "public void buttonChangeStatus(ActionEvent actionEvent) {\n }", "@Override\n\t public void onClick(View v) {\n\t \teditor.putInt(\"buttonLabel\", 4);\n\t \t\teditor.commit();\n\t \tif(powerSwitch.isChecked() && nCurrentSpeed > drivingSpeed){\n\t \t\twarning();\n\t \t}\n\t \telse\n\t \t\tlaunchContact();\n\t }" ]
[ "0.79603904", "0.7830349", "0.76130056", "0.7553383", "0.7523605", "0.73870367", "0.7284341", "0.72568685", "0.71961856", "0.7178323", "0.7150953", "0.7143568", "0.7134279", "0.713406", "0.71244586", "0.7069205", "0.70638996", "0.70488137", "0.7047523", "0.7047523", "0.7047523", "0.7047523", "0.7044442", "0.70158756", "0.7012543", "0.7002375", "0.69773537", "0.6974895", "0.69678247", "0.6960461", "0.69493043", "0.694327", "0.69426966", "0.69413257", "0.6939886", "0.6939886", "0.6939886", "0.6937149", "0.69354594", "0.6915702", "0.6898415", "0.6898415", "0.68950117", "0.6890264", "0.6883045", "0.68807036", "0.6879095", "0.6879095", "0.6874188", "0.6873839", "0.6870978", "0.68589145", "0.684493", "0.684312", "0.68375146", "0.682945", "0.682945", "0.682945", "0.682945", "0.682945", "0.68288606", "0.68288606", "0.68288606", "0.68288606", "0.68288606", "0.68288606", "0.68288606", "0.68288606", "0.68288606", "0.68288606", "0.68224764", "0.682161", "0.6811908", "0.6811908", "0.6810035", "0.6810035", "0.6810035", "0.68092567", "0.6808543", "0.6806433", "0.68055487", "0.6795169", "0.6788926", "0.6782904", "0.678228", "0.67806655", "0.6776789", "0.6775643", "0.67713183", "0.6770904", "0.67699045", "0.6768284", "0.6756501", "0.6752982", "0.6750041", "0.6735584", "0.6725857", "0.67191046", "0.6715665", "0.6712695", "0.67081714" ]
0.0
-1
method made to simplify the appearence and actins of buttons
private JLabel makeLabel(String title, boolean h1) { JLabel label = new JLabel(title); if (h1 == true) {//if the label is to be a title label.setForeground(themeColor); label.setFont(new Font("Terminal Bold", Font.PLAIN, 48)); } else { label.setFont(new Font("Terminal Bold", Font.PLAIN, 25)); label.setForeground(Color.white); } return label; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[0])){\n\t\t\tperformButton(0);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[1])){\n\t\t\tperformButton(1);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[2])){\n\t\t\tperformButton(2);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[3])){\n\t\t\tperformButton(3);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[4])){\n\t\t\tperformButton(4);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[5])){\n\t\t\tperformButton(5);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[6])){\n\t\t\tperformButton(6);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[7])){\n\t\t\tperformButton(7);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[8])){\n\t\t\tperformButton(8);\n\t\t}\n\t}", "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 doButtons()\n {\n if (scopes.size()>1) addButtons();\n else hideButtons();\n }", "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "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}", "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}", "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}", "private void refreshButtons() {\n flowPane.getChildren().clear();\n\n for(String testName : Files.listTests()) {\n TestJson info;\n try {\n info = TestParser.read(testName);\n } catch(FileNotFoundException e) {\n continue; /* Skip */\n }\n\n JFXButton button = new JFXButton(testName);\n button.pseudoClassStateChanged(PseudoClass.getPseudoClass(\"select-button\"), true);\n\n button.setOnAction(e -> buttonPressed(info));\n\n if(!filter(info, button))\n continue;\n\n // If this model asked to be put in a specific place, put it there\n if(!info.custom && info.order >= 0)\n flowPane.getChildren().add(Math.min(info.order, flowPane.getChildren().size()), button);\n else\n flowPane.getChildren().add(button);\n }\n }", "Button getBtn();", "protected void updateButtons() {\n int currentIndex = tabbedPane.getSelectedIndex();\n if( currentIndex == 0) {\n backButton.setEnabled(false);\n forwardButton.setText(\"weiter\");\n }\n if(currentIndex > 0) {\n backButton.setEnabled(true);\n forwardButton.setText(\"weiter\");\n }\n \n if(currentIndex == 6) {\n forwardButton.setText(\"würfeln\");\n }\n \n }", "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}", "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 updateButtons() {\n\t\tsetTitle(\"Insert \" + title + \"\\t\\tPage \" + pagenum + \"/\" + MAX_PAGE);\n\t\t// update button labels\n\t\tint symbx = pageoffset;\n\t\tint stop = symbx + 9;\n\t\tint nomore = stop;\n\t\tint symsize = getSymbolSize();\n\t\tif (nomore >= symsize - 1) {\n\t\t\tnomore = symsize - 1;\n\t\t}\n\t\tfor (int buttx = 0; symbx <= stop; symbx++) {\n\t\t\t// Log.d(\"SymbolDialog - updateButtons\", \"buttx: \" + buttx +\n\t\t\t// \" symbx: \" + symbx);\n\t\t\tif (symbx > nomore) {\n\t\t\t\t((TextView) mainview.findViewById(buttons[buttx])).setText(\"\");\n\t\t\t} else {\n\t\t\t\t((TextView) mainview.findViewById(buttons[buttx]))\n\t\t\t\t\t\t.setText(String.valueOf(getSymbol(symbx)));\n\t\t\t}\n\t\t\tbuttx++;\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 }", "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 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}", "public void sButton() {\n\n\n\n }", "@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 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}", "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 }", "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 }", "private void fixButtons() {\n\t\tfixModButtonListener();\n\t\tfixBuscarButtonListener();\n\t\tfixDeleteButtonListener();\n\t\tfixClearFieldsButtonListener();\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 }", "protected void actionPerformed(GuiButton par1GuiButton)\n {\n for (int var2 = 0; var2 < this.options.keyBindings.length; ++var2)\n {\n ((GuiButton)this.controlList.get(var2)).displayString = this.options.getOptionDisplayString(var2);\n }\n\n if (par1GuiButton.id == 200)\n {\n this.mc.displayGuiScreen(this.parentScreen);\n }\n else\n {\n this.buttonId = par1GuiButton.id;\n par1GuiButton.displayString = \"> \" + this.options.getOptionDisplayString(par1GuiButton.id) + \" <\"; // what is this even for.. it gets overwritten in drawScreen\n }\n }", "private void buttonsPanel(JPanel panel_buttons) {\n\t\t//BUTTON COMPONENETS\n\t\tJButton btnDraw = new JButton(\"DRAW\");\n\t\tbtnDraw.setMinimumSize(new Dimension(81, 34));\n\t\tbtnDraw.setMaximumSize(new Dimension(81, 34));\n\t\tbtnDraw.setOpaque(true);\n\t\tbtnDraw.setBorderPainted(false);\n\t\tbtnDraw.setHideActionText(true);\n\t\tbtnDraw.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n\t\tbtnDraw.setSelected(true);\n\t\tbtnDraw.setRequestFocusEnabled(false);\n\t\tbtnDraw.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnDraw.setFont(UIManager.getFont(\"ColorChooser.font.green\"));\n\t\tbtnDraw.setBackground(Color.BLACK);\n\t\tbtnDraw.setForeground(Color.GREEN);\n\t\tbtnDraw.setFont(UIManager.getFont(\"ColorChooser.font.green\"));\n\t\t\n\t\tJButton btnReset = new JButton(\"RESET\");\n\t\tbtnReset.setForeground(Color.RED);\n\t\tbtnReset.setFont(UIManager.getFont(\"Button.font\"));\n\t\tbtnReset.setBorder(null);\n\t\tbtnReset.setOpaque(true);\n\t\tbtnReset.setBackground(Color.BLACK);\n\t\tbtnReset.setName(\"\");\n\t\t\n\t\tJButton btnQuit = new JButton(\"QUIT\");\n\t\tbtnQuit.setMaximumSize(new Dimension(81, 29));\n\t\tbtnQuit.setMinimumSize(new Dimension(81, 29));\n\t\tbtnQuit.setOpaque(true);\n\t\tbtnQuit.setBackground(Color.BLACK);\n\t\tbtnQuit.setBorderPainted(false);\n\t\tbtnQuit.setForeground(Color.WHITE);\n\t\tbtnQuit.setFont(UIManager.getFont(\"ColorChooser.font\"));\n\t\tbtnQuit.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t//PANEL LAYOUT FOR BUTTONS\n\t\tGroupLayout gl_panel_Buttons = new GroupLayout(panel_buttons);\n\t\tgl_panel_Buttons.setHorizontalGroup(\n\t\t\tgl_panel_Buttons.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addComponent(btnReset, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)\n\t\t\t\t.addComponent(btnQuit, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)\n\t\t\t\t.addComponent(btnDraw, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)\n\t\t);\n\t\tgl_panel_Buttons.setVerticalGroup(\n\t\t\tgl_panel_Buttons.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_Buttons.createSequentialGroup()\n\t\t\t\t\t.addComponent(btnDraw, GroupLayout.PREFERRED_SIZE, 78, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(btnReset, GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(btnQuit, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE))\n\t\t);\n\t\tpanel_buttons.setLayout(gl_panel_Buttons);\n\t}", "void buttonPressed(ButtonType type);", "public void eventos() {\n btnAbrir.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n btnAbrirActionPerformed(evt);\n }\n });\n }", "@Override\n public void onClick(View v) {\n switch(v.getId()) {\n case R.id.button1:\n display.setText(button1.getText());\n button1.setBackgroundColor(Color.BLUE);\n reset(1);\n tuningF = getNoteFrequency(1, tuning);\n tuningIndex = 1;\n break;\n case R.id.button2:\n display.setText(button2.getText());\n button2.setBackgroundColor(Color.BLUE);\n reset(2);\n tuningF = getNoteFrequency(2, tuning);\n tuningIndex = 2;\n break;\n case R.id.button3:\n display.setText(button3.getText());\n button3.setBackgroundColor(Color.BLUE);\n reset(3);\n tuningF = getNoteFrequency(3, tuning);\n tuningIndex = 3;\n break;\n case R.id.button4:\n display.setText(button4.getText());\n button4.setBackgroundColor(Color.BLUE);\n reset(4);\n tuningF = getNoteFrequency(4, tuning);\n tuningIndex = 4;\n break;\n case R.id.button5:\n display.setText(button5.getText());\n button5.setBackgroundColor(Color.BLUE);\n reset(5);\n tuningF = getNoteFrequency(5, tuning);\n tuningIndex = 5;\n break;\n case R.id.button6:\n display.setText(button6.getText());\n button6.setBackgroundColor(Color.BLUE);\n reset(6);\n tuningF = getNoteFrequency(6, tuning);\n tuningIndex = 6;\n break;\n }\n }", "protected void actionPerformed(GuiButton par1GuiButton)\n {\n if (par1GuiButton.id == 0)\n {\n this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));\n }\n\n if (par1GuiButton.id == 5)\n {\n this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings));\n }\n\n if (par1GuiButton.id == 1)\n {\n this.mc.displayGuiScreen(new GuiSelectWorld(this));\n }\n\n if (par1GuiButton.id == 2)\n {\n this.mc.displayGuiScreen(new GuiMultiplayer(this));\n }\n\n if (par1GuiButton.id == 3)\n {\n this.mc.displayGuiScreen(new GuiTexturePacks(this));\n }\n\n if (par1GuiButton.id == 4)\n {\n this.mc.shutdown();\n }\n }", "@Override\n\tprotected void buildButton() {\n\t\t\n\t}", "public void buttonClicked();", "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}", "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 }", "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}", "@Override\n public void onClick(View view) {\n Button trykket = null;\n for (int i = 0; i < 30 ; i++) {\n if (view==buttons.get(i)){\n trykket=buttons.get(i);\n }\n }\n assert trykket != null;\n gæt(trykket);\n\n //vi afslutter spiller hvis det er slut eller vundet.\n if(logik.erSpilletSlut()){\n if(logik.erSpilletTabt()){\n // die.start();\n slutspilllet(false);\n }\n if(logik.erSpilletVundet()) slutspilllet(true);\n }\n\n }", "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 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}", "@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}", "private void allBtnActionPerformed(ActionEvent evt) {\n }", "private void createButton(){\n addButton();\n addStartButton();\n }", "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}", "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 }", "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}", "@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}", "public void UpdateCommandsUI(){\n Button B;\n try{\n for (int i = 0; i < f.getNumComp(); i++) {\n B = (Button) findViewById(300000 + i); //Buy Button\n if(dayOpen & (p.getMoney()>0)) {\n B.setEnabled(true);\n B.setTextColor(0xffffffff);\n } else if(dayOpen & (p.getLevel()>= 4)){\n B.setEnabled(true);\n B.setTextColor(0xffff0000);\n } else {\n B.setEnabled(false);\n B.setTextColor(0xff000000);\n }\n\n B = (Button) findViewById(400000 + i); //Sell Button\n if (dayOpen & (f.getSharesOwned(i) > 0)) {\n B.setEnabled(true);\n B.setTextColor(0xffffffff);\n } else if(p.getLevel()>=4 & !f.isShorted(i) & dayOpen){\n B.setEnabled(true);\n B.setTextColor(0xffff0000); //Red Color for short positions\n } else {\n B.setEnabled(false);\n B.setTextColor(0xff000000);\n }\n }\n } catch (Exception e){\n e.printStackTrace();\n }\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}", "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}", "public abstract void executeBagButton();", "private void designBtnActionPerformed(ActionEvent evt) {\n }", "void bsButtonHandling(){\n\n Boolean checkFlag = false;\n for(int i = 0; i < 4; ++i){\n if(operatorButtonClicked[i]){\n checkFlag = true;\n break;\n }\n }\n\n // -----------------------------------------------------\n // if an operator button was clicked then ignore BS\n if(checkFlag == false){\n numberOnDisplay = Integer.parseInt(display.getText().toString());\n numberOnDisplay = numberOnDisplay/10;\n display.setText(Integer.toString(numberOnDisplay));\n numberOnDisplay = 0;\n }\n }", "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 }", "private void button1MouseClicked(MouseEvent e) {\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}", "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}", "private void makeFrontGUIButtons(){\n Dimension preferred = getPreferredSize();\n\n optionsButton = new JButton();\n makeFrontButton(optionsButton, \"optionsIcon\", \"showOptions\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) (preferred.getHeight() * 0.98), 39, 37));\n makeSearchButton();\n\n zoomInButton = new JButton();\n makeFrontButton(zoomInButton, \"plusIcon\", \"zoomIn\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) preferred.getHeight() / 3 * 2, 39, 37));\n\n zoomOutButton = new JButton();\n makeFrontButton(zoomOutButton, \"minusIcon\", \"zoomOut\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) (preferred.getHeight() / 3 * 2 + 45), 39, 37));\n\n makeShowRoutePanelButton();\n\n fullscreenButton = new JButton();\n makeFrontButton(fullscreenButton, \"fullscreenIcon\", \"fullscreen\", new Rectangle((int) preferred.getWidth() - 60, (int) (preferred.getHeight() - preferred.getHeight() / 3 * 2 + 100), 39, 37));\n\n mapTypeButton = new JButton();\n makeFrontButton(mapTypeButton, \"layerIcon\", \"mapType\", new Rectangle((int) preferred.getWidth() - 49, (int) (preferred.getHeight() - preferred.getHeight() / 3 * 2 - 45), 39, 37));\n makeCloseDirectionListPanel();\n }", "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 }", "protected abstract void pressedOKButton( );", "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 }", "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 }", "public void displayMoveButtons(JPanel panel, GameState currentGS) {\n\n super.getContentPane().removeAll();\n\n Pokemon p2Pman = currentGS.player2CurrentPokemon;\n\n if (this.move1 == null) {\n\n Move move = p2Pman.moves.get(0);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX,moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move1 = new ActionButtonInner();\n this.move1.setButton(moveB);\n this.move1.setActionIndex(0);\n\n }\n else {\n\n Move move = p2Pman.moves.get(0);\n JButton button = this.move1.buttonObj;\n button.setText(move.moveName);\n this.move1.setActionIndex(0);\n panel.add(button);\n\n }\n\n if (this.move2 == null) {\n\n Move move = p2Pman.moves.get(1);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX + (moveButtonXSize),moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move2 = new ActionButtonInner();\n this.move2.setButton(moveB);\n this.move2.setActionIndex(1);\n\n }\n else {\n\n Move move = p2Pman.moves.get(1);\n JButton button = this.move2.buttonObj;\n button.setText(move.moveName);\n this.move2.setActionIndex(1);\n panel.add(button);\n\n }\n\n if (this.move3 == null) {\n\n Move move = p2Pman.moves.get(2);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX + 2*(moveButtonXSize),moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move3 = new ActionButtonInner();\n this.move3.setButton(moveB);\n this.move3.setActionIndex(2);\n\n }\n else {\n\n Move move = p2Pman.moves.get(2);\n JButton button = this.move3.buttonObj;\n button.setText(move.moveName);\n this.move3.setActionIndex(2);\n panel.add(button);\n\n }\n\n if (this.move4 == null) {\n\n Move move = p2Pman.moves.get(3);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX + 3*(moveButtonXSize),moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move4 = new ActionButtonInner();\n this.move4.setButton(moveB);\n this.move4.setActionIndex(3);\n\n }\n else {\n\n Move move = p2Pman.moves.get(3);\n JButton button = this.move4.buttonObj;\n button.setText(move.moveName);\n this.move4.setActionIndex(3);\n panel.add(button);\n\n }\n\n super.getContentPane().add(panel);\n super.revalidate();\n\n }", "public void actionButton(String text);", "@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}", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(barComp, BUTTON_ADD_ID, Messages.btnAddParameter, true);\n\t\tcreateButton(barComp, BUTTON_EDIT_ID, Messages.btnEditParameter, true);\n\t\tcreateButton(barComp, BUTTON_DROP_ID, Messages.btnDropParameter, true);\n\t\tcreateButton(barComp, BUTTON_UP_ID, Messages.btnUpParameter, true);\n\t\tcreateButton(barComp, BUTTON_DOWN_ID, Messages.btnDownParameter, true);\n\t\tcreateButton(parent, IDialogConstants.OK_ID, com.cubrid.common.ui.common.Messages.btnOK, true);\n\n\t\tgetButton(BUTTON_EDIT_ID).setEnabled(false);\n\t\tgetButton(BUTTON_UP_ID).setEnabled(false);\n\t\tgetButton(BUTTON_DOWN_ID).setEnabled(false);\n\t\tgetButton(BUTTON_DROP_ID).setEnabled(false);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, com.cubrid.common.ui.common.Messages.btnCancel, false);\n\t}", "@Override\n\tprotected void loadButtons() {\n\t\tList<Button> buttons = new ArrayList<>();\n\t\tfinal int square_size = 100;\n\t\tfinal int seperator_size = 20;\n\t\tfinal int numButtons = 2;\n\t\tint y = (getHeight() - 100) / 2;\n\t\tint x = (getWidth() - (square_size * numButtons) - (seperator_size * (numButtons - 1))) / 2;\n\t\tint sep = square_size + seperator_size;\n\t\t// Paint button.\n\t\ttry {\n\t\t\tbuttons.add(new Button(getImage(IconHandler.path_paint), \"Toggle paint\", x, y,\n\t\t\t\t\tsquare_size, square_size, new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tsetUsingTextures(!isUsingTextures());\n\t\t\t\t\t\t\trepaint();\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\tbuttons.add(new Button(getImage(IconHandler.path_fullscreen), \"Toggle full-screen\", x + sep, y,\n\t\t\t\t\tsquare_size, square_size, new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tgetFrame().toggleArrangeSide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetButtons(buttons);\n\t}", "private void createButtonComp() {\n GridData gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);\n Composite okBtnComp = new Composite(shell, SWT.NONE);\n GridLayout okBtnCompLayout = new GridLayout(2, true);\n okBtnComp.setLayout(okBtnCompLayout);\n okBtnComp.setLayoutData(gd);\n\n GridData bd = new GridData(110, 30);\n okBtn = new Button(okBtnComp, SWT.PUSH);\n okBtn.setText(\"OK\");\n okBtn.setLayoutData(bd);\n okBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n calculateDuration();\n shell.dispose();\n }\n });\n\n bd = new GridData(110, 30);\n cancelBtn = new Button(okBtnComp, SWT.PUSH);\n cancelBtn.setText(\"Close\");\n cancelBtn.setLayoutData(bd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n\n /*\n * (non-Javadoc)\n * \n * @see\n * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse\n * .swt.events.SelectionEvent)\n */\n @Override\n public void widgetSelected(SelectionEvent e) {\n setReturnValue(-1);\n close();\n }\n });\n }", "private void updateButtons() {\n\t\tif(buttonCount>1){\n\t\t\tremoveTableButton.setEnabled(true);\n\t\t}\n\t\telse{\n\t\t\tremoveTableButton.setEnabled(false);\n\t\t}\n\t\tif(buttonCount<tablesX.length){\n\t\t\taddTableButton.setEnabled(true);\n\t\t}\n\t\telse{\n\t\t\taddTableButton.setEnabled(false);\n\t\t}\n\t}", "public void setupWindowButtons(){\n focusPropertyButton(btnExitProgramPlannerPlanPane);\n focusPropertyButton(btnExitProgramPlannerShoppingListPane);\n focusPropertyButton(btnExitProgramPlannerCupboardPane);\n focusPropertyButton(btnMinimiseProgramPlannerPlanPlane);\n focusPropertyButton(btnMinimiseProgramPlannerShoppingListPane);\n focusPropertyButton(btnMinimiseProgramPlannerCupboardPane);\n focusPropertyButton(btnExitProgramMealsBrowsePane);\n focusPropertyButton(btnMinimiseProgramMealsBrowsePane);\n focusPropertyButton(btnExitProgramMealsAddPane);\n focusPropertyButton(btnMinimiseProgramMealsAddPane);\n focusPropertyButton(btnExitProgramIngredBrowse);\n focusPropertyButton(btnMinimiseProgramIngredBrowse);\n focusPropertyButton(btnExitProgramIngredAdd);\n focusPropertyButton(btnMinimiseProgramIngredAdd);\n\n }", "public void submit_intsatpos(View button) {\n }", "private void createButtonsPanel() {\r\n Composite buttonsPanel = new Composite(this, SWT.NONE);\r\n buttonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\r\n buttonsPanel.setLayout(new GridLayout(4, true));\r\n\r\n getButtonFromAction(buttonsPanel, \"New\", new NewAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Save\", new SaveAction());\r\n getButtonFromAction(buttonsPanel, \"Delete\", new DeleteAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Cancel\", new CancelAction());\r\n }", "private Map<Integer, Button> getButtons(){\r\n\t\tMap<Integer, Button> buttons = new HashMap<Integer, Button>();\r\n\r\n\t\tButton toLeftBt = new Button(\"&lt;\");\r\n\t\tbuttons.put(0, toLeftBt);\r\n\t\tButton toRightBt = new Button(\"&gt;\");\r\n\t\tbuttons.put(2, toRightBt);\r\n\t\tfinal Button playBt = new Button(\"||\");\r\n\t\tbuttons.put(1, playBt);\r\n\t\t\r\n\t\ttoRightBt.addClickListener(new ClickListener(){\r\n\t\t\tpublic void onClick(Widget sender) {\r\n\t\t\t\tdisplayNext();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\ttoLeftBt.addClickListener(new ClickListener(){\r\n\t\t\tpublic void onClick(Widget sender) {\r\n\t\t\t\tdisplayPrevious();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tplayBt.addClickListener(new ClickListener(){\r\n\t\t\tpublic void onClick(Widget sender) {\r\n\t\t\t\tif(isActive){\r\n\t\t\t\t\tstopSlideshow();\r\n\t\t\t\t\tplayBt.setText(\"Go\");\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstartSlideshow();\r\n\t\t\t\t\tplayBt.setText(\"||\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn buttons;\r\n\t}", "private ButtonPane()\r\n\t\t\t{ super(new String[]{\"OK\",\"Cancel\"},1,2); }", "@Override\n\tprotected void createCompButtons() {\n\t\tbtnExcelReport = new Button(getCompButtons(), SWT.NONE);\n\t\tbtnExcelReport.setText(\"Excel Report\");\n\t\tbtnExcelReport.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tbtnExcelReport\n\t\t.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(\n\t\t\t\t\torg.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\tcmdExcelReportWidgetSelected();\n\t\t\t}\n\t\t});\n\t}", "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 createOKButtons() {\n okAddButton = addOKButton(\"Add Shape\");\n okRemoveButton = addOKButton(\"Remove Shape\");\n okAddKeyframeButton = addOKButton(\"Add Keyframe\");\n okAddKeyframeTimeButton = addOKButton(\"Add Keyframe Time\");\n okRemoveKeyframeButton = addOKButton(\"Remove Keyframe\");\n okRemoveKeyframeTimeButton = addOKButton(\"Remove Keyframe Time\");\n okEditKeyframeButton = addOKButton(\"Edit Keyframe\");\n okEditKeyframeTimeButton = addOKButton(\"Edit Keyframe Time\");\n okEditKeyframeFinalButton = addOKButton(\"Edit Keyframe Final\");\n okClearShapeButton = addOKButton(\"Clear Shape\");\n }", "@Override\n 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 }", "private void setupActionButtons() {\n setupLikeActionButton();\n setupRepostActionButton();\n setupMoreActionButton();\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionListener() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDiagnosticChain diagnosticChain = new BasicDiagnostic();\n\t if (isValid(diagnosticChain)) {\n\t \t okFlag = true;\n\t\t okPressed();\n\t\t }else{\n\t\t \t Message messageDialog = new Message(EditTask.this.getShell());\n\t\t \t messageDialog.setMessage(Util.getErrorMessage(diagnosticChain));\n\t\t \t messageDialog.open();\n\t\t }\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t});\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "private 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 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 }", "@Test\n\tpublic void addButtonsTest() 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\tConfiguration.reorderplaylist && \n\t\t\t\t!Configuration.queuetrack \n\t\t\t\t) {\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\tJButton button2 =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(\"trackUp\")) {\n\t\t\t\t\tbutton = (JButton) g.getContentPane().getComponent(i);\n\t\t\t\t}\n\t\t\t\telse if(g.getContentPane().getComponent(i).getName()!= null && g.getContentPane().getComponent(i).getName().equals(\"trackDown\")) {\n\t\t\t\t\tbutton2 = (JButton) g.getContentPane().getComponent(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\tassertTrue(button.getBounds().getX() == 506);\n\t\t\tassertTrue(button.getBounds().getY() == 327);\n\t\t\tassertTrue(button.getBounds().getWidth() == 120);\n\t\t\tassertTrue(button.getBounds().getHeight() == 25);\n\t\t\tassertTrue(button.getActionListeners()!= null);\n\t\t\t\n\t\t\tassertTrue(button2.getBounds().getX() == 506);\n\t\t\tassertTrue(button2.getBounds().getY() == 360);\n\t\t\tassertTrue(button2.getBounds().getWidth() == 120);\n\t\t\tassertTrue(button2.getBounds().getHeight() == 25);\n\t\t\tassertTrue(button2.getActionListeners()!= null);\n\t\t}\n\t}", "private void setupButtons() {\n for (int i = 0; i < players.size(); i++) {\n final int j = i + 1;\n players.get(i).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n buttonPushed(j);\n }\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}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource().getClass().equals(talkbot.Buttons.class)) {\r\n\t\t\t// int bn;\r\n\t\t\t/*if (on)\r\n\t\t\t\tbn=1;\r\n\t\t\telse\r\n\t\t\t\tbn=2; */\r\n\t\t\tButtons temp = (Buttons) e.getSource(); \r\n\t\t\t//bn = temp.getbtnNumber();\r\n\t\t\t\r\n\t\t\tString tempath = this.con.getPathToAudioFile(currentset+1, temp.getbtnNumber());\r\n\t\t\tplaySound(tempath);\r\n\t\t\tlogger.info(\"Set \" + currentset + \" - Button \" + temp.getbtnNumber());\r\n\t\t} else if (categories.contains((JButton) e.getSource())) {\r\n\t\t\tif (currentset != categories.indexOf((JButton) e.getSource())) {\r\n\t\t\tfor (int i = 0; i < tbuttons.get(currentset).size(); i++) {\r\n\t\t\t\tsp.remove(tbuttons.get(currentset).get(i));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrentset= categories.indexOf((JButton) e.getSource());\r\n\t\t\t//System.out.println(currentset); \r\n\t\t\tif (!tbuttons.get(currentset).isEmpty()) {\r\n\t\t\tfor (int i = 0; i < tbuttons.get(currentset).size(); i++) {\r\n\t\t\t\tsp.add(tbuttons.get(currentset).get(i));\r\n\t\t\t\ttbuttons.get(currentset).get(i).addActionListener(this);\r\n\t\t\t\ttbuttons.get(currentset).get(i).setVisible(true);\r\n\t\t\t}}\r\n\t\t\tthis.revalidate(); this.repaint(); }\r\n\t\t\tlogger.info(\"Set - \" + currentset);\r\n\t\t} \r\n\t}", "public abstract void buttonPressed();", "@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }", "private void iterateOverButtons(){\n int columnRows = 4;\n integerButtons = new Button[MAX_BUTTONS];\n for (int i = 0; i < integerButtons.length; ++i) {\n integerButtons[i] = new Button(buttonText[i]);\n integerButtons[i].setId(\"buttons\");\n integerButtons[i].setPrefSize(60, 80);\n gridPane.add(integerButtons[i], i % columnRows , i / columnRows);\n }\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 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 }", "@Override\n public void onBoomButtonClick(int index) {\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 devBtnActionPerformed(ActionEvent evt) {\n }", "private Classes.Button principalButtonsMenu(TextView buttonTitle, ImageView buttonImage){\n Classes.Button button;\n if(buttonIndex < (rows*(columns-1))) {\n button = buttons.get(buttonIndex);\n createPrincipalButtons(buttonTitle, button, buttonImage);\n }else if(buttonFunctionIndex < functionButtons.size()) {\n button = functionButtons.get(buttonFunctionIndex);\n createFuncionesButtons(buttonTitle, button, buttonImage);\n }else{\n button = new Classes.Button(0, \"\", \"\", \"\",\"\", \"\",\"\", \"\");\n }\n return button;\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 buttonAction(ButtonClass button){\n //Sets the chosenButton to most recently chosen button\n chosenButton = button;\n chosenGame = chosenButton.getSmallGame();\n allClickedButtons.add(chosenButton);\n nextGamePosition = chosenButton.getButtonPosition();\n checkAndUpdateIfSmallGameWin(chosenGame);\n updateBigGameBoardForNextMove();\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 }", "@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}", "String handleButtonPress(Button button);", "public void updateButtons(){\n\t\tif (Player.getPlayer(this).questManager.atMaxNumQuests()) {\n\t\t\tcreateQuest.setEnabled(false);\n\t\t} else {\n\t\t\tcreateQuest.setEnabled(true);\n\t\t}\n\t\tif (selectedQuest != null){\n\t\t\tdeleteQuest.setEnabled(true);\n\t\t\tcompleteQuest.setEnabled(true);\n\t\t} else {\n\t\t\tdeleteQuest.setEnabled(false);\n\t\t\tcompleteQuest.setEnabled(false);\n\t\t}\n\t}", "private void checkButton(ActionEvent e) {\n List<PuzzleButton> selectedButtons = buttons.stream()\n .filter(PuzzleButton::isSelectedButton)\n .collect(Collectors.toList());\n PuzzleButton currentButton = (PuzzleButton) e.getSource();// getting current button\n currentButton.setSelectedButton(true);\n int currentButtonIndex = buttons.indexOf(currentButton);\n //if no button are selected, do not update collection of PuzzleButton\n if (selectedButtons.size() == 1) {\n int lastClickedButtonIndex = 0;\n\n for (PuzzleButton button : buttons) {\n if (button.isSelectedButton() && !button.equals(currentButton)) {\n lastClickedButtonIndex = buttons.indexOf(button);\n }\n }\n Collections.swap(buttons, lastClickedButtonIndex, currentButtonIndex);\n updateButtons();\n }\n }", "private ButtonJPanel(){\n GridLayout layout = new GridLayout(0, 1);//creates a grid layout with 1 column and unlimited rows, for the buttons\n setLayout(layout);//sets the JPanel layout\n layout.setVgap(5);//sets the vertical gap between the buttons\n setBackground(Color.WHITE);//sets the color of the panel to WHITE\n \n fillrecimg = new ImageIcon(\"src/fillrec.png\");//assigns a png image to the ImageIcon\n fillovalimg = new ImageIcon(\"src/filloval.png\");\n emptyrecimg = new ImageIcon(\"src/emptyrec.png\");\n emptyovalimg = new ImageIcon(\"src/emptyoval.png\");\n linedrawimg = new ImageIcon(\"src/linedraw.png\");\n \n clear = new JButton(\"Clear\");//initializes the buttons, either with text or an icon\n (fillrec = new JButton(fillrecimg)).setActionCommand(\"Filled Rectangle\");//icon buttons are assigned a string ActionCommand\n (filloval = new JButton(fillovalimg)).setActionCommand(\"Filled Oval\");\n (emptyrec = new JButton(emptyrecimg)).setActionCommand(\"Empty Rectangle\");\n (emptyoval = new JButton(emptyovalimg)).setActionCommand(\"Empty Oval\");\n (linedraw = new JButton(linedrawimg)).setActionCommand(\"Line Drawing\");\n opencolor = new JButton(\"Color Chooser\");\n \n JButton[] buttons = {clear, fillrec, filloval, emptyrec, emptyoval, linedraw, opencolor};//an array of all the buttons\n \n for(JButton button : buttons){//for each button...\n button.addActionListener(this);//add a listener\n add(button);//add the button to the panel\n button.setOpaque(true);//make the color visable\n button.setBackground(Color.BLACK);//set background to black\n button.setFont(new Font(Font.DIALOG, Font.PLAIN, 13));//sets the font, style, and size\n }\n }", "private void showButtonDemo(){\n Button submitButton = new Button(\"Submit\");\n\n Button cancelButton = new Button(\"Cancel\");\n\n submitButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n Question2Query ans = new Question2Query();\n String val= \"Sorry, we are unable to answer\";\n try {\n val = ans.ask(text.getText());\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n statusLabel.setText(\"\\n\"+val);\n }\n });\n\n cancelButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n statusLabel.setText(\"Cancel Button clicked.\");\n }\n });\n\n //controlPanel.add(okButton);\n controlPanel.add(submitButton);\n controlPanel.add(cancelButton);\n mainFrame.setVisible(true);\n }" ]
[ "0.70904726", "0.7080795", "0.6978373", "0.68992054", "0.68555295", "0.6823196", "0.68107164", "0.6791138", "0.6787979", "0.6785243", "0.67780274", "0.6762248", "0.6745191", "0.6717238", "0.67104465", "0.6695773", "0.66946495", "0.66844606", "0.66708237", "0.66587657", "0.6658273", "0.6650803", "0.66479707", "0.6645029", "0.6636117", "0.66313416", "0.6628125", "0.6617691", "0.66081816", "0.6607445", "0.66056764", "0.6588359", "0.6578852", "0.65716624", "0.6570368", "0.6570274", "0.656733", "0.656718", "0.6563954", "0.65617174", "0.6542269", "0.65402657", "0.65382457", "0.6535107", "0.6521456", "0.65202767", "0.6516873", "0.6516805", "0.6515271", "0.6515026", "0.65112007", "0.6503174", "0.64976716", "0.6490945", "0.64885765", "0.6488186", "0.6478173", "0.6470973", "0.6453384", "0.64526916", "0.6433043", "0.6426891", "0.64263976", "0.64217323", "0.6420113", "0.64194393", "0.64155513", "0.6411265", "0.64041823", "0.63987494", "0.63978285", "0.6397119", "0.63925654", "0.63820356", "0.63782054", "0.63770676", "0.6375198", "0.637074", "0.6369169", "0.636851", "0.6368495", "0.6366259", "0.63642603", "0.6359397", "0.6358383", "0.63564974", "0.63536996", "0.63505614", "0.634979", "0.63479364", "0.6343698", "0.6337835", "0.6337799", "0.6333218", "0.6331768", "0.6331314", "0.6328203", "0.6325246", "0.6321064", "0.6318454", "0.6312997" ]
0.0
-1
method made to simplify making changes to appearence of text
public void packUp() { news.themeColour = (String) colourChooser.getSelectedItem(); //gets the currently selected colour news.write(); //writes high scores and selected colour to file }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void textilize () {\n\n textIndex = 0;\n int textEnd = line.length() - 1;\n listChars = new StringBuffer();\n linkAlias = false;\n while (textIndex < line.length()\n && (Character.isWhitespace(textChar()))) {\n textIndex++;\n }\n while (textEnd >= 0\n && textEnd >= textIndex\n && Character.isWhitespace (line.charAt (textEnd))) {\n textEnd--;\n }\n boolean blankLine = (textIndex >= line.length());\n if (blankLine) {\n textilizeBlankLine();\n }\n else\n if ((textIndex > 0)\n || ((line.length() > 0 )\n && (line.charAt(0) == '<'))) {\n // First character is white space of the beginning of an html tag:\n // Doesn't look like textile... process it without modification.\n }\n else\n if (((textEnd - textIndex) == 3)\n && line.substring(textIndex,textEnd + 1).equals (\"----\")) {\n // && (line.substring(textIndex, (textEnd + 1)).equals (\"----\")) {\n textilizeHorizontalRule(textIndex, textEnd);\n } else {\n textilizeNonBlankLine();\n };\n }", "String getTransformedText();", "private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }", "TextWithReferences getTextWithReferences();", "private void processText(){\n if(text == null || text.length() == 0){\n // When posting a tweet, Twitter returns the \"text\" JSON field even if it's not trimmed...\n text = trimmedText;\n }else{\n // Trim the original contents received from Twitter\n text = text.substring(0, text.offsetByCodePoints(0, displayTextRange[1]));\n }\n\n // Transform HTML characters (for some reason Twitter sends those)\n text = org.apache.commons.text.StringEscapeUtils.unescapeHtml4(text);\n }", "private void textilizeNonBlankLine () {\n StringBuffer blockMod = new StringBuffer();\n int startPosition = 0;\n int textPosition = 0;\n leftParenPartOfURL = false;\n attributeType = 0;\n klass = new StringBuffer();\n id = new StringBuffer();\n style = new StringBuffer();\n language = new StringBuffer();\n String imageTitle = \"\";\n String imageURL = \"\";\n int endOfImageURL = -1;\n boolean doublePeriod = false;\n int periodPosition = line.indexOf (\".\");\n if (periodPosition >= 0) {\n textPosition = periodPosition + 1;\n if (textPosition < line.length()) {\n if (line.charAt (textPosition) == '.') {\n doublePeriod = true;\n textPosition++;\n }\n if (textPosition < line.length()\n && line.charAt (textPosition) == ' ') {\n textPosition++;\n textIndex = 0;\n while (textIndex < periodPosition\n && (Character.isLetterOrDigit (textChar()))) {\n blockMod.append (textChar());\n textIndex++;\n } // end while more letters and digits\n if (blockMod.toString().equals (\"p\")\n || blockMod.toString().equals (\"bq\")\n || blockMod.toString().equals (\"h1\")\n || blockMod.toString().equals (\"h2\")\n || blockMod.toString().equals (\"h3\")\n || blockMod.toString().equals (\"h4\")\n || blockMod.toString().equals (\"h5\")\n || blockMod.toString().equals (\"h6\")) {\n // look for attributes\n collectAttributes (periodPosition);\n } else {\n blockMod = new StringBuffer();\n textPosition = 0;\n }\n } // end if space follows period(s)\n } // end if not end of line following first period\n } // end if period found\n\n // Start processing at the beginning of the line\n textIndex = 0;\n\n // If we have a block modifier, then generate appropriate HTML\n if (blockMod.length() > 0) {\n lineDelete (textPosition);\n closeOpenBlockQuote();\n closeOpenBlock();\n doLists();\n if (blockMod.toString().equals (\"bq\")) {\n lineInsert (\"<blockquote><p\");\n context.blockQuoting = true;\n } else {\n lineInsert (\"<\" + blockMod.toString());\n }\n if (klass.length() > 0) {\n lineInsert (\" class=\\\"\" + klass.toString() + \"\\\"\");\n }\n lineInsert (\">\");\n if (doublePeriod) {\n context.nextBlock = blockMod.toString();\n } else {\n context.nextBlock = \"p\";\n }\n }\n\n // See if line starts with one or more list characters\n if (blockMod.length() <= 0) {\n while (textIndex < line.length()\n && (textChar() == '*'\n || textChar() == '#'\n || textChar() == ';')) {\n listChars.append (textChar());\n textIndex++;\n }\n if (listChars.length() > 0\n && (textIndex >= line.length()\n || ((! Character.isWhitespace (textChar()))\n && (textChar() != '(')))) {\n listChars = new StringBuffer();\n textIndex = 0;\n }\n int firstSpace = line.indexOf (\" \", textIndex);\n if (listChars.length() > 0) {\n collectAttributes (firstSpace);\n }\n }\n int endDelete = textIndex;\n if (endDelete < line.length()\n && Character.isWhitespace (line.charAt (endDelete))) {\n endDelete++;\n }\n\n if (listChars.length() > 0) {\n lineDelete (0, endDelete);\n }\n doLists();\n if (listChars.length() > 0\n && listChars.charAt(listChars.length() - 1) == ';') {\n lastDefChar = ';';\n } else {\n lastDefChar = ' ';\n }\n\n // See if this line contains a link alias\n if ((blockMod.length() <= 0)\n && ((line.length() - textIndex) >= 4)\n && (textChar() == '[')) {\n int rightBracketIndex = line.indexOf (\"]\", textIndex);\n if (rightBracketIndex > (textIndex + 1)) {\n linkAlias = true;\n String alias = line.substring (textIndex + 1, rightBracketIndex);\n String url = line.substring (rightBracketIndex + 1);\n lineDelete (line.length() - textIndex);\n lineInsert (\"<a alias=\\\"\" + alias + \"\\\" href=\\\"\" + url + \"\\\"> </a>\");\n }\n }\n\n // If no other instructions, use default start for a new line\n if (blockMod.length() <= 0 \n && listChars.length() <= 0\n & (! linkAlias)) {\n // This non-blank line does not start with a block modifier or a list char\n if (context.lastLineBlank) {\n if (context.nextBlock.equals (\"bq\")) {\n lineInsert (\"<p>\");\n } else {\n closeOpenBlockQuote();\n lineInsert (\"<\" + context.nextBlock + \">\");\n }\n } else {\n lineInsert (\"<br />\");\n }\n }\n\n // Now examine the rest of the line\n char last = ' ';\n char c = ' ';\n char next = ' ';\n leftParenPartOfURL = false;\n resetLineIndexArray();\n while (textIndex <= line.length()) {\n // Get current character, last character and next character\n last = c;\n if (textIndex < line.length()) {\n c = textChar();\n } else {\n c = ' ';\n }\n if ((textIndex + 1) < line.length()) {\n next = line.charAt (textIndex + 1);\n } else {\n next = ' ';\n }\n \n // ?? means a citation\n if (c == '?' && last == '?') {\n if (ix [CITATION] >= 0) {\n replaceWithHTML (CITATION, 2);\n } else {\n ix [CITATION] = textIndex - 1;\n textIndex++;\n }\n }\n else\n // __ means italics\n if (c == '_' && last == '_' && ix [QUOTE_COLON] < 0) {\n if (ix [ITALICS] >= 0) {\n replaceWithHTML (ITALICS, 2);\n } else {\n ix [ITALICS] = textIndex - 1;\n textIndex++;\n }\n }\n else\n // ** means bold\n if (c == '*' && last == '*') {\n if (ix [BOLD] >= 0) {\n replaceWithHTML (BOLD, 2);\n } else {\n ix [BOLD] = textIndex - 1;\n textIndex++;\n }\n }\n else\n // _ means emphasis\n if (c == '_' && next != '_' && ix [QUOTE_COLON] < 0) {\n if (ix [EMPHASIS] >= 0) {\n replaceWithHTML (EMPHASIS, 1);\n } else {\n ix [EMPHASIS] = textIndex;\n textIndex++;\n }\n }\n else\n // * means strong\n if (c == '*' && next != '*') {\n if (ix [STRONG] >= 0) {\n replaceWithHTML (STRONG, 1);\n } else {\n ix [STRONG] = textIndex;\n textIndex++;\n }\n }\n else\n // Exclamation points surround image urls\n if (c == '!' && Character.isLetter(next)\n && ix [QUOTE_COLON] < 0 && ix [EXCLAMATION] < 0) {\n // First exclamation point : store its location and move on\n ix [EXCLAMATION] = textIndex;\n textIndex++;\n }\n else\n // Second exclamation point\n if (c == '!'\n && ix [QUOTE_COLON] < 0 && ix [EXCLAMATION] >= 0) {\n // Second exclamation point\n imageTitle = \"\";\n endOfImageURL = textIndex;\n if (last == ')' && ix [EXCLAMATION_LEFT_PAREN] > 0) {\n ix [EXCLAMATION_RIGHT_PAREN] = textIndex - 1;\n endOfImageURL = ix [EXCLAMATION_LEFT_PAREN];\n imageTitle = line.substring\n (ix [EXCLAMATION_LEFT_PAREN] + 1, ix [EXCLAMATION_RIGHT_PAREN]);\n }\n imageURL = line.substring (ix [EXCLAMATION] + 1, endOfImageURL);\n // Delete the image url, title and parentheses,\n // but leave exclamation points for now.\n lineDelete (ix [EXCLAMATION] + 1, textIndex - ix [EXCLAMATION] - 1);\n String titleString = \"\";\n if (imageTitle.length() > 0) {\n titleString = \" title=\\\"\" + imageTitle + \"\\\" alt=\\\"\" + imageTitle + \"\\\"\";\n }\n lineInsert (ix [EXCLAMATION] + 1,\n \"<img src=\\\"\" + imageURL + \"\\\"\" + titleString + \" />\");\n if (next == ':') {\n // Second exclamation followed by a colon -- look for url for link\n ix [QUOTE_COLON] = textIndex;\n ix [LAST_QUOTE] = ix [EXCLAMATION];\n } else {\n lineDelete (ix [EXCLAMATION], 1);\n lineDelete (textIndex, 1);\n }\n ix [EXCLAMATION] = -1;\n ix [EXCLAMATION_LEFT_PAREN] = -1;\n ix [EXCLAMATION_RIGHT_PAREN] = -1;\n textIndex++;\n } // end if second exclamation point\n else\n // Parentheses within exclamation points enclose the image title\n if (c == '(' && ix [EXCLAMATION] > 0 ) {\n ix [EXCLAMATION_LEFT_PAREN] = textIndex;\n textIndex++;\n }\n else\n // Double quotation marks surround linked text\n if (c == '\"' && ix [QUOTE_COLON] < 0) {\n if (next == ':'\n && ix [LAST_QUOTE] >= 0\n && textIndex > (ix [LAST_QUOTE] + 1)) {\n ix [QUOTE_COLON] = textIndex;\n } else {\n ix [LAST_QUOTE] = textIndex;\n }\n textIndex++;\n }\n else\n // Flag a left paren inside of a url\n if (c == '(' && ix [QUOTE_COLON] > 0) {\n leftParenPartOfURL = true;\n textIndex++;\n }\n else\n // Space may indicate end of url\n if (Character.isWhitespace (c)\n && ix [QUOTE_COLON] > 0\n && ix [LAST_QUOTE] >= 0\n && textIndex > (ix [QUOTE_COLON] + 2)) {\n int endOfURL = textIndex - 1;\n // end of url is last character of url\n // do not include any trailing punctuation at end of url\n int backup = 0;\n while ((endOfURL > (ix [QUOTE_COLON] + 2))\n && (! Character.isLetterOrDigit (line.charAt(endOfURL)))\n && (! ((line.charAt(endOfURL) == ')') && (leftParenPartOfURL)))\n && (! (line.charAt(endOfURL) == '/'))) {\n endOfURL--;\n backup++;\n }\n String url = line.substring (ix [QUOTE_COLON] + 2, endOfURL + 1);\n // insert the closing anchor tag\n lineInsert (endOfURL + 1, \"</a>\");\n // Delete the quote, colon and url from the line\n lineDelete (ix [QUOTE_COLON], endOfURL + 1 - ix [QUOTE_COLON]);\n // insert the beginning of the anchor tag\n lineDelete (ix [LAST_QUOTE], 1);\n lineInsert (ix [LAST_QUOTE], \"<a href=\\\"\" + url + \"\\\">\");\n // Reset the pointers\n ix [QUOTE_COLON] = -1;\n ix [LAST_QUOTE] = -1;\n leftParenPartOfURL = false;\n // Increment the index to the next character\n if (backup > 0) {\n textIndex = textIndex - backup;\n } else {\n textIndex++;\n }\n }\n else\n // Look for start of definition\n if ((c == ':' || c == ';')\n && Character.isWhitespace(last)\n && Character.isWhitespace(next)\n && listChars.length() > 0\n && (lastDefChar == ';' || lastDefChar == ':')) {\n lineDelete (textIndex - 1, 3);\n lineInsert (closeDefinitionTag (lastDefChar)\n + openDefinitionTag (c));\n lastDefChar = c;\n }\n /* else\n // -- means an em dash\n if (c == '-' && last == '-') {\n textIndex--;\n lineDelete (2);\n lineInsert (\"&#8212;\");\n } */ else {\n textIndex++;\n }\n }// end while more characters to examine\n\n context.lastLineBlank = false;\n\n }", "protected void updateTextChange() {\n \t\t\tfText= fDocumentUndoManager.fTextBuffer.toString();\n \t\t\tfDocumentUndoManager.fTextBuffer.setLength(0);\n \t\t\tfPreservedText= fDocumentUndoManager.fPreservedTextBuffer.toString();\n \t\t\tfDocumentUndoManager.fPreservedTextBuffer.setLength(0);\n \t\t}", "private void wrapText() {\r\n if (atEnd()) {\r\n setPosition(0);\r\n updateMatcher();\r\n }\r\n }", "protected void processTextPosition(TextPosition text) {\n//\n//\t\tif (text.getCharacter().contains(\"股\")\n//\t\t\t\t|| text.getCharacter().contains(\"票\")\n//\t\t\t\t|| text.getCharacter().contains(\"代\")\n//\t\t\t\t|| text.getCharacter().contains(\"码\")\n//\t\t\t\t|| text.getCharacter().contains(\"证\")\n//\t\t\t\t|| text.getCharacter().contains(\"券\")\n//\t\t\t\t|| Character.isDigit(text.getCharacter().charAt(0))\n//\t\t\t\t|| text.getCharacter().contains(\",\")\n//\t\t\t\t|| text.getCharacter().contains(\"。\")\n//\t\t\t\t|| text.getCharacter().contains(\",\")\n//\t\t\t\t|| text.getCharacter().contains(\".\")\n//\t\t\t\t|| text.getCharacter().contains(\":\")\n//\t\t\t\t|| text.getCharacter().contains(\":\"))\n//\t\t{\n//\t\t\tstockCode += text.getCharacter();\n//\t\t}\n\n if (text.getCharacter().endsWith(\" \"))\n return;\n\n if (textBuffer.isEmpty()) {\n textBuffer.add(text);\n } else {\n TextPosition lastText = textBuffer.get(textBuffer.size() - 1);\n\n // If current text is near enough to the end of textBuffer (lastText)\n if (isCharacterAdjacent(lastText, text) == true) {\n textBuffer.add(text);\n } else {\n\n // A new text segment is found which is adjacent to the current textBuffer,\n // but may be vertically overlapped.\n\n // Put the segment into a block, the block will be combined later.\n\n // If the text buffer is overlapped with the last buffer in infoBlock\n // then combine these two buffers.\n\n\n if (infoBlock.isEmpty() == false) {\n List<TextPosition> lastBuffer = infoBlock.get(infoBlock.size() - 1);\n\n // MAX_FEATURE_LEN is a magic number to filter too long a line that overlaps with all line below\n if (CommonUtils.isBufferHorizontalOverlapped(lastBuffer, textBuffer) && lastBuffer.size() < MAX_FEATURE_LEN) {\n lastBuffer.addAll(textBuffer);\n } else {\n infoBlock.add(textBuffer);\n }\n } else {\n infoBlock.add(textBuffer);\n }\n\n // to create a new buffer for the original object is added to the infoBlock\n textBuffer = new ArrayList<TextPosition>();\n textBuffer.add(text);\n }\n }\n\n\n\n/*\t\tSystem.out.println( \"String[\" + text.getXDirAdj() + \",\" +\n\t\t\t\ttext.getYDirAdj() + \" fs=\" + text.getFontSize() + \" xscale=\" +\n\t\t\t\ttext.getXScale() + \" height=\" + text.getHeightDir() + \" space=\" +\n\t\t\t\ttext.getWidthOfSpace() + \" width=\" +\n\t\t\t\ttext.getWidthDirAdj() + \"]\" + text.getCharacter() );*/\n }", "private String computeCorrectedText() {\n String correctedText = getText();\n\n if (getOOVWords() != null && getOOVWords().size() > 0) {\n int diff = 0;\n\n for (OOV oov : getOOVWords()) {\n if (oov.getAnnotation() == Annotation.Variation) {\n if (oov.getStartPosition() == 0) {\n correctedText = oov.getCorrection() + correctedText.substring(oov.getEndPosition() + diff, correctedText.length());\n }else {\n correctedText = correctedText.substring(0, oov.getStartPosition() + diff)\n + oov.getCorrection()\n + correctedText.substring(oov.getEndPosition() + diff, correctedText.length());\n }\n\n diff += oov.getCorrection().length() - oov.getToken().length();\n } \n }\n }\n\n return PostProcess.apply(correctedText);\n }", "private void checkTextAnnotation(MGraph g, UriRef textAnnotation, String content) {\n Iterator<Triple> selectedTextIterator = g.filter(textAnnotation,\n Properties.ENHANCER_SELECTED_TEXT, null);\n // check if the selected text is added\n assertTrue(selectedTextIterator.hasNext());\n // test if the selected text is part of the TEXT_TO_TEST\n Resource object = selectedTextIterator.next().getObject();\n assertTrue(object instanceof Literal);\n Literal selectedText = (Literal)object;\n object = null;\n assertTrue(content.indexOf(selectedText.getLexicalForm()) >= 0);\n // test if context is added\n //context not present for Zemanta\n// Iterator<Triple> selectionContextIterator = g.filter(textAnnotation,\n// Properties.ENHANCER_SELECTION_CONTEXT, null);\n// assertTrue(selectionContextIterator.hasNext());\n// // test if the selected text is part of the TEXT_TO_TEST\n// object = selectionContextIterator.next().getObject();\n// assertTrue(object instanceof Literal);\n// assertTrue(content.indexOf(((Literal)object).getLexicalForm()) >= 0);\n// object = null;\n //test start/end if present\n Iterator<Triple> startPosIterator = g.filter(textAnnotation,\n ENHANCER_START, null);\n Iterator<Triple> endPosIterator = g.filter(textAnnotation,\n ENHANCER_END, null);\n //start end is optional, but if start is present, that also end needs to be set\n if(startPosIterator.hasNext()){\n Resource resource = startPosIterator.next().getObject();\n //only a single start position is supported\n assertTrue(!startPosIterator.hasNext());\n assertTrue(resource instanceof TypedLiteral);\n TypedLiteral startPosLiteral = (TypedLiteral) resource;\n resource = null;\n int start = LiteralFactory.getInstance().createObject(Integer.class, startPosLiteral);\n startPosLiteral = null;\n //now get the end\n //end must be defined if start is present\n assertTrue(endPosIterator.hasNext());\n resource = endPosIterator.next().getObject();\n //only a single end position is supported\n assertTrue(!endPosIterator.hasNext());\n assertTrue(resource instanceof TypedLiteral);\n TypedLiteral endPosLiteral = (TypedLiteral) resource;\n resource = null;\n int end = LiteralFactory.getInstance().createObject(Integer.class, endPosLiteral);\n endPosLiteral = null;\n //check for equality of the selected text and the text on the selected position in the content\n //System.out.println(\"TA [\"+start+\"|\"+end+\"]\"+selectedText.getLexicalForm()+\"<->\"+content.substring(start,end));\n assertTrue(content.substring(start, end).equals(selectedText.getLexicalForm()));\n } else {\n //if no start position is present, there must also be no end position defined\n assertTrue(!endPosIterator.hasNext());\n }\n }", "private void applyOnText(Function<String, String> func) {\r\n\t\tJTextArea editor = getSelectedTextArea();\r\n\t\tDocument doc = editor.getDocument();\r\n\t\t\r\n\t\tint offset = 0;\r\n\t\tint len = Math.abs(editor.getCaret().getDot() - editor.getCaret().getMark());\r\n\t\tif (len == 0) {\r\n\t\t\tlen = doc.getLength();\r\n\t\t} else {\r\n\t\t\toffset = Math.min(editor.getCaret().getDot(), editor.getCaret().getMark());\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tString text = doc.getText(offset, len);\r\n\t\t\ttext = func.apply(text);\r\n\t\t\tdoc.remove(offset, len);\r\n\t\t\tdoc.insertString(offset, text, null);\r\n\t\t} catch (BadLocationException ignorable) {\r\n\t\t}\r\n\t}", "protected void undoTextChange() {\n \t\t\ttry {\n \t\t\t\tif (fDocumentUndoManager.fDocument instanceof IDocumentExtension4)\n \t\t\t\t\t((IDocumentExtension4) fDocumentUndoManager.fDocument).replace(fStart, fText\n \t\t\t\t\t\t\t.length(), fPreservedText, fUndoModificationStamp);\n \t\t\t\telse\n \t\t\t\t\tfDocumentUndoManager.fDocument.replace(fStart, fText.length(),\n \t\t\t\t\t\t\tfPreservedText);\n \t\t\t} catch (BadLocationException x) {\n \t\t\t}\n \t\t}", "private Spanned getCompleteText() {\n // Used to add tags to text to improve layout\n SpannableStringBuilder complete = new SpannableStringBuilder();\n String[] array = getResources().getStringArray(R.array.complete);\n for (int i = 0; i < array.length; i++) {\n\n // Separates sections header and main text\n if ((i % 2) == 0) {\n\n // Add tags to header to help separate sections\n complete.append(Html.fromHtml(\"<b>\" + array[i] + \"</b>\" + \"<br>\" + \"<br>\"));\n } else {\n complete.append(Html.fromHtml(array[i] + \"<br>\"));\n }\n }\n return complete;\n }", "void addHadithText(Object newHadithText);", "public void modifyText(ExtendedModifyEvent event) \r\n\t\t\t{\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}", "@Override\n\t\tpublic void addText(String txt) {\n\t\t\t\n\t\t}", "@Override\n public abstract String asText();", "public void formatText(String text){\n\t\ttext = text.replaceAll(\"\\\\<[^>]*>\",\"\");\n\t}", "@SuppressWarnings(\"static-method\")\n\tprotected String transformInformationNotes(String text) {\n\t\tfinal String info = Strings.emptyIfNull(System.getProperty(INFO_NOTE_PATTERN_PROPERTY));\n\t\tfinal String warning = Strings.emptyIfNull(System.getProperty(WARNING_NOTE_PATTERN_PROPERTY));\n\t\tfinal String danger = Strings.emptyIfNull(System.getProperty(DANGER_NOTE_PATTERN_PROPERTY));\n\t\tif (Strings.isEmpty(info) && Strings.isEmpty(warning) && Strings.isEmpty(danger)) {\n\t\t\treturn text;\n\t\t}\n\n\t\tfinal Pattern startPattern = Pattern.compile(MARKDOWN_INFORMATION_NOTE_PATTERN1);\n\t\tfinal Pattern continuePattern = Pattern.compile(MARKDOWN_INFORMATION_NOTE_PATTERN2);\n\t\tfinal StringBuilder result = new StringBuilder();\n\t\tString currentName = null;\n\t\tStringBuilder currentNote = null;\n\t\tfor (final String line : text.split(\"\\r*\\n\\r*\")) {\n\t\t\tString newLine = null;\n\t\t\tif (currentName == null) {\n\t\t\t\tfinal Matcher matcher = startPattern.matcher(line);\n\t\t\t\tif (matcher.matches()) {\n\t\t\t\t\tcurrentName = matcher.group(1).trim();\n\t\t\t\t\tcurrentNote = new StringBuilder(matcher.group(2).trim());\n\t\t\t\t} else {\n\t\t\t\t\tcurrentName = null;\n\t\t\t\t\tcurrentNote = null;\n\t\t\t\t\tnewLine = line;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfinal Matcher matcher = continuePattern.matcher(line);\n\t\t\t\tif (matcher.matches()) {\n\t\t\t\t\tassert currentNote != null;\n\t\t\t\t\tcurrentNote.append(\" \").append(matcher.group(1).trim());\n\t\t\t\t} else {\n\t\t\t\t\tupdateBuffer(result, currentName, currentNote, info, warning, danger);\n\t\t\t\t\tcurrentName = null;\n\t\t\t\t\tcurrentNote = null;\n\t\t\t\t\tnewLine = line;\n\t\t\t\t}\n\t\t\t}\n\t\t\tupdateBuffer(result, newLine);\n\t\t}\n\t\tupdateBuffer(result, currentName, currentNote, info, warning, danger);\n\t\treturn result.toString();\n\t}", "public abstract String text();", "public abstract String text();", "private String format(String text) {\n if(text != null && !text.isEmpty())\n return text.substring(0, 1).toUpperCase(Locale.ENGLISH) + text.substring(1);\n else\n return \"\";\n }", "private void txt() {\n\n\t}", "public abstract WordEntry manualTranslate(String text, String from, String to);", "@Override\r\n\tpublic void setText() {\n\t\t\r\n\t}", "public abstract WordEntry autoTranslate(String text, String to);", "private void collapseTextRuns(RtfParagraph p_para)\n {\n m_paragraph = p_para;\n\n int style = m_paragraph.getProperties().getStyle();\n\n if (style >= 0)\n {\n m_paraProperties = m_stylesheet.getEffectiveTextProperties(style);\n // the merge removes superfluous default styles\n mergeProperties(m_paraProperties, new RtfTextProperties());\n }\n else\n {\n m_paraProperties = new RtfTextProperties();\n }\n\n RtfCompoundObject container = p_para;\n\n RtfText curr = null;\n RtfText prev = null;\n\n for (Iterator it = container.getIterator(); it.hasNext(); )\n {\n RtfObject o = (RtfObject)it.next();\n\n if (o instanceof RtfText)\n {\n curr = (RtfText)o;\n RtfTextProperties properties = curr.getProperties();\n String data = curr.getData();\n if (properties.getColorName().equalsIgnoreCase(\"default\")\n && data.startsWith(\"#\") && prev == null)\n {\n curr.setData(data.replaceFirst(\"#\", OfflineConstants.PONUD_SIGN));\n }\n if (prev != null &&\n prev.getProperties().equals(curr.getProperties()))\n {\n // merge the 2 and delete current node.\n prev.setData(prev.getData() + curr.getData());\n\n debug(\"RtfOptimizer: removing current text \" +\n curr.getData());\n\n it.remove();\n continue;\n }\n\n prev = curr;\n }\n else\n {\n prev = null;\n }\n }\n }", "@Override\n\tpublic String abbreviatedCellText(){\n\t\tString realText = text;\n\t\tif(text.charAt(0) == '\\\"'){\n\t\t\trealText = text.substring(1, text.length() - 1);\n\t\t}\n\t\tif(realText.length() > 10){\t\t//if it contains more than 10 characters\n\t\t\trealText = text.substring(1, 11);\t//using substring to take the first 10\n\t\t\treturn realText;\n\t\t}else{\n\t\t\t//fills in the spaces\n\t\t\twhile(realText.length()<10){\t//if it contains less than 10 characters\t\n\t\t\t\trealText += \" \";\t\t//pad to ten\n\n\t\t\t}\n\t\t\treturn realText;\n\t\t}\n\t}", "void removeHadithText(Object oldHadithText);", "String getToText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "@Override\n\t\t\tprotected String formatValue(String text) {\n\t\t\t\treturn text.substring(0, text.lastIndexOf('.'));\n\t\t\t}", "private SpannableString computeSpannableVersionString(){\n\t\t\t String sText = this.computeVersionString();\r\n\t\t\t SpannableString objReturn=new SpannableString(sText);\r\n\t\t\t return objReturn;\r\n\t\t }", "@Override\n public String toString() {\n return super.toString() + \" --> \" + getCorrectedText();\n }", "public void ach_doc_type_txt_test () {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tint hate = TEXT.indexOf(\"hate\");\n\t\tString newText = TEXT.substring(0, hate)+ \"love\" + TEXT.substring(hate+4);\n\t\t\n\t\tSystem.out.println(\"The line of text to be changed is: \\n\" + TEXT);\n\t\tSystem.out.println(\"I have rephrased that line to read: \\n\" + newText);\n\t}", "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 T caseText(Text object) {\n\t\treturn null;\n\t}", "Text createText();", "void printTextToAnotherMedium(String content){\n }", "private void swapContent(){\n Editable content = WordText.getText();\n WordText.setText(TranText.getText());\n TranText.setText(content);\n\n }", "protected TextLine genText (String str, Text text, TextLine line, Context context) {\n\t\tTextLine tLine = line;\n\t\tString[] parts = str.split(\"\\\\n\");\n\t\tbyte charset = TextParams.ROMAN;\n\t\tbyte size = TextParams.ILIAD_SCHOLIA_FONT_SIZE;\n\n\t\tString part = parts[0];\n\t\tpart = part.replaceAll(\"\\\\s+\", \" \");\n\t\tTextRun run = new TextRun(part, charset, size);\n\t\tif (context.bold) run.setBold();\n\t\tif (context.italic) run.setItalic();\n\t\ttLine.appendRun(run);\n\n\t\tif(parts.length > 1) {\n\t\t\ttext.copyLine(tLine);\n\t\t\tfor(int i =1;i<parts.length;i++) {\n\t\t\t\tpart = parts[i];\n\t\t\t\tpart = part.replaceAll(\"\\\\s+\", \" \");\n\t\t\t\ttLine = new TextLine();\n\t\t\t\trun = new TextRun(part, charset, size);\n\t\t\t\tif (context.bold) run.setBold();\n\t\t\t\tif (context.italic) run.setItalic();\n\t\t\t\ttLine.appendRun(run);\n\t\t\t\tif(i<parts.length -1) {\n\t\t\t\t\ttext.copyLine(tLine);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn tLine;\n\t}", "@Action\n public void addWrappedText() {\n if (Math.random() < .33) {\n addWrappedTextEndChar();\n } else if (Math.random() < .5) {\n addWrappedTextRandom();\n } else {\n addWrappedTextSmall();\n }\n }", "private void updateLabelText() {\n /*\n r18 = this;\n android.view.View r13 = r18.getNativeView()\n android.widget.TextView r13 = (android.widget.TextView) r13\n if (r13 != 0) goto L_0x0009\n L_0x0008:\n return\n L_0x0009:\n boolean r7 = r18.isSingleLine()\n r0 = r18\n float r0 = r0.minimumFontSizeInPixels\n r16 = r0\n r17 = 1036831949(0x3dcccccd, float:0.1)\n int r16 = (r16 > r17 ? 1 : (r16 == r17 ? 0 : -1))\n if (r16 < 0) goto L_0x00f6\n r3 = 1\n L_0x001b:\n r8 = r3\n r13.setSingleLine(r7)\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n if (r16 <= 0) goto L_0x00f9\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n r0 = r16\n r13.setLines(r0)\n L_0x0032:\n if (r7 == 0) goto L_0x0102\n r16 = 1\n r0 = r16\n r13.setMaxLines(r0)\n L_0x003b:\n r0 = r18\n java.lang.CharSequence r11 = r0.originalText\n if (r11 != 0) goto L_0x0135\n android.text.SpannableStringBuilder r11 = new android.text.SpannableStringBuilder\n java.lang.String r16 = \"\"\n r0 = r16\n r11.<init>(r0)\n r12 = r11\n L_0x004b:\n if (r8 == 0) goto L_0x0132\n int r16 = r12.length()\n if (r16 <= 0) goto L_0x0132\n r2 = 0\n L_0x0054:\n int r16 = r12.length()\n r0 = r16\n if (r2 >= r0) goto L_0x006c\n char r10 = r12.charAt(r2)\n r16 = 13\n r0 = r16\n if (r10 == r0) goto L_0x006c\n r16 = 10\n r0 = r16\n if (r10 != r0) goto L_0x012b\n L_0x006c:\n int r16 = r12.length()\n r0 = r16\n if (r2 >= r0) goto L_0x0132\n android.text.SpannableStringBuilder r11 = new android.text.SpannableStringBuilder\n r16 = 0\n r0 = r16\n r11.<init>(r12, r0, r2)\n L_0x007d:\n boolean r0 = r11 instanceof android.text.Spannable\n r16 = r0\n if (r16 != 0) goto L_0x0089\n android.text.SpannableStringBuilder r12 = new android.text.SpannableStringBuilder\n r12.<init>(r11)\n r11 = r12\n L_0x0089:\n r1 = 0\n r0 = r18\n int r0 = r0.autoLinkFlags\n r16 = r0\n if (r16 == 0) goto L_0x00a0\n r16 = r11\n android.text.Spannable r16 = (android.text.Spannable) r16\n r0 = r18\n int r0 = r0.autoLinkFlags\n r17 = r0\n boolean r1 = android.text.util.Linkify.addLinks(r16, r17)\n L_0x00a0:\n if (r1 == 0) goto L_0x012f\n android.text.method.MovementMethod r9 = android.text.method.LinkMovementMethod.getInstance()\n L_0x00a6:\n android.text.method.MovementMethod r16 = r13.getMovementMethod()\n r0 = r16\n if (r9 == r0) goto L_0x00c6\n boolean r5 = r13.isFocusable()\n boolean r4 = r13.isClickable()\n boolean r6 = r13.isLongClickable()\n r13.setMovementMethod(r9)\n r13.setFocusable(r5)\n r13.setClickable(r4)\n r13.setLongClickable(r6)\n L_0x00c6:\n r0 = r18\n android.text.TextUtils$TruncateAt r14 = r0.ellipsize\n if (r9 == 0) goto L_0x00da\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.START\n r0 = r16\n if (r14 == r0) goto L_0x00d8\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.MIDDLE\n r0 = r16\n if (r14 != r0) goto L_0x00da\n L_0x00d8:\n android.text.TextUtils$TruncateAt r14 = android.text.TextUtils.TruncateAt.END\n L_0x00da:\n r13.setEllipsize(r14)\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.MARQUEE\n r0 = r16\n if (r14 != r0) goto L_0x00ea\n r16 = 1\n r0 = r16\n r13.setSelected(r0)\n L_0x00ea:\n android.widget.TextView$BufferType r16 = android.widget.TextView.BufferType.NORMAL\n r0 = r16\n r13.setText(r11, r0)\n r13.requestLayout()\n goto L_0x0008\n L_0x00f6:\n r3 = 0\n goto L_0x001b\n L_0x00f9:\n r16 = 0\n r0 = r16\n r13.setMinLines(r0)\n goto L_0x0032\n L_0x0102:\n r0 = r18\n int r0 = r0.maxLines\n r16 = r0\n if (r16 <= 0) goto L_0x0129\n r0 = r18\n int r15 = r0.maxLines\n L_0x010e:\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n if (r16 <= 0) goto L_0x0124\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n r0 = r16\n if (r15 <= r0) goto L_0x0124\n r0 = r18\n int r15 = r0.viewHeightInLines\n L_0x0124:\n r13.setMaxLines(r15)\n goto L_0x003b\n L_0x0129:\n r15 = 1\n goto L_0x010e\n L_0x012b:\n int r2 = r2 + 1\n goto L_0x0054\n L_0x012f:\n r9 = 0\n goto L_0x00a6\n L_0x0132:\n r11 = r12\n goto L_0x007d\n L_0x0135:\n r12 = r11\n goto L_0x004b\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p006ti.modules.titanium.p007ui.widget.TiUILabel.updateLabelText():void\");\n }", "private void addCustomWords() {\r\n\r\n }", "private String normalizeTmapText(String text) {\n return text.substring(1, text.length() - 1);\n }", "private void setText() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "void antsInfo(String text);", "public static String toText (String text, List<Code> codes) {\r\n \t\t\r\n \t\tif (( codes == null ) || ( codes.size() == 0 )) return text.toString();\r\n \t\t\r\n \t\tStringBuilder tmp = new StringBuilder();\r\n \t\tCode code;\r\n \t\tfor ( int i=0; i<text.length(); i++ ) {\r\n \t\t\tswitch ( text.charAt(i) ) {\r\n \t\t\tcase TextFragment.MARKER_OPENING:\r\n \t\t\tcase TextFragment.MARKER_CLOSING:\r\n \t\t\tcase TextFragment.MARKER_ISOLATED:\r\n \t\t\t\tint index = TextFragment.toIndex(text.charAt(++i));\r\n \t\t\t\ttry {\r\n \t\t\t\t\tcode = codes.get(index);\r\n \t\t\t\t\ttmp.append(String.format(\"[%s]\", code.data));\r\n \t\t\t\t} catch (Exception e) {\r\n \t\t\t\t\ttmp.append(String.format(\"[-ERR:UNKNOWN-CODE- %d]\", index));\r\n \t\t\t\t}\t\t\t\t\r\n \t\t\t\tbreak;\r\n \t\t\tdefault:\r\n \t\t\t\ttmp.append(text.charAt(i));\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn tmp.toString();\r\n \t}", "protected String getTextContent()\n {\n return super.getText().trim();\n }", "private static String cleanHighlightingMarks(final String hlText) {\n String hlLiteral = hlText;\n int indexPre = hlLiteral.indexOf(HL_PRE);\n while (indexPre > -1) {\n int indexPost = hlLiteral.indexOf(HL_POST, indexPre + HL_PRE.length());\n if (indexPost > -1) {\n String post = hlLiteral.substring(indexPost + HL_POST.length());\n String pre = hlLiteral.substring(0, indexPost);\n Matcher preMatcher = HL_PRE_REGEX.matcher(pre);\n pre = preMatcher.replaceFirst(\"\");\n hlLiteral = pre + post;\n }\n indexPre = hlLiteral.indexOf(HL_PRE);\n }\n return hlLiteral;\n }", "private Painter newPlainText() {\r\n\t\treturn p.textOutline(text, surface, fontSize, bold, italic, \r\n\t\t\t\tshade, null);\r\n\t}", "public abstract String getText();", "public abstract String getText();", "public abstract String getText();", "public abstract String getText();", "public T caseText(Text object)\n {\n return null;\n }", "public static String transformGFM(IStoredSettings settings, String input, String repositoryName) {\r\n\t\tString text = input;\r\n\r\n\t\t// strikethrough\r\n\t\ttext = text.replaceAll(\"~~(.*)~~\", \"<s>$1</s>\");\r\n\t\ttext = text.replaceAll(\"\\\\{(?:-){2}(.*)(?:-){2}}\", \"<s>$1</s>\");\r\n\r\n\t\t// underline\r\n\t\ttext = text.replaceAll(\"\\\\{(?:\\\\+){2}(.*)(?:\\\\+){2}}\", \"<u>$1</u>\");\r\n\r\n\t\t// strikethrough, replacement\r\n\t\ttext = text.replaceAll(\"\\\\{~~(.*)~>(.*)~~}\", \"<s>$1</s><u>$2</u>\");\r\n\r\n\t\t// highlight\r\n\t\ttext = text.replaceAll(\"\\\\{==(.*)==}\", \"<span class='highlight'>$1</span>\");\r\n\r\n\t\tString canonicalUrl = settings.getString(Keys.web.canonicalUrl, \"https://localhost:8443\");\r\n\r\n\t\t// emphasize and link mentions\r\n\t\tString mentionReplacement = String.format(\" **[@$1](%1s/user/$1)**\", canonicalUrl);\r\n\t\ttext = text.replaceAll(\"\\\\s@([A-Za-z0-9-_]+)\", mentionReplacement);\r\n\r\n\t\t// link ticket refs\n\t\tString ticketReplacement = MessageFormat.format(\"$1[#$2]({0}/tickets?r={1}&h=$2)$3\", canonicalUrl, repositoryName);\n\t\ttext = text.replaceAll(\"([\\\\s,]+)#(\\\\d+)([\\\\s,:\\\\.\\\\n])\", ticketReplacement);\n\n\t\t// link commit shas\r\n\t\tint shaLen = settings.getInteger(Keys.web.shortCommitIdLength, 6);\r\n\t\tString commitPattern = MessageFormat.format(\"\\\\s([A-Fa-f0-9]'{'{0}'}')([A-Fa-f0-9]'{'{1}'}')\", shaLen, 40 - shaLen);\r\n\t\tString commitReplacement = String.format(\" [`$1`](%1$s/commit?r=%2$s&h=$1$2)\", canonicalUrl, repositoryName);\r\n\t\ttext = text.replaceAll(commitPattern, commitReplacement);\r\n\r\n\t\tString html = transformMarkdown(text);\r\n\t\treturn html;\r\n\t}", "protected void importText(String text, Epml epml) {\n\t}", "public void updateText()\r\n\t{\r\n\t\tdouble smallest = Math.min(menu.getController().getWidth(), menu.getController().getHeight());\r\n\t\tdouble equivalent12 = smallest/55;//Equivalent of 12 point font on base dimensions\r\n\t\t\r\n\t\ttextRenderer = new TextRenderer(new Font(fontName, Font.PLAIN, (int)(equivalent12*size)), true, true);\r\n\t}", "private String formatLatex(String text){\r\n\r\n String output=text.replaceAll(\"_\",\"-\");\r\n\r\n return output;\r\n }", "@Override\n\tpublic Paragraph translateText(String freetext, boolean include) {\n\t\treturn null;\n\t}", "private static void processPart (WorkPart part) \n\t\tthrows Exception\n\t{\n\t\tTextWrapper textWrapper = part.getPrimaryText();\n\t\tif (textWrapper == null) return;\n\t\tText primary = textWrapper.getText();\n\t\tint n = primary.getNumLines();\n\t\tTextLine[] primaryLines = primary.getLines();\n\t\tTextLine[] translationLines = new TextLine[n];\n\t\tCollection lines = pm.getLinesInWorkPart(part);\n\t\tint numTranslatedLines = 0;\n\t\tfor (Iterator it = lines.iterator(); it.hasNext(); ) {\n\t\t\tLine line = (Line)it.next();\n\t\t\tTextRange location = line.getLocation();\n\t\t\tif (location == null) continue;\n\t\t\tTextLocation start = location.getStart();\n\t\t\tif (start == null) continue;\n\t\t\tTextLocation end = location.getEnd();\n\t\t\tif (end == null) continue;\n\t\t\tint endIndex = end.getIndex();\n\t\t\tString lineTag = line.getTag();\n\t\t\tif (lineTag == null) continue;\n\t\t\tElement el = (Element)lineTagToElMap.get(lineTag);\n\t\t\tif (el == null) continue;\n\t\t\tlineTagsFound.add(lineTag);\n\t\t\tTextLine translationLine = new BuildParagraph(el, \n\t\t\t\tTextParams.ROMAN,\n\t\t\t\tTextParams.TRANSLATED_LINE_FONT_SIZE);\n\t\t\tTextLine primaryLine = primaryLines[endIndex];\n\t\t\tint primaryIndentation = primaryLine.getIndentation();\n\t\t\ttranslationLine.setIndentation(primaryIndentation +\n\t\t\t\tTextParams.TRANSLATION_INDENTATION);\n\t\t\ttranslationLines[endIndex] = translationLine;\n\t\t\tnumTranslatedLines++;\n\t\t}\n\t\tif (numTranslatedLines == 0) return;\n\t\tText translation = new Text();\n\t\ttranslation.setCollapseBlankLines(false);\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tTextLine translationLine = translationLines[i];\n\t\t\tif (translationLine == null) {\n\t\t\t\ttranslation.appendBlankLine();\n\t\t\t} else {\n\t\t\t\ttranslation.appendLine(translationLine);\n\t\t\t}\n\t\t}\n\t\ttranslation.finalize();\n\t\tpm.begin();\n\t\tTextWrapper translationWrapper = new TextWrapper(translation);\n\t\tpm.save(translationWrapper);\n\t\tpart.addTranslation(translationTag, translationWrapper);\n\t\tpm.commit();\n\t}", "private void drawText(Graphics2D g2)\n\t{\n\t\tfinal int PADDING = 5;\n\t\tfinal Rectangle bounds = getBounds();\n\t\tfinal String[] texts = getText().split(\"\\\\ \");\n\n\t\tfinal Font effectiveFont = font.deriveFont(font.getSize() * parent.getZoom());\n\n\t\tfinal FontMetrics metrics = g2.getFontMetrics(effectiveFont);\n\n\t\tfinal int hgt = metrics.getHeight();\n\t\tint adv, offsetY = bounds.y + PADDING + hgt, offsetX = PADDING;\n\t\tg2.setFont(effectiveFont);\n\n\t\tfor (final String text2 : texts)\n\t\t{\n\t\t\tfinal String currentText = text2 + \" \";\n\t\t\tadv = metrics.stringWidth(currentText);\n\n\t\t\tif (offsetX + adv > bounds.width - PADDING * 2)\n\t\t\t{\n\t\t\t\toffsetY += hgt; // new line\n\t\t\t\toffsetX = PADDING;\n\t\t\t}\n\n\t\t\tg2.drawString(currentText, bounds.x + offsetX, offsetY);\n\t\t\toffsetX += adv;\n\t\t}\n\t}", "private String getFinalText(Unit units, int lowerBound, int upperBound) {\n if (shouldUseUpToFormat(lowerBound)) return useUpToFormat(units, upperBound);\n return useRangeFormat(units, lowerBound, upperBound);\n }", "private String getFitText(String text, float width, Paint paint) {\r\n String newText = text;\r\n int length = text.length();\r\n int diff = 0;\r\n while (paint.measureText(newText) > width && diff < length) {\r\n diff++;\r\n newText = text.substring(0, length - diff) + \"...\";\r\n }\r\n if (diff == length) {\r\n newText = \"...\";\r\n }\r\n return newText;\r\n }", "protected Text getText()\r\n\t{\r\n\t\treturn text;\r\n\t}", "@Override\n public void afterTextChanged(Editable s) {\n outputBasedOnText(s);\n }", "private void homeTitles() {\n String udata = \"B U I L D M A N\";\n SpannableString content = new SpannableString(udata);\n content.setSpan(new UnderlineSpan(), 0, udata.length(), 0);\n mBuilder_txv.setText(content);\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "public ArrayList<String> makeSentences(String text) {\n \t\t/*\n \t\t * Quick check so we're not trying to split up an empty\n \t\t * String. This only happens right before the user types\n \t\t * at the end of a document and we don't have anything to\n \t\t * split, so return.\n \t\t */\n \t\tif (text.equals(\"\")) {\n \t\t\tArrayList<String> sents = new ArrayList<String>();\n \t\t\tsents.add(\"\");\n \t\t\treturn sents;\n \t\t}\n \t\t\n \t\t/**\n \t\t * Because the eosTracker isn't initialized until the TaggedDocument is,\n \t\t * it won't be ready until near the end of DocumentProcessor, in which\n \t\t * case we want to set it to the correct\n \t\t */\n \t\tthis.eosTracker = main.editorDriver.taggedDoc.eosTracker;\n \t\tthis.editorDriver = main.editorDriver;\n \t\t\n \t\tArrayList<String> sents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tArrayList<String> finalSents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tboolean mergeNext = false;\n \t\tboolean mergeWithLast = false;\n \t\tboolean forceNoMerge = false;\n \t\tint currentStart = 1;\n \t\tint currentStop = 0;\n \t\tString temp;\n \n \t\t/**\n \t\t * replace unicode format characters that will ruin the regular\n \t\t * expressions (because non-printable characters in the document still\n \t\t * take up indices, but you won't know they're there untill you\n \t\t * \"arrow\" though the document and have to hit the same arrow twice to\n \t\t * move past a certain point. Note that we must use \"Cf\" rather than\n \t\t * \"C\". If we use \"C\" or \"Cc\" (which includes control characters), we\n \t\t * remove our newline characters and this screws up the document. \"Cf\"\n \t\t * is \"other, format\". \"Cc\" is \"other, control\". Using \"C\" will match\n \t\t * both of them.\n \t\t */\n \t\ttext = text.replaceAll(\"\\u201C\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\u201D\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\\\p{Cf}\",\"\");\n \n \t\tint lenText = text.length();\n \t\tint index = 0;\n \t\tint buffer = editorDriver.sentIndices[0];\n \t\tString safeString = \"\";\n \t\tMatcher abbreviationFinder = ABBREVIATIONS_PATTERN.matcher(text);\n \t\t\n \t\t//================ SEARCHING FOR ABBREVIATIONS ================\n \t\twhile (index < lenText-1 && abbreviationFinder.find(index)) {\n \t\t\tindex = abbreviationFinder.start();\n \t\t\t\n \t\t\ttry {\n \t\t\t\tint abbrevLength = index;\n \t\t\t\twhile (text.charAt(abbrevLength) != ' ') {\n \t\t\t\t\tabbrevLength--;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (ABBREVIATIONS.contains(text.substring(abbrevLength+1, index+1))) {\n \t\t\t\t\teosTracker.setIgnore(index+buffer, true);\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \t\t\t\n \t\t\tindex++;\n \t\t}\t\t\n \t\t\n \t\tMatcher sent = EOS_chars.matcher(text);\n \t\tboolean foundEOS = sent.find(currentStart); // xxx TODO xxx take this EOS character, and if not in quotes, swap it for a permanent replacement, and create and add an EOS to the calling TaggedDocument's eosTracker.\n \t\t\n \t\t/*\n \t\t * We want to check and make sure that the EOS character (if one was found) is not supposed to be ignored. If it is, we will act like we did not\n \t\t * find it. If there are multiple sentences with multiple EOS characters passed it will go through each to check, foundEOS will only be true if\n \t\t * an EOS exists in \"text\" that would normally be an EOS character and is not set to be ignored.\n \t\t */\n \t\t\n \t\tindex = 0;\n \t\tif (foundEOS) {\t\n \t\t\ttry {\n \t\t\t\twhile (index < lenText-1 && sent.find(index)) {\n \t\t\t\t\tindex = sent.start();\n \t\t\t\t\tif (!eosTracker.sentenceEndAtIndex(index+buffer)) {\n \t\t\t\t\t\tfoundEOS = false;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tfoundEOS = true;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tindex++;\n \t\t\t\t}\n \t\t\t} catch (IllegalStateException e) {}\n \t\t}\n \t\t//We need to reset the Matcher for the code below\n \t\tsent = EOS_chars.matcher(text);\n \t\tsent.find(currentStart);\n \t\t\n \t\tMatcher sentEnd;\n \t\tMatcher citationFinder;\n \t\tboolean hasCitation = false;\n \t\tint charNum = 0;\n \t\tint lenTemp = 0;\n \t\tint lastQuoteAt = 0;\n \t\tint lastParenAt = 0;\n \t\tboolean foundQuote = false;\n \t\tboolean foundParentheses = false;\n \t\tboolean isSentence;\n \t\tboolean foundAtLeastOneEOS = foundEOS;\n \t\t\n \t\t/**\n \t\t * Needed otherwise when the user has text like below:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two. This is the last sentence.\n \t\t * and they begin to delete the EOS character as such:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two This is the last sentence.\n \t\t * Everything gets screwed up. This is because the operations below operate as expected only when there actually is an EOS character\n \t\t * at the end of the text, it expects it there in order to function properly. Now usually if there is no EOS character at the end it wouldn't\n \t\t * matter since the while loop and !foundAtLeastOneEOS conditional are executed properly, BUT as you can see the quotes, or more notably the EOS character inside\n \t\t * the quotes, triggers this initial test and thus the operation breaks. This is here just to make sure that does not happen.\n \t\t */\n \t\tString trimmedText = text.trim();\n \t\tint trimmedTextLength = trimmedText.length();\n \n \t\t//We want to make sure that if there is an EOS character at the end that it is not supposed to be ignored\n \t\tboolean EOSAtSentenceEnd = true;\n \t\tif (trimmedTextLength != 0) {\n \t\t\tEOSAtSentenceEnd = EOS.contains(trimmedText.substring(trimmedTextLength-1, trimmedTextLength)) && eosTracker.sentenceEndAtIndex(editorDriver.sentIndices[1]-1);\n \t\t} else {\n \t\t\tEOSAtSentenceEnd = false;\n \t\t}\n \t\t\n \t\t//Needed so that if we are deleting abbreviations like \"Ph.D.\" this is not triggered.\n \t\tif (!EOSAtSentenceEnd && (editorDriver.taggedDoc.watchForEOS == -1))\n \t\t\tEOSAtSentenceEnd = true;\n \n \t\twhile (foundEOS == true) {\n \t\t\tcurrentStop = sent.end();\n \t\t\t\n \t\t\t//We want to make sure currentStop skips over ignored EOS characters and stops only when we hit a true EOS character\n \t\t\ttry {\n \t\t\t\twhile (!eosTracker.sentenceEndAtIndex(currentStop+buffer-1) && currentStop != lenText) {\n \t\t\t\t\tsent.find(currentStop+1);\n \t\t\t\t\tcurrentStop = sent.end();\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \n \t\t\ttemp = text.substring(currentStart-1,currentStop);\n \t\t\tlenTemp = temp.length();\n \t\t\tlastQuoteAt = 0;\n \t\t\tlastParenAt = 0;\n \t\t\tfoundQuote = false;\n \t\t\tfoundParentheses = false;\n \t\t\t\n \t\t\tfor(charNum = 0; charNum < lenTemp; charNum++){\n \t\t\t\tif (temp.charAt(charNum) == '\\\"') {\n \t\t\t\t\tlastQuoteAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundQuote == true)\n \t\t\t\t\t\tfoundQuote = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundQuote = true;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (temp.charAt(charNum) == '(') {\n \t\t\t\t\tlastParenAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundParentheses)\n \t\t\t\t\t\tfoundParentheses = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundParentheses = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundQuote == true && ((temp.indexOf(\"\\\"\",lastQuoteAt+1)) == -1)) { // then we found an EOS character that shouldn't split a sentence because it's within an open quote.\n \t\t\t\tif ((currentStop = text.indexOf(\"\\\"\",currentStart +lastQuoteAt+1)) == -1) {\n \t\t\t\t\tcurrentStop = text.length(); // if we can't find a closing quote in the rest of the input text, then we assume the author forgot to put a closing quote, and act like it's at the end of the input text.\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tcurrentStop +=1;\n \t\t\t\t\tmergeNext=true;// the EOS character we are looking for is not in this section of text (section being defined as a substring of 'text' between two EOS characters.)\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\n \t\t\tif (foundParentheses && ((temp.indexOf(\")\", lastParenAt+1)) == -1)) {\n \t\t\t\tif ((currentStop = text.indexOf(\")\", currentStart + lastParenAt + 1)) == -1)\n \t\t\t\t\tcurrentStop = text.length();\n \t\t\t\telse {\n \t\t\t\t\tcurrentStop += 1;\n \t\t\t\t\tmergeNext = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \n \t\t\tif (foundQuote) {\n \t\t\t\tsentEnd = SENTENCE_QUOTE.matcher(text);\t\n \t\t\t\tisSentence = sentEnd.find(currentStop-2); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \n \t\t\t\tif (isSentence == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\t\tcurrentStop = text.indexOf(\"\\\"\",sentEnd.start())+1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundParentheses) {\n \t\t\t\tsentEnd = SENTENCE_PARENTHESES.matcher(text);\n \t\t\t\tisSentence = sentEnd.find(currentStop-2);\n \t\t\t\t\n \t\t\t\tif (isSentence == true) {\n \t\t\t\t\tcurrentStop = text.indexOf(\")\", sentEnd.start()) + 1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1, currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// now check to see if there is a CITATION after the sentence (doesn't just apply to quotes due to paraphrasing)\n \t\t\t// The rule -- at least as of now -- is if after the EOS mark there is a set of parenthesis containing either one word (name) or a name and numbers (name 123) || (123 name) || (123-456 name) || (name 123-456) || etc..\n \t\t\tcitationFinder = CITATION.matcher(text.substring(currentStop));\t\n \t\t\thasCitation = citationFinder.find(); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \t\t\t\n \t\t\tif (hasCitation == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\tcurrentStop = text.indexOf(\")\",citationFinder.start()+currentStop)+1;\n \t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\tmergeNext = false;\n \t\t\t}\t\n \t\t\t\n \t\t\tif (mergeWithLast) {\n \t\t\t\tmergeWithLast=false;\n \t\t\t\tString prev=sents.remove(sents.size()-1);\n \t\t\t\tsafeString=prev+safeString;\n \t\t\t}\n \t\t\t\n \t\t\tif (mergeNext && !forceNoMerge) {//makes the merge happen on the next pass through\n \t\t\t\tmergeNext=false;\n \t\t\t\tmergeWithLast=true;\n \t\t\t} else {\n \t\t\t\tforceNoMerge = false;\n \t\t\t\tfinalSents.add(safeString);\n \t\t\t}\n \t\t\n \t\t\tsents.add(safeString);\n \t\t\t\n \t\t\t//// xxx xxx xxx return the safeString_subbedEOS too!!!!\n \t\t\tif (currentStart < 0 || currentStop < 0) {\n \t\t\t\tLogger.logln(NAME+\"Something went really wrong making sentence tokens.\", LogOut.STDERR);\n \t\t\t\tErrorHandler.fatalProcessingError(null);\n \t\t\t}\n \n \t\t\tcurrentStart = currentStop+1;\n \t\t\tif (currentStart >= lenText) {\n \t\t\t\tfoundEOS = false;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tfoundEOS = sent.find(currentStart);\n \t\t}\n \n \t\tif (!foundAtLeastOneEOS || !EOSAtSentenceEnd) {\n \t\t\tArrayList<String> wrapper = new ArrayList<String>(1);\n \t\t\twrapper.add(text);\n \t\t\treturn wrapper;\n \t\t}\n \t\t\n \t\treturn finalSents;\n \t}", "private String cleanupText(String text){\n return text.replaceAll(\"http[s]*[:](//)[^ ]+\", \"URL\");\n }", "public abstract String getFormattedContent();", "public static String transformPlainText(String text) {\r\n\t\t// url auto-linking\r\n\t\ttext = text.replaceAll(\"((http|https)://[0-9A-Za-z-_=\\\\?\\\\.\\\\$#&/]*)\", \"<a href=\\\"$1\\\">$1</a>\");\r\n\t\tString html = \"<pre>\" + text + \"</pre>\";\r\n\t\treturn html;\r\n\t}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "@Override\n protected String[] getText() {\n return new String[] {\n MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.title\").getUnformattedText(),\n MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.description.owner\").getUnformattedText() + \" \" + owner.getPlayerName(),\n MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.description.price\").getUnformattedText() + price,\n restricted ? MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.description.restricted\").getUnformattedText() : \"\"\n };\n }", "public abstract SpannableString getText(long presentationTimeUs);", "protected void redoTextChange() {\n \t\t\ttry {\n \t\t\t\tif (fDocumentUndoManager.fDocument instanceof IDocumentExtension4)\n \t\t\t\t\t((IDocumentExtension4) fDocumentUndoManager.fDocument).replace(fStart, fEnd - fStart, fText, fRedoModificationStamp);\n \t\t\t\telse\n \t\t\t\t\tfDocumentUndoManager.fDocument.replace(fStart, fEnd - fStart, fText);\n \t\t\t} catch (BadLocationException x) {\n \t\t\t}\n \t\t}", "void wrappedText(final int count);", "String text();", "private void m25387a(Canvas canvas, String str, int i, int i2) {\n canvas.drawText(str, (((float) i) - this.f20604O.measureText(str)) * 0.5f, (((float) i2) * 0.5f) - ((this.f20604O.ascent() + this.f20604O.descent()) * 0.5f), this.f20604O);\n }", "static String correctParagraph(String paragraph) {\n\n\t\t\tString newText = paragraph.replaceAll(\"\\\\s{2,}+\", \" \");\n\n\t\t\tnewText = newText.replaceAll(\"\\\\s+,\", \",\");\n\t\t\tnewText = newText.replaceAll(\"\\\\s+\\\\.\", \".\");\n\n\n\t\t\tString firstLetter = newText.substring(0, 1).toUpperCase();\n\t\t\tnewText = firstLetter + newText.substring(1);\n\n\t\t\tString[] sentences = newText.split(\"\\\\.\");\n\t\t\tfor(int i = 0; i < sentences.length; i++){\n\t\t\t\tString temp = sentences[i].trim();\n\t\t\t\tfirstLetter = temp.substring(0, 1).toUpperCase();\n\t\t\t\tsentences[i] = firstLetter + temp.substring(1);\n\t\t\t}\n\t\t\tStringBuilder newParagraph = new StringBuilder(sentences[0]);\n\t\t\tfor(int i = 1; i < sentences.length; i++){\n\t\t\t\tnewParagraph.append(\". \").append(sentences[i]);\n\t\t\t}\n\t\t\tnewText = newParagraph.append(\".\").toString();\n\n\t\t\treturn newText;\n\t\t}", "void baInfo(String text);", "String processing();", "java.lang.String getNewSentence();", "private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }", "abstract public String asText(boolean pretty);", "private Text createText(String text, int offset) {\n\t\tText res = new Text(text);\n\t\tres.setFont(new Font(\"Minecraftia\", 60));\n\t\tres.setFill(Color.YELLOW);\n\t\tres.getTransforms().add(new Rotate(-50, 300, 200, 20, Rotate.X_AXIS));\n\t\tres.setX(canvas.getWidth() / 2);\n\t\tres.setY(canvas.getHeight() / 2 + offset);\n\t\tres.setId(\"handCursor\");\n\t\tres.setOnMouseEntered(e -> {\n\t\t\tres.setText(\"> \" + res.getText() + \" <\");\n\t\t});\n\t\tres.setOnMouseExited(e -> {\n\t\t\tres.setText(res.getText().replaceAll(\"[<> ]\", \"\"));\n\t\t});\n\t\treturn res;\n\t}", "public void switchClickableText(int offset, String text) {\r\n\t\ttry {\r\n\t\t\tdocument.remove(offset, text.length());\r\n\t\t\tdocument.insertString(offset, text, styles.getOutputFolder());\r\n\t\t}\r\n\t\tcatch (BadLocationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected Text getText() {\n \t\treturn text;\n \t}", "protected Text text(String content){\n\t\treturn doc.createTextNode(content);\n\t}", "@Override\n public void showText(String s){\n }", "@Override\n\tpublic void characters(String text) {\n\t\t\n\t}" ]
[ "0.6934362", "0.68846", "0.64447993", "0.62179506", "0.61957705", "0.6034004", "0.60154736", "0.59981835", "0.5977695", "0.5964106", "0.59496635", "0.59480846", "0.5885767", "0.58716494", "0.58553237", "0.58540326", "0.5844904", "0.58252335", "0.58227026", "0.5822053", "0.581753", "0.581753", "0.58054656", "0.58004993", "0.57863605", "0.5784346", "0.5777611", "0.5775131", "0.5772179", "0.57717574", "0.576912", "0.5762308", "0.5762308", "0.5762308", "0.5762308", "0.5762308", "0.5762308", "0.5762308", "0.5762308", "0.57488716", "0.57488286", "0.5721605", "0.5709173", "0.5708642", "0.57014805", "0.5701371", "0.5697453", "0.5697015", "0.569415", "0.56843585", "0.56832075", "0.5682622", "0.5671144", "0.5668593", "0.5663722", "0.565588", "0.5648205", "0.5640696", "0.56300783", "0.56198335", "0.5610087", "0.5610087", "0.5610087", "0.5610087", "0.5608764", "0.560731", "0.56047374", "0.5600728", "0.5575818", "0.5557318", "0.555384", "0.5549058", "0.5539143", "0.5532894", "0.5526652", "0.5516727", "0.5514868", "0.5513155", "0.5510222", "0.5510058", "0.55091774", "0.5508243", "0.5505376", "0.550367", "0.54924667", "0.5490565", "0.54866076", "0.54852843", "0.54841304", "0.54829526", "0.5480805", "0.5476926", "0.5474913", "0.54744595", "0.54741836", "0.54595685", "0.54575026", "0.5454522", "0.54387283", "0.5437064", "0.5434883" ]
0.0
-1
Method generates a test case with given parameters. For example: if the parameters are "N=100" and "Group=RND" the method should generate a "random" test case of size 100. This method is project dependant and is used a) as a helper method for the getTestCase() method and b) as a method called by the ALGator's evaluate process to generate test cases for algorithm inspection and evaluation.
public AbstractTestCase generateTestCase(String type, Variables generatingParameters) { switch (type) { case ETestCase.defaultGeneratorType: return testCaseGenerator (generatingParameters); case "TYPE1" : return testCaseGenerator1(generatingParameters); case "TYPE2" : return testCaseGenerator2(generatingParameters); case "TYPE3" : return testCaseGenerator3(generatingParameters); case "TYPE4" : return testCaseGenerator4(generatingParameters); case "TYPE5" : return testCaseGenerator5(generatingParameters); case "TYPE6" : return testCaseGenerator6(generatingParameters); case "TYPE7" : return testCaseGenerator7(generatingParameters); case "TYPE8" : return testCaseGenerator8(generatingParameters); case "TYPE9" : return testCaseGenerator9(generatingParameters); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void generate_test_case(int Index, StringBuffer Code, DataType[] ParamTypes, DataType ReturnType, TestCase Case)\n {\n int I;\n String[] Inputs = Case.getInput();\n String Output = Case.getOutput();\n String Desc = ReturnType.getDescription();\n\n /*\n * Generate code for setting up individual test cases\n * and calling the method with these parameters.\n */\n Code.append(\"\\t\\t// test_case_\" + Index + \"\\n\");\n Code.append(\"\\t\\tif ((Case == -1) || (Case == n)){\\n\");\n\n // Generate each input variable separately\n String additional = \"\";\n for (I = 0; I < Inputs.length; ++I)\n additional += generate_parameter(I, Code, ParamTypes[I], Inputs[I]);\n // next\n\n // Generate the output variable as the last variable\n additional += generate_parameter(Inputs.length, Code, ReturnType, Output);\n\n Code.append(\"\\n\" + additional);\n\n Code.append(\"\\t\\t\\tverify_case(n, Arg\" + Inputs.length + \", \" + m_Problem.getMethodName() + \"(\");\n\n // Generate the function call list\n for (I = 0; I < Inputs.length; ++I)\n {\n Code.append(\"Arg\" + I);\n\n if (I < (Inputs.length - 1))\n Code.append(\", \");\n // end if\n }\n // next\n\n Code.append(\"));\\n\\t\\t}\\n\\t\\tn++;\\n\\n\");\n }", "private void generate_test_code()\n {\n int I;\n DataType[] ParamTypes = m_Problem.getParamTypes();\n DataType ReturnType = m_Problem.getReturnType();\n TestCase[] Cases = m_Problem.getTestCases();\n StringBuffer Code = new StringBuffer();\n\n Code.append(\"private:\\n\");\n\n // Generate the vector output function\n Code.append(\"\\ttemplate <typename T> string print_array(const vector<T> &V) { ostringstream os; os << \\\"{ \\\"; for (typename vector<T>::const_iterator iter = V.begin(); iter != V.end(); ++iter) os << \\'\\\\\\\"\\' << *iter << \\\"\\\\\\\",\\\"; os << \\\" }\\\"; return os.str(); }\\n\\n\");\n\n // Generate the verification function\n generate_verification_code(Code, ReturnType);\n\n // Generate the individual test cases\n Code.append(\"\\n\");\n\n /*\n * Generate the test wrapper function that can call\n * either all or individual test cases. (-1 for all)\n */\n Code.append(\"public:\\n\");\n Code.append(\"\\tvoid run_test(int Case) { \\n\");\n Code.append(\"\\t\\tint n = 0;\\n\\n\");\n for (I = 0; I < Cases.length; ++I)\n generate_test_case(I, Code, ParamTypes, ReturnType, Cases[I]);\n // next\n Code.append(\"\\t}\\n\");\n\n // Insert the cut tags\n Code.insert(0, k_BEGINCUT);\n Code.append(k_ENDCUT);\n\n m_Tags.put(k_TESTCODE, Code.toString());\n }", "private static void testgen(String[] args) {\n JSONParser parser = new JSONParser();\n TestgenOptions options = parseTestgenOptions(args);\n CLI.setVerbosity(options);\n if (options.numTasks < 1) {\n API.throwCLIError(\"Invalid number of tasks provided (-n): \" + options.numTasks);\n }\n\n Map<String, Object> objects;\n if (!options.inFile.isEmpty()) {\n objects = parser.parse(options.inFile, true);\n } else if (!options.inString.isEmpty()) {\n objects = parser.parse(options.inString, false);\n } else {\n API.throwCLIError(\"No input JSON provided (-i)\");\n return;\n }\n\n if (objects.get(\"initialState\") == null || objects.get(\"goalState\") == null) {\n API.throwCLIError(\"Both an initial state and a goal state must be provided.\");\n }\n\n TestCaseGenerator generator = new TestCaseGenerator(\n (SystemState) objects.get(\"initialState\"),\n (GoalState) objects.get(\"goalState\"),\n options.numTasks,\n options.optimalPlan,\n options.output\n );\n\n ArrayList<Task> tasks = generator.generateTestCase();\n ArrayList<Optimization> ops = generator.generateOptimizations();\n try{\n generator.testCaseToJSON(tasks, ops, options.perturbations);\n } catch (IOException e){\n API.throwCLIError(\"Failed to write testCase to JSON\");\n }\n\n }", "@Parameterized.Parameters(name = \"{0}\")\n public static Collection<TestParams> generateTestCases() {\n List<TestParams> result = new ArrayList<>();\n\n result.add(new TestParams(\n new Communicator.Message(Communicator.MESSAGE_CALL_AUDIO_CODEC,\n Communicator.AUDIO_CODEC_EVS),\n new RtpHeaderExtension(CALL_STATE_LOCAL_IDENTIFIER,\n new byte[]{0b00010010})));\n result.add(new TestParams(\n new Communicator.Message(Communicator.MESSAGE_CALL_AUDIO_CODEC,\n Communicator.AUDIO_CODEC_AMR_WB),\n new RtpHeaderExtension(CALL_STATE_LOCAL_IDENTIFIER,\n new byte[]{0b00100010})));\n result.add(new TestParams(\n new Communicator.Message(Communicator.MESSAGE_CALL_AUDIO_CODEC,\n Communicator.AUDIO_CODEC_AMR_NB),\n new RtpHeaderExtension(CALL_STATE_LOCAL_IDENTIFIER,\n new byte[]{0b00110010})));\n result.add(new TestParams(\n new Communicator.Message(Communicator.MESSAGE_CALL_RADIO_ACCESS_TYPE,\n Communicator.RADIO_ACCESS_TYPE_LTE),\n new RtpHeaderExtension(CALL_STATE_LOCAL_IDENTIFIER,\n new byte[]{0b00010001})));\n result.add(new TestParams(\n new Communicator.Message(Communicator.MESSAGE_CALL_RADIO_ACCESS_TYPE,\n Communicator.RADIO_ACCESS_TYPE_IWLAN),\n new RtpHeaderExtension(CALL_STATE_LOCAL_IDENTIFIER,\n new byte[]{0b00100001})));\n result.add(new TestParams(\n new Communicator.Message(Communicator.MESSAGE_CALL_RADIO_ACCESS_TYPE,\n Communicator.RADIO_ACCESS_TYPE_NR),\n new RtpHeaderExtension(CALL_STATE_LOCAL_IDENTIFIER,\n new byte[]{0b00110001})));\n result.add(new TestParams(\n new Communicator.Message(Communicator.MESSAGE_DEVICE_BATTERY_STATE,\n Communicator.BATTERY_STATE_LOW),\n new RtpHeaderExtension(DEVICE_STATE_LOCAL_IDENTIFIER,\n new byte[]{0b00000001})));\n result.add(new TestParams(\n new Communicator.Message(Communicator.MESSAGE_DEVICE_BATTERY_STATE,\n Communicator.BATTERY_STATE_GOOD),\n new RtpHeaderExtension(DEVICE_STATE_LOCAL_IDENTIFIER,\n new byte[]{0b00010001})));\n result.add(new TestParams(\n new Communicator.Message(Communicator.MESSAGE_DEVICE_BATTERY_STATE,\n Communicator.BATTERY_STATE_CHARGING),\n new RtpHeaderExtension(DEVICE_STATE_LOCAL_IDENTIFIER,\n new byte[]{0b00110001})));\n result.add(new TestParams(\n new Communicator.Message(Communicator.MESSAGE_DEVICE_NETWORK_COVERAGE,\n Communicator.COVERAGE_POOR),\n new RtpHeaderExtension(DEVICE_STATE_LOCAL_IDENTIFIER,\n new byte[]{0b00000010})));\n result.add(new TestParams(\n new Communicator.Message(Communicator.MESSAGE_DEVICE_NETWORK_COVERAGE,\n Communicator.COVERAGE_GOOD),\n new RtpHeaderExtension(DEVICE_STATE_LOCAL_IDENTIFIER,\n new byte[]{0b00010010})));\n return result;\n }", "public abstract Instances _getTestingFromParams(String params);", "@TestFactory\n Stream<DynamicTest> generateRandomNumberOfTestsFromIterator() {\n Iterator<Integer> inputGenerator = new Iterator<Integer>() {\n\n Random random = new Random();\n int current;\n\n @Override\n public boolean hasNext() {\n current = random.nextInt(100);\n return current % 7 != 0;\n }\n\n @Override\n public Integer next() {\n return current;\n }\n };\n\n // Generates display names like: input:5, input:37, input:85, etc.\n Function<Integer, String> displayNameGenerator = (input) -> \"input:\" + input;\n\n // Executes tests based on the current input value.\n ThrowingConsumer<Integer> testExecutor = (input) -> assertTrue(input % 7 != 0);\n\n // Returns a stream of dynamic tests.\n return DynamicTest.stream(inputGenerator, displayNameGenerator, testExecutor);\n }", "Testcase createTestcase();", "private String generateTestNGTestCasesSkeletonCode(List<TestCaseList> testCases, ProductMaster product, String packageName, String refClassName, String destinationDirectory, int nameSource, String testExecutionEngine, String testStepOption) {\n\t\tJCodeModel codeModel = new JCodeModel();\r\n\t\tString message = null;\r\n\t\ttry {\r\n\t\t\tif (testExecutionEngine == null)\r\n\t\t\t\ttestExecutionEngine = TAFConstants.TESTENGINE_SEETEST;\r\n\t\t\tlog.info(\"Test Execution Engine : \" + testExecutionEngine);\r\n\t\t\t\t\r\n\t\t\tJClass testNGAfterMethodReference = null;\r\n\t\t\tJClass testNGBeforeMethodReference = null;\r\n\t\t\tJClass testNGTestReference = null;\r\n\t\t\ttestNGAfterMethodReference = codeModel.ref(\"org.testng.annotations.AfterMethod\");\r\n\t\t\ttestNGBeforeMethodReference = codeModel.ref(\"org.testng.annotations.BeforeMethod\");\r\n\t\t\ttestNGTestReference = codeModel.ref(\"org.testng.annotations.Test\");\r\n\r\n\t\t\tfor (TestCaseList testCase : testCases) {\r\n\r\n\t\t\t\t// 1. Create the class for the test case\r\n\t\t\t\t//String testCaseName = getTestCaseClassName(testCase, nameSource);\r\n\t\t\t\t//String testCaseName = null;\r\n\t\t\t\tString testCaseName = null;\r\n\t\t\t\tString classPackageName = null;\r\n\t\t\t\tif (testCase.getTestCaseScriptFileName() == null || testCase.getTestCaseScriptFileName().trim().isEmpty()) {\r\n\t\t\t\t\ttestCaseName = ScriptGeneratorUtilities.getTestCaseClassName(testCase.getTestCaseName(), testCase.getTestCaseId(), testCase.getTestCaseCode(), nameSource);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttestCaseName = testCase.getTestCaseScriptFileName();\r\n\t\t\t\t\tif(testCaseName.contains(\".java\")){\r\n\t\t\t\t\t\ttestCaseName = testCaseName.replace(testCaseName.substring(testCaseName.lastIndexOf(\".\")),\"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (testCase.getTestCaseScriptQualifiedName() == null || testCase.getTestCaseScriptQualifiedName().trim().isEmpty()) {\r\n\t\t\t\t\tclassPackageName = packageName;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tclassPackageName = testCase.getTestCaseScriptQualifiedName();\r\n\t\t\t\t}\r\n\t\t\t\tJDefinedClass testCaseClass = codeModel._class(classPackageName + \".\" + testCaseName);\r\n\t\t\t\tJDocComment classComment = testCaseClass.javadoc();\r\n\t\t\t\tString javadocCommentClass = \"Automation Script for Testcase : \" + testCase.getTestCaseName()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Product : \" + product.getProductDescription()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Testcase ID \t\t: \" + testCase.getTestCaseId()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Testcase Code\t\t: \" + testCase.getTestCaseCode()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Description \t\t: \" + testCase.getTestCaseDescription()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Test case type \t: \" + testCase.getTestCaseType()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Script Type \t\t: \" + TAFConstants.TESTSCRIPT_TYPE_TESTNG\r\n\t\t\t\t\t\t+ \"\\n\" + \"Test Execution Engine \t: \" + testExecutionEngine\r\n\t\t\t\t\t\t+ \"\\n\" + \"Code generated by TAF on \t: \" + new Date(System.currentTimeMillis());\r\n\t\t\t\tclassComment.append(javadocCommentClass);\r\n\t\t\t\t\r\n\t\t\t\ttestCaseClass = addClassVariablesForTestCaseClass(codeModel, testCaseClass, testExecutionEngine);\r\n\t\t\t\t\r\n\t\t\t\t// 4.a Add the setup method\r\n\t\t\t\tJMethod setUpMethod = testCaseClass.method(JMod.PUBLIC, void.class, \"setUp\");\r\n\t\t\t\tJDocComment methodComment1 = setUpMethod.javadoc();\r\n\t\t\t\tString commentString = \"Setup method for testcase\";\r\n\t\t\t\tmethodComment1.append(commentString);\r\n\t\t\t\tsetUpMethod = constructSetUpMethodForTestCase(setUpMethod, testExecutionEngine, refClassName, testCaseName);\r\n\t\t\t\tsetUpMethod.annotate(testNGBeforeMethodReference);\r\n\t\t\t\t\r\n\t\t\t\tJMethod tearDownMethod = testCaseClass.method(JMod.PUBLIC, void.class, \"tearDown\");\r\n\t\t\t\tJDocComment methodComment2 = tearDownMethod.javadoc();\r\n\t\t\t\tcommentString = \"Teardown method for the testcase\";\r\n\t\t\t\tmethodComment2.append(commentString);\r\n\t\t\t\ttearDownMethod = constructTearDownMethodForTestCase(setUpMethod, testExecutionEngine);\r\n\t\t\t\ttearDownMethod.annotate(testNGAfterMethodReference);\r\n\t\t\t\t\r\n\t\t\t\tif (testStepOption == null)\r\n\t\t\t\t\ttestStepOption = \"SINGLE_METHOD\";\r\n\t\t\t\tList<TestCaseStepsList> testSteps = testCaseService.listTestCaseSteps(testCase.getTestCaseId());\r\n\t\t\t\tif (testSteps == null || testSteps.isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"No steps in the testcase : \" + testCaseName);\r\n\t\t\t\t\tJMethod testCaseMethod = testCaseClass.method(JMod.PUBLIC, void.class, testCaseName + \"_Test\");\r\n\t\t\t\t\ttestCaseMethod.annotate(testNGTestReference);\r\n\t\t\t\t\ttestCaseMethod = constructDefaultTestCaseMethodForTestCase(testCaseMethod, testExecutionEngine, testCase);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(testStepOption.contains(\"SEPARATE_METHOD\")) {\r\n\t\t\t\t\t\tfor (TestCaseStepsList testStep : testSteps) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString testStepName = ScriptGeneratorUtilities.getTestStepMethodName(testCaseName, testStep.getTestStepName(), testStep.getTestStepId(), testStep.getTestStepCode(), 1 );\r\n\t\t\t\t\t\t\tJMethod testStepMethod = testCaseClass.method(JMod.PUBLIC, void.class, testStepName);\r\n\t\t\t\t\t\t\ttestStepMethod.annotate(testNGTestReference);\r\n\t\t\t\t\t\t\ttestStepMethod = constructTestStepMethodForTestCase(testStepMethod, testExecutionEngine, refClassName, testCaseName, testStepName, testStep);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tJMethod singleTestStepMethod = testCaseClass.method(JMod.PUBLIC, void.class, testCaseName + \"_Test\");\r\n\t\t\t\t\t\tsingleTestStepMethod.annotate(testNGTestReference);\r\n\t\t\t\t\t\tfor (TestCaseStepsList testStep : testSteps) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString testStepName = ScriptGeneratorUtilities.getTestStepMethodName(testCaseName, testStep.getTestStepName(), testStep.getTestStepId(), testStep.getTestStepCode(), 1 );\r\n\t\t\t\t\t\t\tsingleTestStepMethod = addTestStepForSingleTestStepMethodForTestCase(singleTestStepMethod, testExecutionEngine, refClassName, testCaseName, testStepName, testStep);\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\tFile sourceFile = new File(destinationDirectory);\r\n\t\t\t\tif (!sourceFile.exists()) {\r\n\t\t\t\t\tlog.info(\"Created Directory for source code generation : \" + destinationDirectory);\r\n\t\t\t\t\tsourceFile.mkdirs();\r\n\t\t\t\t}\r\n\t\t\t\tcodeModel.build(sourceFile);\r\n\t\t\t\tmessage = sourceFile.getAbsolutePath() + DEFAULT_PACKAGE_NAME_FOLDER + File.separator + testCaseName + \".java\";\r\n\t\t\t}\r\n\t\t} catch (JClassAlreadyExistsException e) {\r\n\t\t\tlog.error(\"Unable to generate testcase ref source code class\", e);\r\n\t\t\tmessage = \"Failed : Unable to generate testcase ref source code class\";\r\n\t\t} catch (IOException io) {\r\n\t\t\tlog.error(\"Unable to create file in file system\", io);\r\n\t\t\tmessage = \"Failed : Unable to create file in file system\";\r\n\t\t}\r\n\t\t\r\n\t\tlog.debug(\"Success : Generated Testcases source code framework.\" );\r\n\t\treturn message;\r\n\r\n\t}", "@Test\n public void MyTest() {\n System.out.println(\"Parameterized Number is : \" + inputNumber);\n System.out.println(\"Expected Result is : \" + expectedResult);\n }", "public void ExecuteTests() throws IOException{\r\n\t\t\r\n\t\tAutomationSuiteRunnerImpl testcaseinfo = new AutomationSuiteRunnerImpl();\r\n\t\ttestcaseinfo.GetTestCaseInformation();\r\n\t\tTestsBrowserList = testcaseinfo.getTestsBrowserList();\r\n\t\tTestsClassesList = testcaseinfo.getTestsClassesList();\r\n\t\tClassesMethodList = testcaseinfo.getClassesMethodList();\r\n\t\tTestsParamList = testcaseinfo.getTestsParamList();\r\n\t\tTestNGConfig = testcaseinfo.getTestNGConfig();\r\n\t\tList<XmlSuite> suites = new ArrayList<XmlSuite>();\r\n\t\t\r\n\t\tlogger.info(\"Generating TestNG.xml file\");\r\n\t\t\r\n\t\t/**\r\n\t\t * The below code creates testNG xmlSuite and sets the configuration\r\n\t\t */\r\n\t\tXmlSuite suite = new XmlSuite();\r\n\t\tsuite.setName(TestNGConfig.get(\"AutomationSuiteName\"));\r\n\t\t\r\n\t\tif(TestNGConfig.get(\"ParallelMode\").toString().equalsIgnoreCase(\"True\")) {\r\n\t\t\tsuite.setParallel(XmlSuite.ParallelMode.TESTS);\r\n\t\t\tsuite.setThreadCount(Integer.parseInt(TestNGConfig.get(\"ThreadCount\")));\r\n\t\t}\r\n\t\telse {\r\n\r\n\t\t\tsuite.setParallel(XmlSuite.ParallelMode.NONE);\r\n\t\t}\r\n\t\t\r\n\t\tsuite.setVerbose(Integer.parseInt(TestNGConfig.get(\"Verbose\")));\r\n\t\tif(TestNGConfig.get(\"PreserveOrder\").toString().equalsIgnoreCase(\"True\"))\r\n\t\t\tsuite.setPreserveOrder(Boolean.TRUE);\r\n\t\telse \r\n\t\t\tsuite.setPreserveOrder(Boolean.FALSE);\r\n\t\t\r\n\t\t\r\n\t\t//suite.addListener(\"frameworkcore.ReportingClass.ListenersImpl\");\r\n\t\t\r\n\t\t/**\r\n\t\t * The below code assigns the Test classes/mathods/parameters to the TestNG Suite\r\n\t\t */\r\n\t\tfor (String key : TestsBrowserList.keySet()){\r\n\t\t\tArrayList<XmlClass> classes = new ArrayList<XmlClass>();\r\n\t\t\tXmlTest test = new XmlTest(suite);\r\n\t\t\ttest.setName(key.toString());\r\n\t\t\tHashMap<String,String> browserinfo = new HashMap<String,String>();\r\n\t\t\tbrowserinfo.put(\"BrowserName\", TestsBrowserList.get(key).toString());\r\n\t\t\ttest.setParameters(browserinfo);\r\n\t\t\tSetParameters(test);\r\n\t\t\tCollection<String> classvalues = TestsClassesList.get(key);\r\n\t\t\tfor(String testclass : classvalues){\r\n\t\t\t\tXmlClass testClass = new XmlClass();\r\n\t\t testClass.setName(testclass);\r\n\t\t Collection<String> methodvalues = ClassesMethodList.get(testclass);\r\n\t\t ArrayList<XmlInclude> methodsToRun = new ArrayList<XmlInclude>();\r\n\t\t for(String method: methodvalues){\r\n\t\t \tif(method.toLowerCase().contains(\"tag\")||method.toLowerCase().contains(\"ignore\"))\r\n\t\t \t\tlogger.info(\"Method \" + method + \" will not run\" );\r\n\t\t \telse\r\n\t\t \t\tmethodsToRun.add(new XmlInclude(method));\r\n\t\t }\r\n\t\t testClass.setIncludedMethods(methodsToRun);\r\n\t\t \r\n\t\t classes.add(testClass);\r\n\t\t\t}\r\n\t\t\ttest.setXmlClasses(classes);\r\n\t\t}\r\n\t\t\r\n\t\tsuites.add(suite);\r\n\t\t\r\n\t\t/**\r\n\t\t * Writing the TestNG.xml information to a file\r\n\t\t */\r\n\t\t FileWriter writer;\r\n\t\t File TestNGFile = new File(\"TestNG.xml\");\r\n\t\t if(TestNGFile.exists())\t\t\t\t\t\t// Delete TestNG if exists\r\n\t\t\t TestNGFile.delete();\r\n\t\t \r\n\t\t\twriter = new FileWriter(TestNGFile);\r\n\t\t\t writer.write(suite.toXml());\r\n\t\t writer.flush();\r\n\t\t writer.close();\r\n\t\t logger.info(\"TestNG file Generated Successfully\");\r\n\t\t\r\n\t\tTestNG tng = new TestNG();\r\n\t\ttng.setXmlSuites(suites);\r\n\t\ttng.run(); \r\n\t\t\r\n\t}", "private String generateJUnitTestCasesSkeletonCode(List<TestCaseList> testCases, ProductMaster product, String packageName, String refClassName, String destinationDirectory, int nameSource, String testExecutionEngine, String testStepOption) {\n\t\tJCodeModel codeModel = new JCodeModel();\r\n\t\tString message = null;\r\n\t\ttry {\r\n\t\t\tif (testExecutionEngine == null)\r\n\t\t\t\ttestExecutionEngine = TAFConstants.TESTENGINE_SEETEST;\r\n\t\t\tlog.info(\"Test Execution Engine : \" + testExecutionEngine);\r\n\t\t\t\t\r\n\t\t\tJClass junitAfterReference = null;\r\n\t\t\tJClass junitBeforeReference = null;\r\n\t\t\tJClass junitTestReference = null;\r\n\t\t\tJClass junitFixMethodOrderReference = null;\r\n\t\t\tJClass junitMethodSortersReference = null;\r\n\t\t\tjunitAfterReference = codeModel.ref(\"org.junit.After\");\r\n\t\t\tjunitBeforeReference = codeModel.ref(\"org.junit.Before\");\r\n\t\t\tjunitTestReference = codeModel.ref(\"org.junit.Test\");\r\n\t\t\tjunitFixMethodOrderReference = codeModel.ref(\"org.junit.FixMethodOrder\");\r\n\t\t\tjunitMethodSortersReference = codeModel.ref(\"org.junit.runners.MethodSorters\");\r\n\r\n\t\t\tfor (TestCaseList testCase : testCases) {\r\n\r\n\t\t\t\t// 1. Create the class for the test case\r\n\t\t\t\tString testCaseName = null;\r\n\t\t\t\tString classPackageName = null;\r\n\t\t\t\tif (testCase.getTestCaseScriptFileName() == null || testCase.getTestCaseScriptFileName().trim().isEmpty()) {\r\n\t\t\t\t\ttestCaseName = ScriptGeneratorUtilities.getTestCaseClassName(testCase.getTestCaseName(), testCase.getTestCaseId(), testCase.getTestCaseCode(), nameSource);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttestCaseName = testCase.getTestCaseScriptFileName();\r\n\t\t\t\t\tif(testCaseName.contains(\".java\")){\r\n\t\t\t\t\t\ttestCaseName = testCaseName.replace(testCaseName.substring(testCaseName.lastIndexOf(\".\")),\"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (testCase.getTestCaseScriptQualifiedName() == null || testCase.getTestCaseScriptQualifiedName().trim().isEmpty()) {\r\n\t\t\t\t\tclassPackageName = packageName;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tclassPackageName = testCase.getTestCaseScriptQualifiedName();\r\n\t\t\t\t}\r\n\t\t\t\tJDefinedClass testCaseClass = codeModel._class(classPackageName + \".\" + testCaseName);\r\n\t\t\t\tJDocComment classComment = testCaseClass.javadoc();\r\n\t\t\t\tString javadocCommentClass = \"Automation Script for Testcase : \" + testCase.getTestCaseName()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Product \t\t\t: \" + product.getProductDescription()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Testcase ID\t\t: \" + testCase.getTestCaseId()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Testcase Code \t: \" + testCase.getTestCaseCode()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Description \t\t: \" + testCase.getTestCaseDescription()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Test case type \t: \" + testCase.getTestCaseType()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Script Type \t\t: \" + TAFConstants.TESTSCRIPT_TYPE_JUNIT\r\n\t\t\t\t\t\t+ \"\\n\" + \"Test Execution Engine \t: \" + testExecutionEngine\r\n\t\t\t\t\t\t+ \"\\n\" + \"Code generated by TAF on \t: \" + new Date(System.currentTimeMillis());\r\n\t\t\t\tclassComment.append(javadocCommentClass);\r\n\t\t\t\ttestCaseClass.annotate(junitFixMethodOrderReference).param(\"value\", MethodSorters.NAME_ASCENDING);\r\n\r\n\t\t\t\ttestCaseClass = addClassVariablesForTestCaseClass(codeModel, testCaseClass, testExecutionEngine);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (testStepOption == null)\r\n\t\t\t\t\ttestStepOption = \"SINGLE_METHOD\";\r\n\t\t\t\t// 4. Add methods for the test steps of the test case\r\n\t\t\t\t// 4.a Add the setup and tear down methods\r\n\t\t\t\tJMethod setUpMethod = testCaseClass.method(JMod.PUBLIC, void.class, \"setUp\");\r\n\t\t\t\tJDocComment methodComment1 = setUpMethod.javadoc();\r\n\t\t\t\tString commentString = \"Setup method for testcase\";\r\n\t\t\t\tmethodComment1.append(commentString);\r\n\t\t\t\tsetUpMethod = constructSetUpMethodForTestCase(setUpMethod, testExecutionEngine, refClassName, testCaseName);\r\n\t\t\t\tsetUpMethod.annotate(junitBeforeReference);\r\n\t\t\t\t\r\n\t\t\t\tJMethod tearDownMethod = testCaseClass.method(JMod.PUBLIC, void.class, \"tearDown\");\r\n\t\t\t\tJDocComment methodComment2 = tearDownMethod.javadoc();\r\n\t\t\t\tcommentString = \"Teardown method for the testcase\";\r\n\t\t\t\tmethodComment2.append(commentString);\r\n\t\t\t\ttearDownMethod = constructTearDownMethodForTestCase(tearDownMethod, testExecutionEngine);\r\n\t\t\t\ttearDownMethod.annotate(junitAfterReference);\r\n\t\t\t\t\r\n\t\t\t\tList<TestCaseStepsList> testSteps = testCaseService.listTestCaseSteps(testCase.getTestCaseId());\r\n\t\t\t\tif (testSteps == null || testSteps.isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"No steps in the testcase : \" + testCaseName);\r\n\t\t\t\t\tJMethod testCaseMethod = testCaseClass.method(JMod.PUBLIC, void.class, testCaseName + \"_Test\");\r\n\t\t\t\t\ttestCaseMethod.annotate(junitTestReference);\r\n\t\t\t\t\ttestCaseMethod = constructDefaultTestCaseMethodForTestCase(testCaseMethod, testExecutionEngine, testCase);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(testStepOption.contains(\"SEPARATE_METHOD\")) {\r\n\t\t\t\t\t\tJMethod mainTestStepMethod = testCaseClass.method(JMod.PUBLIC, void.class, \"mainTest\");\r\n\t\t\t\t\t\tmainTestStepMethod.annotate(junitTestReference);\r\n\t\t\t\t\t\tString stepMethod = \"\";\r\n\t\t\t\t\t\tfor (TestCaseStepsList testStep : testSteps) {\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString testStepName = ScriptGeneratorUtilities.getTestStepMethodName(testCaseName, testStep.getTestStepName(), testStep.getTestStepId(), testStep.getTestStepCode(), 1 );\r\n\t\t\t\t\t\t\tJMethod testStepMethod = testCaseClass.method(JMod.PUBLIC, void.class, testStepName);\r\n\t\t\t\t\t\t\ttestStepMethod = constructTestStepMethodForTestCase(testStepMethod, testExecutionEngine, refClassName, testCaseName, testStepName, testStep);\r\n\t\t\t\t\t\t\tstepMethod = testStepName+\"();\";\r\n\t\t\t\t\t\t\tmainTestStepMethod.body().directStatement(stepMethod);\r\n\t\t\t\t\t\t\tstepMethod = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tJMethod singleTestStepMethod = testCaseClass.method(JMod.PUBLIC, void.class, testCaseName + \"_Test\");\r\n\t\t\t\t\t\tsingleTestStepMethod.annotate(junitTestReference);\r\n\t\t\t\t\t\tfor (TestCaseStepsList testStep : testSteps) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString testStepName = ScriptGeneratorUtilities.getTestStepMethodName(testCaseName, testStep.getTestStepName(), testStep.getTestStepId(), testStep.getTestStepCode(), 1 );\r\n\t\t\t\t\t\t\tsingleTestStepMethod = addTestStepForSingleTestStepMethodForTestCase(singleTestStepMethod, testExecutionEngine, refClassName, testCaseName, testStepName, testStep);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tFile sourceFile = new File(destinationDirectory);\r\n\t\t\t\tif (!sourceFile.exists()) {\r\n\t\t\t\t\tlog.info(\"Created Directory for source code generation : \" + destinationDirectory);\r\n\t\t\t\t\tsourceFile.mkdirs();\r\n\t\t\t\t}\r\n\t\t\t\tcodeModel.build(sourceFile);\r\n\t\t\t\tString CLASS_PACKAGE_NAME_FOLDER = classPackageName.replace(\".\", File.separator);\r\n\t\t\t\tlog.info(\"CLASS_PACKAGE_NAME_FOLDER : \" + CLASS_PACKAGE_NAME_FOLDER);\r\n\t\t\t\tmessage = sourceFile.getAbsolutePath() + File.separator + CLASS_PACKAGE_NAME_FOLDER + File.separator + testCaseName + \".java\";\r\n\t\t\t}\r\n\t\t} catch (JClassAlreadyExistsException e) {\r\n\t\t\tlog.error(\"Unable to generate testcase ref source code class\", e);\r\n\t\t\tmessage = \"Failed : Unable to generate testcase ref source code class\";\r\n\t\t} catch (IOException io) {\r\n\t\t\tlog.error(\"Unable to create file in file system\", io);\r\n\t\t\tmessage = \"Failed : Unable to create file in file system\";\r\n\t\t}\r\n\t\t\r\n\t\tlog.debug(\"Success : Generated Testcases source code framework.\" );\r\n\t\treturn message;\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tTestListener listener=new TestListener();\r\n\t\tXmlSuite suite=new XmlSuite();\r\n\t\tsuite.setName(\"Test Results\");\r\n\t\tsuite.setParallel(ParallelMode.METHODS);\r\n\t\tsuite.setThreadCount(Integer.parseInt(TestProperties.THREAD_COUNT.toString()));\r\n\t\tList<XmlSuite> suits=new ArrayList<XmlSuite>();\r\n\t\tsuits.add(suite);\r\n\r\n\r\n\t\tList<XmlPackage> xpackage=new ArrayList<XmlPackage>();\r\n\t\txpackage.add(new XmlPackage(TestProperties.TESTNG_PACKAGE.toString()));\r\n\r\n\t\t\r\n\t\tXmlTest test=new XmlTest(suite);\r\n\t\ttest.setPackages(xpackage);\r\n\t\tString groups=TestProperties.TESTNG_GROUP.toString();\r\n\t\tString groupArray[]=groups.split(\",\");\r\n\t\tList<String> includedGroups=new ArrayList<String>();\r\n\t\tincludedGroups.addAll(Arrays.asList(groupArray));\r\n\t\ttest.setIncludedGroups(includedGroups);\r\n\t\r\n\t\t\r\n\t\tTestNG tng=new TestNG();\r\n\t\ttng.setOutputDirectory(System.getProperty(\"user.dir\")+\"\\\\test-output\\\\\");\r\n\t\ttng.setXmlSuites(suits);\r\n\t\ttng.addListener((ITestNGListener) listener);\r\n\t\ttng.run();\r\n\t\tSystem.exit(0);\r\n\t}", "public static void main(String[] args) {\n final int t = SYS_IN.nextInt(); // total test cases\n SYS_IN.nextLine();\n for (int ti = 0; ti < t; ti++) {\n evaluateCase();\n }\n SYS_IN.close();\n }", "@Test (dataProvider= \"My data provider\")\r\n\tpublic void TestCalcParamitarized(String in1,String Op, String in2,String Expec){ //.... 1- Parameterized test method -Define method input parameters-\r\n\t\tCalc(in1, Op, in2);\r\n\t\tassertResult(Expec);\t\t\r\n\t}", "public Test makeTest(DataSource ds, List<Question> givenQns){\n\t\tArrayList<Question> startQns = new ArrayList<Question>();\n\t\tfor (int i = 0; i < givenQns.size(); i++){\n\t\t\tstartQns.add((Question)givenQns.get(i));\n\t\t}\n\t\tString category = startQns.get(0).getCategory();\n\t\tString difficulty = \"any\";\n\t\t\n\t\twhile(startQns.size()>5){\n\t\t\tint index = (int)(Math.random()*startQns.size());\n\t\t\tstartQns.remove(index);\n\t\t}\n\t\tTest test = this.makeTest(ds, difficulty, category, 5, startQns);\n//\t\tSystem.out.println(\"TestMakerA->test: \" + test.toString());\n\t\tint[] correct = new int[5];\n\t\tArrayList<Question[]> questions = (ArrayList<Question[]>)test.getTest();\n\n\t\tfor(int i = 0; i < 5; i++){\n\t\t\tcorrect[i] = (int)(Math.random()*4);\n\t\t\tif(questions.get(i)[correct[i]] != startQns.get(i)){\n\t\t\t\tquestions.get(i)[correct[i]] = startQns.get(i);\n\t\t\t}\n\t\t}\n\n\t\ttest.setCorrect(correct);\n\t\treturn test;\n\t}", "public static void main(String[] args) throws Exception { \n\t\tUtils.LIMIT_RELATIONS = true;\n\t\tUtils.WINDOW = 2;\n\t\t\n//\t\tString pid = RandomFile.getPID();\n//\t\tgenerateClass(pid, \"f\", 1, 0, 25);\n//\t\tgenerateClass(pid, \"g\", 2, 0.1, 25);\n\t\t\n\t\tif (args.length != 5) {\n\t\t\tSystem.out.print(\"Usage: numRepeat experiment \");\n\t\t\tSystem.out.print(\"\\\"mean1,mean2,...\\\" \\\"pct1,pct2,..\\\"\");\n\t\t\tSystem.out.print(\"\\\"length1,length2,...\\\"\");\n\t\t\tSystem.out.println();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tUtils.EXPERIMENTS = Integer.parseInt(args[0]);\n\t\tString experiment = args[1];\n\t\tSystem.out.println(\"Experiment: \" + experiment);\n\t\t\n\t\tList<Double> means = new ArrayList<Double>();\n\t\tString[] meanTokens = args[2].split(\"[,]\");\n\t\tfor (String tok : meanTokens)\n\t\t\tmeans.add(Double.parseDouble(tok));\n\t\t\n\t\tList<Double> pcts = new ArrayList<Double>();\n\t\tString[] pctTokens = args[3].split(\"[,]\");\n\t\tfor (String tok : pctTokens)\n\t\t\tpcts.add(Double.parseDouble(tok));\n\t\t\n\t\tList<Integer> lengths = new ArrayList<Integer>();\n\t\tString[] lengthTokens = args[4].split(\"[,]\");\n\t\tfor (String tok : lengthTokens)\n\t\t\tlengths.add(Integer.parseInt(tok));\n\t\t\n\t\tif (\"curve\".equals(experiment)) \n\t\t\tlearningCurve(lengths, means, pcts);\n\t\telse if (\"cluster\".equals(experiment))\n\t\t\tcluster(lengths, means, pcts);\n\t\telse if (\"knn\".equals(experiment))\n\t\t\tknn(lengths, means, pcts);\n\t\telse\n\t\t\texperiment(lengths, means, pcts);\n\t\t\n//\t\texpectedSequenceSizes(lengths,means);\n\t}", "public static void main(String[] args) {\n ExecuteParams executeParams1 = new ExecuteParams();\n ExecuteParams executeParams2 = new ExecuteParams();\n ExecuteParams executeParams30 = new ExecuteParams();\n ExecuteParams executeParams31 = new ExecuteParams();\n ExecuteParams executeParams32 = new ExecuteParams();\n ExecuteParams executeParams33 = new ExecuteParams();\n ExecuteParams executeParams34 = new ExecuteParams();\n ExecuteParams executeParams41 = new ExecuteParams();\n\n //*** PARAMS\n executeParams1.DeviationPredictor_CosineMetric();\n executeParams2.DeviationPredictor_PearsonMetric();\n executeParams30.DeviationPredictor_PearsonSignifianceWeightMetric(1);\n executeParams31.DeviationPredictor_PearsonSignifianceWeightMetric(5);\n executeParams32.DeviationPredictor_PearsonSignifianceWeightMetric(50);\n executeParams33.DeviationPredictor_PearsonSignifianceWeightMetric(100);\n executeParams34.DeviationPredictor_PearsonSignifianceWeightMetric(200);\n executeParams41.DeviationPredictor_JaccardMetric();\n //***\n\n computeOne(executeParams1);\n computeOne(executeParams2);\n computeOne(executeParams30,\"N = 1\");\n computeOne(executeParams31,\"N = 5\");\n computeOne(executeParams32,\"N = 50\");\n computeOne(executeParams33,\"N = 100\");\n computeOne(executeParams34,\"N = 200\");\n computeOne(executeParams41);\n }", "private void generateTestExecution(ITestResult result) throws IOException{\r\n\t\t//create the html file with current running class and test name\r\n\t\tfout = createRequiredFile(result.getName());\r\n\t\t\r\n\t\t//Write initial html codes neccessary for report\r\n\t\tstartHtmlPage(fout,result);\r\n\t\t\r\n\t\t//get all the attributes set during the test execution\r\n\t\tObject[] array = result.getAttributeNames().toArray();\r\n\t\t\r\n\t\t//Above got values are not in sort. So, Sorting that based on time\r\n\t\tArrays.sort(array);\r\n\t\t\r\n\t\t//Iterating the array value to generate report\r\n \tfor(Object name : array){\r\n \t\t\t\r\n \t\t\t//Each and every array value contains, All the info about the particular action\r\n \t\t\t//And Values combined using deliminator. So, split using deliminator\r\n\t \t\tString temp[] = result.getAttribute((String) name).toString().split(\"####\");\r\n\t \t\t\r\n\t \t\t//After split up, If the third array value contains 'Fail' means that step failed \r\n\t \t\tif(temp[3].toLowerCase().contains(\"fail\")){\r\n\t \t\t\t//If Fail create '<tr>' tag with 'status_failed' class(Which is used for create 'red' background color for failed cases)\r\n\t \t\t\tfout.println(\"<tr class=\\\"status_failed\\\" title=\\\"\\\" alt=\\\"\\\">\");\r\n\t \t\t\t\r\n\t \t\t\t//create the screenshot path\r\n\t \t\t\tString pathToScreenshot = \"../Failure_Screenshot/\"+temp[5]+\".jpg\";\r\n\t \t\t\t\r\n\t \t\t\t//creating mapping for failed step(Link to screen shot and embed the screenshot in that step)\r\n\t \t\t\ttemp[4] = \"<a href=\\'\" + pathToScreenshot + \"\\'> <img src=\\'\" + pathToScreenshot + \"\\' height=\\\"100\\\" width=\\\"100\\\"> </a>\";\r\n\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//After split up, If the third array value contains 'title' means that is title\r\n\t \t\telse if(temp[3].toLowerCase().contains(\"title\")){\r\n\t \t\t\t//So, If it is a title then create '<tr>' tag with class name 'title'\r\n\t \t\t\tfout.println(\"<tr class=\\\"title\\\" title=\\\"\\\" alt=\\\"\\\">\");\r\n\t \t\t\tfout.println(\"<td colspan=\\\"6\\\">\"+ temp[0] + \"</td>\");\r\n\t \t\t\tfout.println(\"</tr>\");\r\n\t \t\t\tcontinue;\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//Else status is passed\r\n\t \t\telse{\r\n\t \t\t\tfout.println(\"<tr class=\\\"status_passed\\\" title=\\\"\\\" alt=\\\"\\\">\");\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//this will create separate '<td>' for messages inside the action\r\n\t \t\tfor(String temp1 : temp){\r\n\t \t\t\t\tfout.println(\"<td>\"+ temp1 + \"</td>\");\r\n\r\n\t \t\t}\r\n\t \t//end up '<tr>' tag\t\r\n\t \tfout.println(\"</tr>\");\r\n \t}\r\n \t\r\n \t//this used for write some end up html tags\r\n \tonFinish();\r\n \t\r\n\t}", "public static void main(String[] args) throws IOException{\n\t\tBufferedReader in = new BufferedReader (new InputStreamReader(System.in));\n\t\tint num_tests = Integer.parseInt(in.readLine());\n\t\tBufferedWriter out = new BufferedWriter (new OutputStreamWriter(System.out));\n\n\t\tStringBuilder buf = new StringBuilder();\n\t\tfor(int j=0; j<num_tests; ++j)\n\t\t{\n\t\t\tString[] data_overview = in.readLine().split(\" \");\n\n\t\t\t// the variables\n\t\t\tint d = Integer.parseInt(data_overview[0]);\n\t\t\tint p = Integer.parseInt(data_overview[1]);\n\t\t\tint u = Integer.parseInt(data_overview[2]);\n\t\t\tint v = Integer.parseInt(data_overview[3]);\n\t\t\t\n\t\t\tdouble left = 0, right = d/(p-1);\n\t\t\twhile(right-left>0.0001){\n\t\t\t\tdouble middle = (left+right)/2;\n\t\t\t\tif(putPosts(d, u, v, p, middle)){\n\t\t\t\t\tleft = middle;\n\t\t\t\t} else {\n\t\t\t\t\tright = middle;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t// print\n\t\t\tbuf.append(\"Case #\");\n\t\t\tbuf.append(j+1);\n\t\t\tbuf.append(\": \");\n\t\t\tbuf.append(right);\n\t\t\tbuf.append(\"\\n\");\n\t\t}\n\t\tSystem.out.println(buf);\t\n\t}", "@ParameterizedTest\n @MethodSource(\"testSet\")\n void testFactorial(long[] set){\n assertEquals(set[1], Factorial.factorial(set[0]));\n }", "public abstract String generate(Object... args);", "private String generateTestNGMainClass(ProductMaster product, String testExecutionEngine, String packageName, String destinationDirectory, int nameSource) {\n\t\tJCodeModel codeModel = new JCodeModel();\r\n\t\tString message = null;\r\n\t\ttry {\r\n\t\t\tif (testExecutionEngine == null)\r\n\t\t\t\ttestExecutionEngine = TAFConstants.TESTENGINE_SEETEST;\r\n\t\t\tlog.info(\"Test Execution Engine : \" + testExecutionEngine);\r\n\t\t\t\t\r\n\t\t\tJClass testNGAfterSuiteReference = null;\r\n\t\t\tJClass testNGBeforeSuiteReference = null;\r\n\t\t\ttestNGAfterSuiteReference = codeModel.ref(\"org.testng.annotations.AfterSuite\");\r\n\t\t\ttestNGBeforeSuiteReference = codeModel.ref(\"org.testng.annotations.BeforeSuite\");\r\n\r\n\r\n\t\t\t// 1. Create the class for the main class\r\n\t\t\tJDefinedClass mainClass = codeModel._class(packageName + \".\" + \"Main\");\r\n\t\t\tJDocComment classComment = mainClass.javadoc();\r\n\t\t\tString javadocCommentClass = \"Main driver class for integration of scripts with TAF\"\r\n\t\t\t\t\t\t+ \"\\n\" + \"Product : \" + product.getProductDescription()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Script Type \t\t: \" + TAFConstants.TESTSCRIPT_TYPE_TESTNG\r\n\t\t\t\t\t\t+ \"\\n\" + \"Test Execution Engine \t: \" + testExecutionEngine\r\n\t\t\t\t\t\t+ \"\\n\" + \"Code generated by TAF on \t: \" + new Date(System.currentTimeMillis());\r\n\t\t\tclassComment.append(javadocCommentClass);\r\n\r\n\t\t\t//Add the class variables\r\n\t\t\tmainClass = addClassVariablesForMainClass(codeModel, mainClass, testExecutionEngine);\r\n\t\t\r\n\t\t\t//Add the setup method\r\n\t\t\tJMethod setUpMethod = mainClass.method(JMod.PUBLIC, void.class, \"setUp\");\r\n\t\t\tJDocComment methodComment1 = setUpMethod.javadoc();\r\n\t\t\tString commentString = \"Setup method for the TestSuite/TestRun\";\r\n\t\t\tmethodComment1.append(commentString);\r\n\t\t\tsetUpMethod = constructSetUpMethodForMain(setUpMethod, testExecutionEngine);\r\n\t\t\tsetUpMethod.annotate(testNGBeforeSuiteReference);\r\n\t\t\t\t\r\n\t\t\t//Add the SeeTest Initialization method\r\n\t\t\tif (testExecutionEngine.equals(TAFConstants.TESTENGINE_SEETEST)) {\r\n\t\t\t\tJMethod initSeeTestClientMethod = mainClass.method(JMod.PUBLIC, codeModel.ref(com.experitest.client.Client.class), \"initSeeTestClient\");\r\n\t\t\t\tinitSeeTestClientMethod = constructSeeTestInitMethodForMain(initSeeTestClientMethod, testExecutionEngine, product);\r\n\t\t\t}\r\n\r\n\t\t\t//Add the teardown method\r\n\t\t\tJMethod tearDownMethod = mainClass.method(JMod.PUBLIC, void.class, \"tearDown\");\r\n\t\t\tJDocComment methodComment2 = tearDownMethod.javadoc();\r\n\t\t\tcommentString = \"Teardown method for the TestSuite/TestRun\";\r\n\t\t\tmethodComment2.append(commentString);\r\n\t\t\ttearDownMethod = constructTearDownMethodForMain(tearDownMethod, testExecutionEngine, product);\r\n\t\t\ttearDownMethod.annotate(testNGAfterSuiteReference);\r\n\t\t\t\t\r\n\t\t\t// Add accessor methods\t\t\t\r\n\t\t\tmainClass = constructAccessorMethodsForMain(codeModel, mainClass, testExecutionEngine, product);\r\n\t\t\t\r\n\t\t\tFile sourceFile = new File(destinationDirectory);\r\n\t\t\tif (!sourceFile.exists()) {\r\n\t\t\t\tlog.info(\"Created Directory for source code generation : \" + destinationDirectory);\r\n\t\t\t\tsourceFile.mkdirs();\r\n\t\t\t}\r\n\t\t\tcodeModel.build(sourceFile);\r\n\t\t\tmessage = sourceFile.getAbsolutePath() + MAIN_PACKAGE_NAME_FOLDER + File.separator +\"Main.java\";\r\n\r\n\t\t} catch (JClassAlreadyExistsException e) {\r\n\t\t\tlog.error(\"Unable to generate testcase ref source code class\", e);\r\n\t\t\tmessage = \"Failed : Unable to generate testcase ref source code class\";\r\n\t\t} catch (IOException io) {\r\n\t\t\tlog.error(\"Unable to create file in file system\", io);\r\n\t\t\tmessage = \"Failed : Unable to create file in file system\";\r\n\t\t}\r\n\t\t\r\n\t\tlog.info(\"Success : Generated Main class source code\" + message);\r\n\t\treturn message;\r\n\t}", "public static void startTestCase(String testCase) throws Exception\n\t{\n\t\tint currentSuiteID;\n\t\tint currentTestCaseID;\n\t\tString currentTestSuite;\n\t\tString currentTestCaseName;\n\t\tXls_Reader currentTestSuiteXLS;\n\t\tXls_Reader Wb = new Xls_Reader(System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\java\\\\com\\\\test\\\\automation\\\\uIAutomation\\\\data\\\\Controller.xlsx\");\n\t\tString TestURL = VerifyLoginWithValidCredentials.CONFIG.getProperty(\"TestURL\");\n\t\tfor (currentSuiteID = 2; currentSuiteID <= Wb.getRowCount(ObjectRepository.TEST_SUITE_SHEET); currentSuiteID++)\n\t\t{\n\t\t\tcurrentTestSuite = Wb.getCellData(ObjectRepository.TEST_SUITE_SHEET, ObjectRepository.Test_Suite_ID, currentSuiteID);\n\t if(Wb.getCellData(ObjectRepository.TEST_SUITE_SHEET, ObjectRepository.RUNMODE, currentSuiteID).equals(ObjectRepository.RUNMODE_YES))\n\t \t\t{\n\t\t\t\tcurrentTestSuiteXLS = new Xls_Reader(\"src/config/\" + currentTestSuite + \".xlsx\");\n\t\t\t\tfor (currentTestCaseID = 2; currentTestCaseID <= currentTestSuiteXLS.getRowCount(ObjectRepository.TEST_CASES_SHEET); currentTestCaseID++) \n\t\t\t\t{\n\t\t\t\t\tcurrentTestCaseName = currentTestSuiteXLS.getCellData(ObjectRepository.TEST_CASES_SHEET, ObjectRepository.Test_Case_ID, currentTestCaseID);\n\t\t\t\t\tif (currentTestCaseName.equals(testCase))\n\t {\n\t\t\t\t\t\tString desc = currentTestSuiteXLS.getCellData(ObjectRepository.TEST_CASES_SHEET, \"Description\", currentTestCaseID);\n\t\t\t\t\t\tString subModule = currentTestSuiteXLS.getCellData(ObjectRepository.TEST_CASES_SHEET, \"Sub Module\", currentTestCaseID);\n\t\t\t\t\t\tLog.test = Log.extent.startTest(currentTestCaseName, desc).assignCategory(currentTestSuite + \" Module\", subModule + \" Sub-Module\");\n\t\t\t\t\t\tLog.test.log(LogStatus.INFO, \"Testing on URL : \" + TestURL);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner sc = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tsc = new Scanner( new File(\"C:\\\\Users\\\\SRT\\\\algorithms\\\\robot\\\\src\\\\frodo\\\\input2.txt\") );\r\n\t\t} catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tint test_case = sc.nextInt();\r\n\t\t\r\n\t\tint N=0;\r\n\r\n\t\tfor (int tc = 1; tc <= test_case; tc++){\r\n\t\t\t//if(tc ==1 ) {\r\n\t\t\tN = sc.nextInt();\r\n\t\t\tint grid [][] = new int [N][2];\r\n\r\n\t\t\tfor(int row = 0 ; row < grid.length ; row++) {\r\n\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t\tfor(int col=0; col< grid[0].length; col++) {\r\n\t\t\t\t\tgrid[row][col] = sc.nextInt();\r\n\t\t\t\t\tSystem.out.print(\" \"+ grid[row][col]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\t\t\t\t\t\t\t\r\n\t\t\tSystem.out.println(\"#\"+tc+\":\"+getAnswer(N,grid));\r\n\t\t\t//}\t\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\n public void genRandom() {\n runAndWait(() -> genRandom(10_000, 500, 1), 32, 2000);\n runAndWait(() -> genRandom(10_000, 500, 100), 32, 2000);\n runAndWait(() -> genRandom(250_000, 4000, 50), 4, 5_000);\n }", "public static void main(String[] args) {\n\t\tTestLinkAPIClient testlinkAPIClient = new TestLinkAPIClient(CyborgConstants.DEVKEY,CyborgConstants.URL);\n\t\ttry {\n\t\t\tString ProjectId=null;\n\t\t\tString TestSuiteId=null;\n\t\t\tArrayList<Integer> TestSuitesId = new ArrayList<Integer>();\n\t\t\tTestLinkAPIResults projResult= testlinkAPIClient.getProjects();\n\t\t for (int i = 0; i < projResult.size(); i++) {\n\t\t \tif(projResult.getValueByName(i, \"name\").equals(ProjectName)){\n\t\t \t\t ProjectId= (String) projResult.getValueByName(i, \"id\");\n\t\t \t\t System.out.println(projResult.getValueByName(i, \"name\"));\n\t\t \t\t break;\n\t\t \t\t \n\t\t \t}\n\t\t\t}\n\t\t \n\t\t\t String TestPalns[]= TestPlan.split(\",\");\n\t\t\t for (int k = 0; k < TestPalns.length; k++) {\n\t\t\t\tTestLinkAPIResults testSuiteResults=testlinkAPIClient.getTestSuitesForTestPlan(ProjectName, TestPalns[k]);\n\t\t\t\t//System.out.println(\"TestPalns[k]===\"+TestPalns[k]);\n\t\t\t\tfor (int l = 0; l < testSuiteResults.size(); l++) {\n\t\t\t\t\t//System.out.println(\"TestSuite===\"+TestSuite);\n\t\t\t\t\t//System.out.println(\"Suite Name===\"+testSuiteResults.getValueByName(l, \"name\"));\n\t\t\t\t\tString TestSuites[]= TestSuite.split(\",\");\n\t\t\t\t\tfor (int z = 0; z < TestSuites.length; z++){\n\t\t\t\t\t\t\tif(testSuiteResults.getValueByName(l, \"name\").equals(TestSuites[z])){\n\t\t\t\t\t\t\tSystem.out.println(testSuiteResults.getValueByName(l, \"name\").equals(TestSuites[z]));\n\t\t\t\t\t\t\t TestSuiteId= (String) testSuiteResults.getValueByName(l, \"id\");\n\t\t\t\t\t\t\t// System.out.println(\"SuiteNamer===\"+testSuiteResults.getValueByName(l, \"name\"));\n\t\t\t\t\t\t\tString SuiteName=(String)testSuiteResults.getValueByName(l, \"name\");\n\t\t\t\t\t\t\t getTestCases(testlinkAPIClient, ProjectId, TestSuiteId,SuiteName);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t }\n\t\t\t \n\t\t \n\t\t} catch (TestLinkAPIException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public abstract Case[][] generate();", "public static void main(String[] args) {\n\t\tTestNG testNG = new TestNG();\n\t\tTestListenerAdapter adapter = new TestListenerAdapter();\n\t\tList<String> suites = new ArrayList<>();\n\t\ttestNG.addListener((ITestNGListener) adapter);\n\t\tsuites.add(\"./src/test/java/com/testautomation/testng/main_testng.xml\");\n\t\tsuites.add(\"./src/test/java/com/testautomation/testng/testng1.xml\");\n\t\tsuites.add(\"./src/test/java/com/testautomation/testng/testng2.xml\");\n\t\tsuites.add(\"./src/test/java/com/testautomation/testng/testng3.xml\");\n\t\tsuites.add(\"./src/test/java/com/testautomation/testng/testng4.xml\");\n\t\ttestNG.setTestSuites(suites);\n\t\ttestNG.setParallel(XmlSuite.ParallelMode.METHODS);\n\t\ttestNG.setPreserveOrder(true);\n\t\ttestNG.setSuiteThreadPoolSize(5);\n\t\ttestNG.setVerbose(0);\n\t\ttestNG.setOutputDirectory(\"test-output\");\n\t\ttestNG.run();\n\t}", "@Override\n public TestingSet createTestingSet(int individuals) \n {\n return TestingSet.createSingleTrialForAllIndividuals(individuals);\n }", "public RegressionTest generateRegressionTest() {\n return getInstance().create().regressionTest(this);\n }", "public static void main(String[] args) {\n int n = 4;\n long[] coins1 = {1, 2, 3};\n runTestCase(n, coins1);\n /*\n Number of ways: 4\n Recursive: 4,595 ns\n Dynamic programming: 538,243 ns\n */\n\n // Test 2\n n = 10;\n long[] coins2 = {2, 3, 5, 6};\n runTestCase(n, coins2);\n /*\n Number of ways: 5\n Recursive: 6,057 ns\n Dynamic programming: 91,954 ns\n */\n\n // Test 3\n n = 100;\n long[] coins3 = {2, 3, 5, 6};\n runTestCase(n, coins3);\n /*\n Number of ways: 1163\n Recursive: 888,360 ns\n Dynamic programming: 3,817,729 ns\n */\n\n // Test 4\n n = 1000;\n long[] coins4 = {2, 3, 5, 6};\n runTestCase(n, coins4);\n /*\n Number of ways: 948,293\n Recursive: 804,397,007 ns\n Dynamic programming: 72,303,683 ns\n */\n\n // Test 5\n n = 2000;\n long[] coins5 = {2, 3, 5, 6};\n runTestCase(n, coins5);\n /*\n Number of ways: 7,496,697\n Recursive: 12,104,041,809 ns\n Dynamic programming: 112,009,974 ns\n */\n }", "public int generate(int k) {\n // PUT YOUR CODE HERE\n }", "public static void main(String[] args) throws IOException, InterruptedException {\n\t\tif(args.length < 4)\n\t\t\tSystem.out.println(\"Missing arguments: java Main <obligations number> <powers number> <properties number>\");\n\t\tTest test = new Test(Integer.parseInt(args[0]), Integer.parseInt(args[1]), Integer.parseInt(args[2]), Integer.parseInt(args[3]));\n\t\ttest.set_nuxmv_file(\"nuXmv\");\n\t\t// make directory\n\t\tFile output = new File(\"result\");\n\t\tif(!output.exists()){\n\t\t\toutput.mkdirs();\n\t\t}\n\t\ttest.set_output_folder(\"result\");\n\t\ttest.generate();\n\t\ttest.run();\n\t}", "public UnitTestData() throws Exception {\n String[] runsData = {\n \"1,1,A,1,No,No,4\", // 0 (a No before first yes Security Violation)\n \"2,1,A,1,No,No,2\", // 0 (a No before first yes Compilation Error)\n \"3,1,A,1,No,No,1\", // 20 (a No before first yes)\n \"4,1,A,3,Yes,No,0\", // 3 (first yes counts Minute points but never Run Penalty points)\n \"5,1,A,5,No,No,1\", // zero -- after Yes\n \"6,1,A,7,Yes,No,0\", // zero -- after Yes\n \"7,1,A,9,No,No,1\", // zero -- after Yes\n \"8,1,B,11,No,No,1\", // zero -- not solved\n \"9,2,A,48,No,No,4\", // 0 (a No before first yes Security Violation)\n \"10,2,A,50,Yes,No,0\", // 50 (minute points; no Run points on first Yes)\n \"11,2,B,35,No,No,1\", // zero -- not solved\n \"12,2,B,40,No,No,1\", // zero -- not solved\n };\n\n // Assign half eams random team member names\n addTeamMembers(contest, getTeamAccounts(contest).length / 2, 5);\n\n assertEquals(\"Expectig team member names\", 5, getFirstAccount(contest, Type.TEAM).getMemberNames().length);\n\n assertEquals(\"team count\", 120, contest.getAccounts(Type.TEAM).size());\n\n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Problem problem = contest.getProblems()[0];\n Account judge = getFirstAccount(contest, Type.JUDGE);\n generateClarifications(contest, 20, problem, judge.getClientId(), false, false);\n generateClarifications(contest, 20, problem, judge.getClientId(), true, false);\n generateClarifications(contest, 20, problem, judge.getClientId(), true, true);\n\n sampleContest.assignSampleGroups(contest, \"North Group\", \"South Group\");\n\n assertEquals(\"Runs\", 12, contest.getRuns().length);\n\n }", "public void createTestCase(String testName) {\r\n\t\tif (!active) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (testName == null || testName.isEmpty()) {\r\n\t\t\tthrow new ConfigurationException(\"testName must not be null or empty\");\r\n\t\t}\r\n\t\t\r\n\t\tif (applicationId == null) {\r\n\t\t\tcreateApplication();\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tJSONObject testJson = getJSonResponse(Unirest.post(url + TESTCASE_API_URL)\r\n\t\t\t\t\t.field(\"name\", testName)\r\n\t\t\t\t\t.field(\"application\", applicationId));\r\n\t\t\ttestCaseId = testJson.getInt(\"id\");\r\n\t\t} catch (UnirestException | JSONException e) {\r\n\t\t\tthrow new SeleniumRobotServerException(\"cannot create test case\", e);\r\n\t\t}\r\n\t}", "public void generateReport(List<XmlSuite> xmlSuites, List<ISuite>suites, \r\n\t\tString outputDirectory){//creating a method that takes three arguments,\r\n\t//to generate a report, arguments list requirements, \r\n\t//using a mechanism called List, which gets the array input\r\n\t//script will go back to xml suites, and look for \"suites\" which are the classes we created\r\n\t//we will create an xml file to contain all the classes within our test cases\r\n\t//PASS, FAIL, or SKIP will be string outputs; String outputDirectory\r\n\t//XML Suite: big time testing based on testing type\r\n\t//ISuite: pages we are working on; classes created to perform action; under test folder\r\n\t\r\n\textent = new ExtentReports(outputDirectory + File.separator\r\n\t\t\t+ \"Extent.html\", true);\r\n\t//creating an object for extent report, creating a virtual object to save all output to save all results\r\n\t//as a string, file seperator is not needed, it doesn't matter how u received the result\r\n\t//seperate them and consolidate the results\r\n\t//telling you how to save the file name, html is easy to open on any device and lightweight\r\n\t//outputDirectory: SKIP, PASS, FAIL\r\n\t//the reason for boolean option: if yu receive results, generate report//if yu dont then dont generate\r\n\tfor(ISuite suite : suites){//for loop is created\r\n\t\t//map obtains a key value, not duplicate, and then maps it to one location, which is the\r\n\t\t//extent report\r\n\t\t//an interface in java, between key value and location (between status and extent report)\r\n\t\t//will make sure how to map and seperate results under each class\r\n\t\tMap<String, ISuiteResult>result = suite.getResults();\r\n\t\r\n\tfor(ISuiteResult r : result.values()){\r\n\t\tITestContext context =r.getTestContext();//for each of the classes, create log status\r\n\t\t//test context: script that we are running, results from it\r\n\t\t//: is a conditional operator, which lists the conditions, which lists out the conditions\r\n\t\t//script should be able to run \r\n\t\t//one suite, or multiple suites in one shot\r\n\t\t//making context\r\n\t\t\r\n\t\t\r\n\t\tbuildTestNo(context.getPassedTests(), LogStatus.PASS);\r\n\t\tbuildTestNo(context.getFailedTests(), LogStatus.FAIL);\r\n\t\t//retrieving status using results/context\r\n\t\tbuildTestNo(context.getSkippedTests(), LogStatus.SKIP);\r\n\t\t\t\r\n\t}\r\n}\r\nextent.flush();//take results and place on html file\r\nextent.close();\r\n\r\n}", "public void createTestSuite(TestSuite testsuite, String[] testcases)\r\n\t\t\tthrows Exception {\r\n\r\n\t\tlogger\r\n\t\t\t\t.info(\"start to create testsuite:\"\r\n\t\t\t\t\t\t+ testsuite.getTestSuiteName());\r\n\t\tint suiteRowNum = addTestSuite(testsuite);\r\n\t\tcaseSuiteMapImpl.addTestCaseBatchByStringArray(testcases, suiteRowNum);\r\n\t\tlogger.info(\"create testsuit:\" + testsuite.getTestSuiteName()\r\n\t\t\t\t+ \" success!\");\r\n\r\n\t}", "public static void main(String[] args) {\r\n \tScanner scan = new Scanner(System.in);\r\n \tint testCases = scan.nextInt();\r\n \tString[] str = new String[testCases];\r\n \tscan.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\r\n \t// first constraint\r\n \tif ((testCases >= 1) && (testCases <= 10)) {\r\n \t\tfor (int j = 0; j < testCases; j++) {\r\n \t\t\tstr[j] = scan.next();\r\n \t\t}\r\n \t\tfor (int k = 0; k < str.length; k++) {\r\n \t\t\ttest(str[k]);\r\n \t\t}\r\n \t} else {\r\n \t\tSystem.out.println(\"The number of test cases must be between 1 and 10.\");\r\n \t}\r\n \tscan.close();\r\n \t\r\n }", "@Test\n public void execute_nricParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"nric\", true, false, Collections.emptyList());\n //Single keyword, ignore case, person found.\n execute_parameterPredicate_test(1, \"s1234567A\", \"nric\", true, false, Arrays.asList(ALICE));\n //Single keyword, case sensitive, no one found.\n execute_parameterPredicate_test(0, \"s1234567A\", \"nric\", false, false, Collections.emptyList());\n //Multiple keywords, ignore case, or condition, multiple people found\n execute_parameterPredicate_test(2, \"S1234567a S5234569A\", \"nric\", true, false, Arrays.asList(ALICE, GEORGE));\n //Multiple keywords, ignore case, and condition, no one found\n execute_parameterPredicate_test(0, \"S1234567a S5234569A\", \"nric\", true, true, Collections.emptyList());\n //Multiple keywords, case sensitive, or condition, one person found\n execute_parameterPredicate_test(1, \"S1234567a S5234569A\", \"nric\", false, false, Arrays.asList(GEORGE));\n //Multiple keywords, case sensitive, and condition, no one found\n execute_parameterPredicate_test(0, \"S1234567a S5234569A\", \"nric\", false, true, Collections.emptyList());\n }", "@Test\n\tpublic void testDoGeneration() {\n\t}", "private String generateJUnitMainClass(List<TestCaseList> allTestCases, ProductMaster product, String testExecutionEngine, String packageName, String destinationDirectory, int nameSource) {\n\t\tJCodeModel codeModel = new JCodeModel();\r\n\t\tString message = null;\r\n\t\ttry {\r\n\t\t\tif (testExecutionEngine == null)\r\n\t\t\t\ttestExecutionEngine = TAFConstants.TESTENGINE_SEETEST;\r\n\t\t\tlog.info(\"Test Execution Engine : \" + testExecutionEngine);\r\n\t\t\t\t\r\n\t\t\t// JUnit References\r\n\t\t\tJClass runWithReference = null;\r\n\t\t\tJClass suiteReference = null;\r\n\t\t\tJClass suiteClassesReference = null;\r\n\t\t\trunWithReference = codeModel.ref(\"org.junit.runner.RunWith\");\r\n\t\t\tsuiteReference = codeModel.ref(\"org.junit.runners.Suite\");\t\t\t\r\n\t\t\tsuiteClassesReference = codeModel.ref(\"org.junit.runners.Suite.SuiteClasses\");\r\n\t\t\t// 1. Create the class for the main class\r\n\t\t\tJDefinedClass mainClass = codeModel._class(packageName + \".\" + \"Main\");\r\n\t\t\tJDocComment classComment = mainClass.javadoc();\r\n\t\t\tString javadocCommentClass = \"Main driver class for integration of scripts with TAF\"\r\n\t\t\t\t\t\t+ \"\\n\" + \"Product : \" + product.getProductDescription()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Script Type \t\t: \" + TAFConstants.TESTSCRIPT_TYPE_JUNIT\r\n\t\t\t\t\t\t+ \"\\n\" + \"Test Execution Engine \t: \" + testExecutionEngine\r\n\t\t\t\t\t\t+ \"\\n\" + \"Code generated by TAF on \t: \" + new Date(System.currentTimeMillis());\r\n\t\t\tclassComment.append(javadocCommentClass);\r\n\t\t\t// 2. Add the required import statements and the class variables\r\n\t\t\t// 2.a TAF Lib references for import\r\n\t\t\tmainClass = addClassVariablesForMainClass(codeModel, mainClass, testExecutionEngine);\r\n\t\t\t//Annotate for the Suite execution\r\n\t\t\tmainClass.annotate(runWithReference).param(\"value\", suiteReference);\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tStringBuffer defaultSuiteClassesSB = new StringBuffer();\t\t\r\n\t\t\tdefaultSuiteClassesSB.append(\"{SetUp.class, \");\r\n\t\t\tfor (TestCaseList testCase : allTestCases) {\r\n\t\t\t\tdefaultSuiteClassesSB.append(ScriptGeneratorUtilities.getTestCaseClassName(testCase.getTestCaseName(), testCase.getTestCaseId(), testCase.getTestCaseCode(), nameSource).concat(\".class\"));\r\n\t\t\t\tdefaultSuiteClassesSB.append(\", \");\r\n\t\t\t}\r\n\t\t\tdefaultSuiteClassesSB.append(\"TearDown.class}\");\t\t\t\r\n\t\t\tmainClass.annotate(suiteClassesReference).param(\"value\", defaultSuiteClassesSB.toString());\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tStringBuffer importClassStatements = new StringBuffer();\r\n\r\n\t\t\tStringBuffer suiteClassesSB = new StringBuffer();\r\n\t\t\tsuiteClassesSB.append(\"@SuiteClasses(\");\r\n\t\t\tsuiteClassesSB.append(\"{SetUp.class, \");\r\n\t\t\tfor (TestCaseList testCase : allTestCases) {\r\n\t\t\t\t\r\n\t\t\t\tString classPackageName;\r\n\t\t\t\r\n\t\t\t\tif (testCase.getTestCaseScriptQualifiedName() == null || testCase.getTestCaseScriptQualifiedName().trim().isEmpty()) {\r\n\t\t\t\t\tclassPackageName = packageName;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tclassPackageName = testCase.getTestCaseScriptQualifiedName();\r\n\t\t\t\t}\r\n\r\n\t\t\t\timportClassStatements.append(\"import \" + classPackageName.trim() + \".\"+ ScriptGeneratorUtilities.getTestCaseClassName(testCase.getTestCaseName(), testCase.getTestCaseId(), testCase.getTestCaseCode(), nameSource) + \";\\n\");\r\n\t\t\t\tsuiteClassesSB.append(ScriptGeneratorUtilities.getTestCaseClassName(testCase.getTestCaseName(), testCase.getTestCaseId(), testCase.getTestCaseCode(), nameSource).concat(\".class\"));\r\n\t\t\t\tsuiteClassesSB.append(\", \");\r\n\t\t\t}\r\n\t\t\tsuiteClassesSB.append(\"TearDown.class})\");\t\t\t\r\n\t\t\tlog.info(importClassStatements.toString());\r\n\t\t\tlog.info(suiteClassesSB.toString());\r\n\r\n\t\t\t// Add the setup method\r\n\t\t\tJMethod setUpMethod = mainClass.method(JMod.PUBLIC, void.class, \"setUp\");\r\n\t\t\tJDocComment methodComment1 = setUpMethod.javadoc();\r\n\t\t\tString commentString = \"Setup method for the TestSuite/TestRun\";\r\n\t\t\tmethodComment1.append(commentString);\r\n\t\t\tsetUpMethod = constructSetUpMethodForMain(setUpMethod, testExecutionEngine);\r\n\r\n\t\t\t//Add seetest initialization method\r\n\t\t\tif (testExecutionEngine.equals(TAFConstants.TESTENGINE_SEETEST)) {\r\n\t\t\t\tJMethod initSeeTestClientMethod = mainClass.method(JMod.PUBLIC, codeModel.ref(com.experitest.client.Client.class), \"initSeeTestClient\");\r\n\t\t\t\tinitSeeTestClientMethod = constructSeeTestInitMethodForMain(initSeeTestClientMethod, testExecutionEngine, product);\r\n\t\t\t}\r\n\r\n\t\t\t//Add tear down method\r\n\t\t\tJMethod tearDownMethod = mainClass.method(JMod.PUBLIC, void.class, \"tearDown\");\r\n\t\t\tJDocComment methodComment2 = tearDownMethod.javadoc();\r\n\t\t\tcommentString = \"Teardown method for the TestSuite/TestRun\";\r\n\t\t\tmethodComment2.append(commentString);\r\n\t\t\ttearDownMethod = constructTearDownMethodForMain(tearDownMethod, testExecutionEngine, product);\r\n\t\t\t\r\n\t\t\tJMethod mainMethod = mainClass.method(JMod.PUBLIC | JMod.STATIC, mainClass, \"getMain\");\r\n\t\t\tmainMethod.body().directStatement(\" if(main==null)main=new Main(); \");\r\n\t\t\tmainMethod.body().directStatement(\"\t\treturn main;\");\r\n\t\t\t\r\n\t\t\t// Add accessor methods\t\t\t\r\n\t\t\tmainClass = constructAccessorMethodsForMain(codeModel, mainClass, testExecutionEngine, product);\r\n\t\t\t\r\n\t\t\tFile sourceFile = new File(destinationDirectory);\r\n\t\t\tif (!sourceFile.exists()) {\r\n\t\t\t\tlog.info(\"Created Directory for source code generation : \" + destinationDirectory);\r\n\t\t\t\tsourceFile.mkdirs();\r\n\t\t\t}\r\n\t\t\tcodeModel.build(sourceFile);\r\n\t\t\tmessage = sourceFile.getAbsolutePath() + MAIN_PACKAGE_NAME_FOLDER + File.separator +\"Main.java\";\r\n\t\t\tScriptGeneratorUtilities.insertTestCaseImportsForJavaScripts(message, importClassStatements.toString(), suiteClassesSB.toString(),\"\");\r\n\r\n\t\t} catch (JClassAlreadyExistsException e) {\r\n\t\t\tlog.error(\"Unable to generate testcase ref source code class\", e);\r\n\t\t\treturn \"Failed : Unable to generate testcase ref source code class\";\r\n\t\t} catch (IOException io) {\r\n\t\t\tlog.error(\"Unable to create file in file system\", io);\r\n\t\t\treturn \"Failed : Unable to create file in file system\";\r\n\t\t}\r\n\t\tlog.debug(\"Success : Generated Testcases source code framework.\" );\r\n\t\treturn message;\r\n\t}", "public void createSuite(String gridProject, String suiteName, String includeCategory) throws IOException\n\t{\n\t\tfileNames =\"\";\n\t\timportStatements =\"\";\n\t\t\n\t\tString classesDetails[];\n\t\tString classesNames;\n\t\tString classesImportStatements;\n\t\t\n\t\t\tclassesDetails = getTestClassNames(\"../\"+gridProject);\n\t\t\tclassesNames = classesDetails[0].replaceFirst(\" , \",\"\");\n\t\t\tclassesImportStatements = classesDetails[1];\n\t\t\t\t\n\t\t\tFileOutputStream fout; \n \t\t PrintStream prints; \n\n\t\t File file = new File(\"../common/src/com/oracle/pgbu/common/helpers/\"+suiteName+\".java\"); \n\t\t\tfout = new FileOutputStream(file); \n\t prints = new PrintStream(fout); \n\t prints.println(\"package com.oracle.pgbu.common.helpers;\\n\");\n\t prints.println(\"import com.oracle.pgbu.common.categories.ParallelCategories;\\n\");\n\t \tprints.println(\"import org.junit.runner.RunWith;\\n\");\n\t prints.println(\"import org.junit.runners.Suite.SuiteClasses;\\n\");\n\t prints.println(classesImportStatements+\"\\n\");\n\t \n\t if (!includeCategory.equals(\"All\"))\n\t { \n\t \t prints.println(\"import org.junit.experimental.categories.Categories.IncludeCategory;\\n\");\n\t \t prints.println(\"import com.oracle.pgbu.common.categories.\"+includeCategory+\";\\n\");\n\t \t\n\t prints.println(\"@IncludeCategory(\"+includeCategory+\".class)\");\n\t \n\t \t }\n\t \n\t prints.println(\"@RunWith(ParallelCategories.class)\");\n\t prints.println(\"@SuiteClasses({ \"+ classesNames +\" })\\n\");\n\t prints.println(\"public class \"+suiteName+\" { \\n }\");\n\t \n\t fout.close(); \n\t}", "@Test public void testAllSimple10() { testAll(1234, \"1234\", 10); }", "public static void main(String[] args) throws IOException{\n\t\tBufferedReader in =new BufferedReader(new FileReader(input));\r\n\tPrintWriter out = new PrintWriter(new FileWriter(output));\r\n\t\t\r\n\t\tint t = Integer.parseInt(in.readLine());\r\n\t\t\r\n\t\tfor(int i=1; i<=t; i++){\r\n\t\t\tout.print(\"Case #\"+i+\": \");\r\n\t\t\tint n = Integer.parseInt(in.readLine());\r\n\t\t\toneTest(n, in, out);\r\n\t\t\tout.println();\r\n\t\t}\r\n\t\tout.flush();\r\n\t}", "@NonNull\n static Map<String, LayoutElement> generateTestCases(\n @NonNull Context context,\n @NonNull DeviceParameters deviceParameters,\n @NonNull String goldenSuffix) {\n Clickable clickable =\n new Clickable.Builder()\n .setOnClick(new LaunchAction.Builder().build())\n .setId(\"action_id\")\n .build();\n HashMap<String, LayoutElement> testCases = new HashMap<>();\n\n TitleChip content =\n new TitleChip.Builder(context, \"Action\", clickable, deviceParameters)\n .setExcludeFontPadding(true)\n .build();\n CompactChip.Builder primaryChipBuilder =\n new CompactChip.Builder(context, \"Action\", clickable, deviceParameters)\n .setExcludeFontPadding(true);\n\n testCases.put(\n \"default_empty_primarychiplayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .build());\n testCases.put(\n \"default_longtext_primarychiplayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(\n new CompactChip.Builder(\n context,\n \"Too_long_textToo_long_textToo_long_text\",\n clickable,\n deviceParameters)\n .setExcludeFontPadding(true)\n .build())\n .build());\n testCases.put(\n \"coloredbox_primarylabel_primarychiplayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(buildColoredBoxPLL(Color.YELLOW))\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .build());\n testCases.put(\n \"coloredbox_primarylabel_secondarylabel_primarychiplayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(buildColoredBoxPLL(Color.YELLOW))\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .setSecondaryLabelTextContent(buildTextLabel(context, \"Secondary label\"))\n .build());\n testCases.put(\n \"coloredbox_secondarylabel_primarychiplayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(buildColoredBoxPLL(Color.YELLOW))\n .setSecondaryLabelTextContent(buildTextLabel(context, \"Secondary label\"))\n .build());\n\n testCases.put(\n \"custom_primarychiplayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(content)\n .setPrimaryChipContent(\n primaryChipBuilder\n .setChipColors(new ChipColors(Color.YELLOW, Color.GREEN))\n .build())\n .build());\n testCases.put(\n \"coloredbox_primarychiplayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(buildColoredBoxPLL(Color.YELLOW))\n .build());\n testCases.put(\n \"two_chips_content_primarychiplayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(\n new Column.Builder()\n .setWidth(expand())\n .setHeight(wrap())\n .addContent(\n new Chip.Builder(\n context,\n clickable,\n deviceParameters)\n .setPrimaryLabelContent(\"First chip\")\n .setWidth(expand())\n .build())\n .addContent(new Spacer.Builder().setHeight(dp(4)).build())\n .addContent(\n new Chip.Builder(\n context,\n clickable,\n deviceParameters)\n .setPrimaryLabelContent(\"Second chip\")\n .setWidth(expand())\n .build())\n .build())\n .build());\n\n primaryChipBuilder =\n new CompactChip.Builder(context, \"Action\", clickable, deviceParameters)\n .setExcludeFontPadding(true);\n testCases.put(\n \"coloredbox_1_chip_columnslayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .build())\n .build());\n testCases.put(\n \"coloredbox_2_chip_columnslayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .build())\n .build());\n testCases.put(\n \"coloredbox_3_chip_columnslayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .addSlotContent(buildColoredBoxMSL(Color.MAGENTA))\n .build())\n .build());\n testCases.put(\n \"coloredbox_2_chip_primary_columnslayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .build());\n testCases.put(\n \"coloredbox_2_chip_primary_secondary_columnslayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .setSecondaryLabelTextContent(buildTextLabel(context, \"Secondary label\"))\n .build());\n testCases.put(\n \"coloredbox_2_columnslayout_golden\" + NORMAL_SCALE_SUFFIX,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .build())\n .build());\n testCases.put(\n \"coloredbox_2_primary_columnslayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .build());\n testCases.put(\n \"coloredbox_2_primary_secondary_columnslayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .setSecondaryLabelTextContent(buildTextLabel(context, \"Secondary label\"))\n .build());\n testCases.put(\n \"coloredbox_3_chip_primary_columnslayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .addSlotContent(buildColoredBoxMSL(Color.MAGENTA))\n .build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .build());\n testCases.put(\n \"coloredbox_3_chip_primary_secondary_columnslayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .addSlotContent(buildColoredBoxMSL(Color.MAGENTA))\n .build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .setSecondaryLabelTextContent(buildTextLabel(context, \"Secondary label\"))\n .build());\n testCases.put(\n \"coloredbox_3_columnslayout_golden\" + NORMAL_SCALE_SUFFIX,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .addSlotContent(buildColoredBoxMSL(Color.MAGENTA))\n .build())\n .build());\n testCases.put(\n \"coloredbox_3_primary_columnslayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .addSlotContent(buildColoredBoxMSL(Color.MAGENTA))\n .build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .build());\n testCases.put(\n \"coloredbox_3_primary_secondary_columnslayout_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .addSlotContent(buildColoredBoxMSL(Color.MAGENTA))\n .build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .setSecondaryLabelTextContent(buildTextLabel(context, \"Secondary label\"))\n .build());\n testCases.put(\n \"custom_spacer_coloredbox_3_chip_primary_secondary_columnslayout_golden\"\n + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setContent(\n new MultiSlotLayout.Builder()\n .addSlotContent(buildColoredBoxMSL(Color.YELLOW))\n .addSlotContent(buildColoredBoxMSL(Color.BLUE))\n .addSlotContent(buildColoredBoxMSL(Color.MAGENTA))\n .setHorizontalSpacerWidth(2)\n .build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .setSecondaryLabelTextContent(buildTextLabel(context, \"Secondary label\"))\n .setVerticalSpacerHeight(1)\n .build());\n\n CircularProgressIndicator.Builder progressIndicatorBuilder =\n new CircularProgressIndicator.Builder().setProgress(0.3f);\n Text textContent =\n new Text.Builder(context, \"Text\")\n .setColor(argb(Color.WHITE))\n .setTypography(Typography.TYPOGRAPHY_DISPLAY1)\n .build();\n testCases.put(\n \"default_text_progressindicatorlayout_golden\" + goldenSuffix,\n new EdgeContentLayout.Builder(deviceParameters)\n .setEdgeContent(progressIndicatorBuilder.build())\n .setPrimaryLabelTextContent(\n new Text.Builder(context, \"Primary label\")\n .setTypography(Typography.TYPOGRAPHY_CAPTION1)\n .setColor(argb(Colors.PRIMARY))\n .build())\n .setContent(textContent)\n .setSecondaryLabelTextContent(\n new Text.Builder(context, \"Secondary label\")\n .setTypography(Typography.TYPOGRAPHY_CAPTION1)\n .setColor(argb(Colors.ON_SURFACE))\n .build())\n .build());\n testCases.put(\n \"default_empty_progressindicatorlayout_golden\" + NORMAL_SCALE_SUFFIX,\n new EdgeContentLayout.Builder(deviceParameters)\n .setEdgeContent(progressIndicatorBuilder.build())\n .build());\n testCases.put(\n \"custom_progressindicatorlayout_golden\" + goldenSuffix,\n new EdgeContentLayout.Builder(deviceParameters)\n .setContent(textContent)\n .setEdgeContent(\n progressIndicatorBuilder\n .setCircularProgressIndicatorColors(\n new ProgressIndicatorColors(\n Color.YELLOW, Color.GREEN))\n .build())\n .build());\n testCases.put(\n \"custom_edgecontent_above_progressindicatorlayout_golden\" + NORMAL_SCALE_SUFFIX,\n new EdgeContentLayout.Builder(deviceParameters)\n .setContent(textContent)\n // Default value is to be above all content.\n .setEdgeContent(\n new Box.Builder()\n .setWidth(expand())\n .setHeight(expand())\n .setModifiers(\n new Modifiers.Builder()\n .setBackground(\n new Background.Builder()\n .setColor(\n argb(Color.YELLOW))\n .build())\n .build())\n .build())\n .build());\n testCases.put(\n \"custom_edgecontent_below_progressindicatorlayout_golden\" + goldenSuffix,\n new EdgeContentLayout.Builder(deviceParameters)\n .setContent(textContent)\n .setEdgeContentBehindAllOtherContent(true)\n .setEdgeContent(\n new Box.Builder()\n .setWidth(expand())\n .setHeight(expand())\n .setModifiers(\n new Modifiers.Builder()\n .setBackground(\n new Background.Builder()\n .setColor(\n argb(Color.YELLOW))\n .build())\n .build())\n .build())\n .build());\n testCases.put(\n \"coloredbox_progressindicatorlayout_golden\" + NORMAL_SCALE_SUFFIX,\n new EdgeContentLayout.Builder(deviceParameters)\n .setEdgeContent(\n progressIndicatorBuilder\n .setCircularProgressIndicatorColors(\n ProgressIndicatorDefaults.DEFAULT_COLORS)\n .build())\n .setContent(\n new Box.Builder()\n .setWidth(dp(500))\n .setHeight(dp(500))\n .setModifiers(\n new Modifiers.Builder()\n .setBackground(\n new Background.Builder()\n .setColor(\n argb(Color.YELLOW))\n .build())\n .build())\n .build())\n .build());\n\n Button button1 = new Button.Builder(context, clickable).setTextContent(\"1\").build();\n Button button2 = new Button.Builder(context, clickable).setTextContent(\"2\").build();\n Button button3 = new Button.Builder(context, clickable).setTextContent(\"3\").build();\n Button button4 = new Button.Builder(context, clickable).setTextContent(\"4\").build();\n Button button5 = new Button.Builder(context, clickable).setTextContent(\"5\").build();\n Button button6 = new Button.Builder(context, clickable).setTextContent(\"6\").build();\n Button button7 = new Button.Builder(context, clickable).setTextContent(\"7\").build();\n Button largeButton1 =\n new Button.Builder(context, clickable)\n .setTextContent(\"1\")\n .setSize(ButtonDefaults.LARGE_SIZE)\n .build();\n Button largeButton2 =\n new Button.Builder(context, clickable)\n .setTextContent(\"2\")\n .setSize(ButtonDefaults.LARGE_SIZE)\n .build();\n Button extraLargeButton =\n new Button.Builder(context, clickable)\n .setTextContent(\"1\")\n .setSize(ButtonDefaults.EXTRA_LARGE_SIZE)\n .build();\n testCases.put(\n \"multibutton_layout_1button_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(extraLargeButton)\n .build())\n .build());\n testCases.put(\n \"multibutton_layout_1button_chip_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(extraLargeButton)\n .build())\n .setPrimaryChipContent(primaryChipBuilder.build())\n .build());\n testCases.put(\n \"multibutton_layout_2button_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(largeButton1)\n .addButtonContent(largeButton2)\n .build())\n .build());\n testCases.put(\n \"multibutton_layout_2button_chip_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(largeButton1)\n .addButtonContent(largeButton2)\n .build())\n .setPrimaryChipContent(primaryChipBuilder.build())\n .build());\n testCases.put(\n \"multibutton_layout_2button_primarylabel_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(largeButton1)\n .addButtonContent(largeButton2)\n .build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .build());\n testCases.put(\n \"multibutton_layout_2button_chip_primarylabel_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(largeButton1)\n .addButtonContent(largeButton2)\n .build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .setPrimaryChipContent(primaryChipBuilder.build())\n .build());\n testCases.put(\n \"multibutton_layout_3button_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(button1)\n .addButtonContent(button2)\n .addButtonContent(button3)\n .build())\n .build());\n testCases.put(\n \"multibutton_layout_3button_chip_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(button1)\n .addButtonContent(button2)\n .addButtonContent(button3)\n .build())\n .setPrimaryChipContent(primaryChipBuilder.build())\n .build());\n testCases.put(\n \"multibutton_layout_3button_primarylabel_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(button1)\n .addButtonContent(button2)\n .addButtonContent(button3)\n .build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .build());\n testCases.put(\n \"multibutton_layout_3button_chip_primarylabel_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(button1)\n .addButtonContent(button2)\n .addButtonContent(button3)\n .build())\n .setPrimaryChipContent(primaryChipBuilder.build())\n .setPrimaryLabelTextContent(buildTextLabel(context, \"Primary label\"))\n .build());\n testCases.put(\n \"multibutton_layout_4button_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(button1)\n .addButtonContent(button2)\n .addButtonContent(button3)\n .addButtonContent(button4)\n .build())\n .build());\n testCases.put(\n \"multibutton_layout_4button_chip_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(button1)\n .addButtonContent(button2)\n .addButtonContent(button3)\n .addButtonContent(button4)\n .build())\n .setPrimaryChipContent(primaryChipBuilder.build())\n .build());\n testCases.put(\n \"multibutton_layout_5button_top_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(button1)\n .addButtonContent(button2)\n .addButtonContent(button3)\n .addButtonContent(button4)\n .addButtonContent(button5)\n .setFiveButtonDistribution(\n MultiButtonLayout\n .FIVE_BUTTON_DISTRIBUTION_TOP_HEAVY)\n .build())\n .build());\n testCases.put(\n \"multibutton_layout_5button_bottom_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(button1)\n .addButtonContent(button2)\n .addButtonContent(button3)\n .addButtonContent(button4)\n .addButtonContent(button5)\n .setFiveButtonDistribution(\n MultiButtonLayout\n .FIVE_BUTTON_DISTRIBUTION_BOTTOM_HEAVY)\n .build())\n .build());\n testCases.put(\n \"multibutton_layout_5button_bottom_chip_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(button1)\n .addButtonContent(button2)\n .addButtonContent(button3)\n .addButtonContent(button4)\n .addButtonContent(button5)\n .setFiveButtonDistribution(\n MultiButtonLayout\n .FIVE_BUTTON_DISTRIBUTION_BOTTOM_HEAVY)\n .build())\n .setPrimaryChipContent(primaryChipBuilder.build())\n .build());\n testCases.put(\n \"multibutton_layout_6button_golden\" + goldenSuffix,\n new PrimaryLayout.Builder(deviceParameters)\n .setContent(\n new MultiButtonLayout.Builder()\n .addButtonContent(button1)\n .addButtonContent(button2)\n .addButtonContent(button3)\n .addButtonContent(button4)\n .addButtonContent(button5)\n .addButtonContent(button6)\n .build())\n .build());\n testCases.put(\n \"multibutton_layout_7button_golden\" + goldenSuffix,\n new MultiButtonLayout.Builder()\n .addButtonContent(button1)\n .addButtonContent(button2)\n .addButtonContent(button3)\n .addButtonContent(button4)\n .addButtonContent(button5)\n .addButtonContent(button6)\n .addButtonContent(button7)\n .build());\n\n return testCases;\n }", "public static void main(String[] args)\r\n {\r\n //GammaDistribution gam = new GammaDistribution(10.0, 20.0);\r\n //double gamR = gam.sample();\r\n //System.out.println(gamR);\r\n \r\n for(String s : args)\r\n {\r\n System.out.println(s);\r\n }\r\n //if we run the code without any arguments then use default, else overwrite\r\n int lnth = args.length; \r\n if (lnth != 0 ) {\r\n int diff = 0;\r\n try {\r\n //totalT = Integer.valueOf(args[0+diff]);\r\n //totalY = Integer.valueOf(args[1+diff]);\r\n //totalYears = Integer.valueOf(args[2+diff]);\r\n dataSet = args[0+diff];\r\n yrs = Integer.valueOf(args[1+diff]);\r\n spreadYrs = Integer.valueOf(args[2+diff]);\r\n maxDepth = Integer.valueOf(args[3+diff]);\r\n popSize = Integer.valueOf(args[4+diff]);\r\n tournamentSize = (popSize / 100) - 1;\r\n mutProb = Double.valueOf(args[5+diff]);\r\n xoverProb = Double.valueOf(args[6+diff]); \r\n elitismPercentage = Double.valueOf(args[7+diff]);\r\n primProb = Double.valueOf(args[8+diff]);\r\n terminalNodeCrossBias = Double.valueOf(args[9+diff]);\r\n nGens = Integer.valueOf(args[10+diff]);\r\n lowerLowBound = Double.valueOf(args[11+diff]);\r\n lowerUpBound = Double.valueOf(args[12+diff]);\r\n upperLowBound = Double.valueOf(args[13+diff]);\r\n upperUpBound = Double.valueOf(args[14+diff]);\r\n movingAverage = Integer.valueOf(args[15+diff]);\r\n totalNumParams = 0;\r\n additionalParameters = 0;\r\n parameterIndex.add(0);\r\n for (int i = 16; i < args.length -1 + diff; i++) { // minus 1 as the last parameter is whether to use bound \r\n if (Integer.valueOf(args[i]) == 1) { \r\n totalNumParams++;\r\n parameterIndex.add(i-15); //parameterIndex starts from 1, becuase my pred value is in column 0\r\n if (i >= args.length -9 + diff) {//minus 1 to compensate for last value and minus 8 for the 9 parameters\r\n additionalParameters++;\r\n }\r\n } \r\n }\r\n lowerBound = Integer.valueOf(args[args.length - 1]); //last value is whether to use a lower bound\r\n } catch (ArrayIndexOutOfBoundsException t) {\r\n System.out.println(\"args not enough, please check\");\r\n }\r\n } else {\r\n for (int i = 0; i < totalNumParams; i++) {\r\n parameterIndex.add(i);\r\n }\r\n }\r\n FReader read = new FReader();\r\n header = read.readHeader(\"Data/header.txt\");\r\n parametersLength = header.length - 9; //take away the 9 parameters that will be calculated within GP\r\n \r\n Expr[] evolvedMethodParameters = new Expr[totalNumParams-1];\r\n eval = new PredictionEvaluatorTrue2(nRuns, contractLength, parameterIndex, parametersLength, additionalParameters);\r\n \r\n Function evolvedMethod = new Function(Double.TYPE, new Class[0]);\r\n TreeManager.evolvedMethod = evolvedMethod;\r\n \r\n \r\n for (int i=0; i<totalNumParams-1; i++) {\r\n \r\n evolvedMethodParameters[i] = new Parameter(i);\r\n } \r\n TreeManager.evolvedMethodParameters = evolvedMethodParameters;\r\n \r\n ArrayList methodSet = new ArrayList();\r\n methodSet.add(ADD);\r\n methodSet.add(SUB);\r\n methodSet.add(MUL);\r\n methodSet.add(DIV);\r\n methodSet.add(LOG);\r\n methodSet.add(SQRT);\r\n methodSet.add(POW);\r\n methodSet.add(MOD);\r\n //methodSet.add(SIN);\r\n //methodSet.add(COS);\r\n methodSet.add(EXP);\r\n\r\n\r\n Random r = new Random();\r\n ArrayList terminalSet = new ArrayList();\r\n// for (int i = 0; i < terminals; i++)\r\n// {\r\n// double rc = r.nextDouble();\r\n// terminalSet.add(new Constant(new Double(rc * 100.0D), Double.TYPE)); //Building in a function representing random numbers minimum and maximum, consider avearge\r\n// }\r\n// \r\n// //Add in numbers between 0 and 2 in blocks of 0.05 for the purpose of weights\r\n// \r\n// for (int i = 0; i < weights; i++)\r\n// {\r\n// double rc = (1 + i) * 0.05;\r\n// terminalSet.add(new Constant(new Double(rc), Double.TYPE));\r\n// }\r\n \r\n //terminalSet.add(new Constant(new Double(0.0D), Double.TYPE));\r\n //terminalSet.add(new Constant(new Double(3.141592653589793D), Double.TYPE));\r\n \r\n //For old data\r\n //Dynamically adds the number of parameters to be estimated, need to refer to data to input correct values\r\n //for (int i = 0; i < totalT; i++) {\r\n // terminalSet.add(new Parameter(i, Double.TYPE, Boolean.valueOf(true), \"Rain_t-\"+(i+1)));\r\n //}\r\n //for (int i = 0; i < totalY; i++) {\r\n // terminalSet.add(new Parameter(i+totalT, Double.TYPE, Boolean.valueOf(true), \"Year_t-\"+(i+1)));\r\n //}\r\n \r\n //For new data have headers read in and name accordingly.\r\n \r\n for (int i = 0; i < totalNumParams-1; i++) {\r\n terminalSet.add(new Parameter(i, Double.TYPE, Boolean.valueOf(true), header[parameterIndex.get(i)]));\r\n }\r\n \r\n \r\n //consider 3 ERC's one big range, 2 smaller ranges between -1 and 1\r\n terminalSet.add(new Constant(\"ERC\", Double.TYPE));\r\n terminalSet.add(new Constant(\"ERC2\", Double.TYPE));\r\n terminalSet.add(new Constant(\"ERC3\", Double.TYPE));\r\n \r\n double primProb = 0.6D;\r\n double terminalNodeCrossBias = 0.1D;\r\n TreeManager tm = new TreeManager(methodSet, terminalSet, primProb, maxInitialDepth, maxDepth, terminalNodeCrossBias);\r\n \r\n\r\n\r\n\r\n System.out.println(\"============= Experimental parameters =============\");\r\n System.out.println(\"Maximum initial depth: \" + maxInitialDepth);\r\n System.out.println(\"Maximum depth: \" + maxDepth);\r\n System.out.println(\"Primitive probability in Grow method: \" + primProb);\r\n System.out.println(\"Terminal node crossover bias: \" + terminalNodeCrossBias);\r\n System.out.println(\"No of generations: \" + nGens);\r\n System.out.println(\"Population size: \" + popSize);\r\n System.out.println(\"Tournament size: \" + tournamentSize);\r\n System.out.println(\"Crossover probability: \" + xoverProb);\r\n System.out.println(\"Reproduction probability: \" + (1.0D - xoverProb));\r\n System.out.println(\"Mutation probalitity: \" + mutProb);\r\n System.out.println(\"Elitism percentage: \" + elitismPercentage);\r\n System.out.println(\"===================================================\");\r\n \r\n \r\n \r\n \r\n \r\n StatisticalSummary.logExperimentSetup(methodSet, terminalSet, maxInitialDepth, maxDepth, primProb, terminalNodeCrossBias, nGens, popSize, tournamentSize, mutProb, xoverProb); \r\n \r\n StatisticalSummary stat = null;\r\n filenameS = \"Results/Results_\"+yrs+\"_\"+spreadYrs+\"_MA\"+movingAverage+\"_\"+contractLength;\r\n for (int i = 0; i < nRuns; i++)\r\n {\r\n System.out.println(\"========================== Experiment \" + i + \" ==================================\");\r\n File experiment = new File(filenameS + \"/Experiment \"+i);\r\n experiment.mkdirs();\r\n stat = new StatisticalSummary(nGens, popSize, i);\r\n alg = new GA(tm, eval, popSize, tournamentSize, stat, mutProb, elitismPercentage, xoverProb, nRuns);\r\n alg.evolve(nGens, i);\r\n System.out.println(\"===============================================================================\");\r\n }\r\n}", "protected abstract void generate();", "public void runTest() throws Exception {\n\n System.out.println(schemaFile.getPath());\n \n\t\t\tDriver driver = new Driver();\t// generator instance.\n\t\t\t\t\n\t\t\t// parse parameters\n\t\t\tdriver.parseArguments(new String[]{\"-seed\",\"0\", \"-n\",\"30\", \"-quiet\"});\n\t\t\t\t\n\t\t\t// parse example documents\n Iterator itr = examples.iterator();\n\t\t\twhile( itr.hasNext() ) {\n\t\t\t\tFile example = (File)itr.next();\n \n reader.setContentHandler( new ExampleReader(driver.exampleTokens) );\n reader.parse( com.sun.msv.util.Util.getInputSource(example.getAbsolutePath()) );\n\t\t\t}\n\t\t\t\t\n\t\t\t// set the grammar\n\t\t\tISchema schema = validator.parseSchema(schemaFile);\n\t\t\tassertNotNull( \"failed to parse the schema\", schema );\n\t\t\tdriver.grammar = schema.asGrammar();\n\t\t\tdriver.outputName = \"NUL\";\n\t\t\t\t\n\t\t\t// run the test\n\t\t\tassertEquals( \"generator for \"+schemaFile.getName(), driver.run(System.out), 0 );\n\t\t\t\t\n\t\t\t\t\n\t\t\t// parse additional parameter\n\t\t\t// generally, calling the parseArguments method more than once\n\t\t\t// is not supported. So this is a hack.\n\t\t\tdriver.parseArguments(new String[]{\"-error\",\"10/100\"});\n\n\t\t\tassertEquals( \"generator for \"+schemaFile.getName(), driver.run(System.out), 0 );\n\t\t}", "@Test\n public void testNpara() {\n System.out.println(\"npara\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(2, instance.npara());\n }", "public static void main(String[] args) throws Exception {\n System.out.println(TotpUtil.generate(\"EH5VU5ZP2GXEWXRSOAMAFDSVE6RMH2V7TVZ2P55G4SOYUK3N2LQE4DICGCJXA5Y4DG554AT4T5EIJP2XS45A4WUST6LNZY7CZNBIDJQ\"));\n }", "abstract T generate();", "public static void main (String[] args){\n\n Graph test = new Graph(30,\"/main/graphs/test30\");\n Graph test2 = new Graph(5,\"/main/graphs/graph5\");\n Graph g1 = new Graph(30,\"/main/graphs/graph30\");\n Graph g2 = new Graph(50,\"/main/graphs/graph50\");\n Graph g3 = new Graph(55,\"/main/graphs/graph55\");\n Graph g4 = new Graph(60,\"/main/graphs/graph60\");\n Graph g5 = new Graph(65,\"/main/graphs/graph65\");\n Graph g6 = new Graph(70,\"/main/graphs/graph70\");\n Graph g7 = new Graph(75,\"/main/graphs/graph75\");\n Graph g8 = new Graph(80,\"/main/graphs/graph80\");\n Graph g9 = new Graph(85,\"/main/graphs/graph85\");\n Graph g10 = new Graph(90,\"/main/graphs/graph90\");\n Graph g11= new Graph(100,\"/main/graphs/graph100\");\n Graph g12= new Graph(200,\"/main/graphs/graph200\");\n Graph g13= new Graph(200,\"/main/graphs/graph200_2\");\n\n Algo algo = new Algo(test);\n System.out.println(\"Graphe test : \" + algo.runNtimes((int) (10*Math.pow(2,30/2))));\n\n algo = new Algo(g1);\n System.out.println(\"Graphe a 30 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,30/2))));\n\n algo = new Algo(g2);\n System.out.println(\"Graphe a 50 sommets : \" +algo.runNtimes((int) (10*Math.pow(2,50/2))));\n\n algo = new Algo(g3);\n System.out.println(\"Graphe a 55 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,55/2))));\n\n algo = new Algo(g4);\n System.out.println(\"Graphe a 60 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,60/2))));\n\n algo = new Algo(g5);\n System.out.println(\"Graphe a 65 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,65/2))));\n\n algo = new Algo(g6);\n System.out.println(\"Graphe a 70 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,70/2))));\n\n algo = new Algo(g7);\n System.out.println(\"Graphe a 75 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,75/2))));\n\n algo = new Algo(g8);\n System.out.println(\"Graphe a 80 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,80/2))));\n\n algo = new Algo(g9);\n System.out.println(\"Graphe a 85 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,85/2))));\n\n algo = new Algo(g10);\n System.out.println(\"Graphe a 90 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,90/2))));\n\n algo = new Algo(g11);\n System.out.println(\"Graphe a 100 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,100/2))));\n\n algo = new Algo(g12);\n System.out.println(\"Graphe a 200 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,200/2))));\n\n algo = new Algo(g13);\n System.out.println(\"Graphe a 200 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,200/2))));\n\n }", "@Test\n public void functionalityTest() {\n new TestBuilder()\n .setModel(MODEL_PATH)\n .setContext(new ModelImplementationGroup3())\n .setPathGenerator(new RandomPath(new EdgeCoverage(100)))\n .setStart(\"e_GoToPage\")\n .execute();\n }", "public static void main(String[] args) throws IOException {\n\t\tint numSets = 10000;//10000;//500\r\n\t\tint numElements = 1000;//1000; //50\r\n\t\t\r\n//\t\tint[] betas = {2, 4, 8, 16, 32};\r\n//\t\tString[] probfiles = {\"scpnrg1.txt\", \"scpnrg2.txt\", \"scpnrg5.txt\"};\r\n//\t\tString[] probfiles = {\"scpnrh1.txt\", \"scpnrh3.txt\", \"scpnrh5.txt\"};\r\n\t\tint[] betas = {5};\r\n\t\tString[] probfiles = {\"scpnrg1.txt\", \"scpnrg5.txt\"};\r\n\t\tint numTimesRun = 1;\r\n\t\tint runningTime = 10;\r\n\t\tPrintWriter printWriter = new PrintWriter(new File(\"tuning_testIII.csv\"));\r\n\t\tfor(String dataset: probfiles){\r\n\t\t\tStringBuilder stringBuilder = new StringBuilder();\r\n\t\t\tfor(int beta: betas){\r\n\t\t\t\tfor(int i =0 ; i<numTimesRun; i++){\r\n\t\t\t\tDataObject data = new DataObject((\"src/\" + dataset), numSets);\r\n\t\t\t\tGRASP1 grasp = new GRASP1(numElements, numSets, data.getSets());\r\n\t\t\t\tint solution = grasp.run(runningTime, beta);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tstringBuilder.append(\"Profiles: \" + \";\" + dataset + \";\");\r\n\t\t\t\tstringBuilder.append(\"The beta value: \" + \";\" + beta + \";\");\r\n\t\t\t\tstringBuilder.append(\"ItrationCount\" + \";\" + grasp.itrationCount + \";\");\r\n\t\t\t\tstringBuilder.append(\"Solution value: \" + \";\" + solution + \"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tprintWriter.write(stringBuilder.toString());\r\n\t\t}\r\n\t\tprintWriter.close();\r\n\t\tSystem.out.println(\"done!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\");\r\n\r\n\t}", "public abstract void generate();", "private static List<TestSetup> getTests() {\n PivotPicker middlePiv = Quick::alwaysPickMiddle;\n\n // Pivot Pickers\n PivotPicker leftPiv = Quick::alwaysPickLeftmost;\n PivotPicker rightPiv = Quick::alwaysPickRightmost;\n PivotPicker motPiv = Quick::medianOfThree;\n PivotPicker[] pivots = {leftPiv, middlePiv, rightPiv, motPiv};\n String[] pivotNames = {\"Always Pick Leftmost\", \"Always Pick Middle\", \"Always Pick Rightmost\", \"Median Of Three\"};\n\n // Partitioning methods\n Partitioner jonPart = (array, left, right, pivot) -> partition_Jon(array, left, right, pivot);\n Partitioner lomutoPart = Quick::partition_Lomuto;\n Partitioner hoarePart = Quick::partition_Hoare;\n Partitioner[] partitioners = {lomutoPart, hoarePart};\n String[] partNames = {\"lomuto\", \"hoare\"};\n\n // Subsort methods and sizes\n Subsort insertionSub = Quick::insertionSort;\n Subsort[] subsorts = {insertionSub};\n String[] subsortNames = {\"insertion\"};\n List<Integer> sizes = new ArrayList<>();\n for (int i = 3; i < 128; i = 1 + (int) (i * 1.45)) {\n sizes.add(i);\n }\n Integer[] subsortSizes = sizes.toArray(new Integer[sizes.size()]);\n\n // Data generators\n Generator randomGen = (size) -> {\n return generateArray(100, 999, size);\n };\n Generator sortedGen = (size) -> {\n int[] arr = new int[size];\n for (int i = 0; i < arr.length; i++) {\n arr[i] = i;\n }\n return arr;\n };\n Generator reversedGen = (size) -> {\n int[] arr = new int[size];\n for (int i = 0; i < arr.length; i++) {\n arr[i] = arr.length - i;\n }\n return arr;\n };\n Generator[] generators = {\n randomGen,\n //sortedGen, reversedGen,\n //(size) -> { return generateArray(10000, 99999, size, 0xDEADBEEF); },\n //(size) -> { return generateArray(10000, 99999, size, 0xCAFEBABE); },\n //(size) -> { return generateArray(10000, 99999, size, 0xBAADF00D); },\n\n };\n String[] generatorNames = {\n \"Random\",\n //\"sorted\", \"reversed\",\n //\"Sequence:0xDEADBEEF\",\n //\"Sequence:0xCAFEBABE\",\n //\"Sequence:0xBAADF00D\",\n };\n\n // Default test data\n TestSetup defaultTest = new TestSetup(\"Default\", null, null, 0, null, null);\n\n List<TestSetup> tests = new ArrayList<>();\n tests.add(defaultTest);\n List<TestSetup> temp = new ArrayList<>();\n { // Block for creating partition method variants\n\n\n // Create variations of the test with different partitioning methods\n for (TestSetup setup : tests) {\n\n for (int i = 0; i < partitioners.length; i++) {\n TestSetup variant = new TestSetup(setup, partNames[i]);\n variant.part = partitioners[i];\n temp.add(variant);\n }\n }\n }\n\n // Swap arrays (don't want to add to a collection we're iterating)\n tests = temp;\n temp = new ArrayList<>();\n // Create variations of the test with different pivot picking methods\n for (TestSetup setup : tests) {\n //temp.add(setup);\n\n for (int i = 0; i < pivots.length; i++) {\n TestSetup variant = new TestSetup(setup, setup.name + \" + \" + pivotNames[i]);\n variant.pivp = pivots[i];\n temp.add(variant);\n }\n }\n\n { // Block for creating generator (dataset) variants\n // Swap arrays (don't want to add to a collection we're iterating)\n tests = temp;\n temp = new ArrayList<>();\n\n // Create variations of the test with different data generation methods\n for (TestSetup setup : tests) {\n //temp.add(setup);\n\n for (int i = 0; i < generators.length; i++) {\n TestSetup variant = new TestSetup(setup, setup.name + \" on \" + generatorNames[i] + \" data\");\n variant.gen = generators[i];\n temp.add(variant);\n }\n }\n }\n\n\n { // Block for creating subsort variants\n // Swap arrays (don't want to add to a collection we're iterating)\n tests = temp;\n temp = new ArrayList<>();\n\n // Create variations of the test with different subsort methods and thresholds\n for (TestSetup setup : tests) {\n temp.add(setup);\n\n for (int i = 0; i < subsorts.length; i++) {\n // And also one version for each size!\n for (int k = 0; k < subsortSizes.length; k++) {\n TestSetup variant = new TestSetup(setup, setup.name + \"+\" + subsortNames[i] + \" below \" + subsortSizes[k]);\n variant.sst = subsortSizes[k];\n variant.ssort = subsorts[i];\n //temp.add(variant);\n\n TestSetup variant_finalSort = new TestSetup(variant, variant.name + \" once at end\");\n variant_finalSort.sortFinal = true;\n temp.add(variant_finalSort);\n }\n }\n }\n }\n\n\n // Return completed variation list\n return temp;\n }", "Bundle generate(Map<String, TestResult> rawResults);", "public void runTests() throws Exception {\n\t\tArrayList<KaidaComposer> als = getCrossOverPermutationTest();\r\n//\t\tArrayList<KaidaComposer> als = getMutationProbabilityTests();\r\n\t\t\r\n\t\tsynchronized (results) {\r\n\t\t\tresults.clear();\r\n\t\t\tfor (KaidaComposer al : als) {\r\n\t\t\t\tresults.add(new TestRunGenerationStatistics(nrOfContests,nrOfGenerations,al.getLabel(),al));\t\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tsetProgress(0f);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tfor (int runs = 0; runs < nrOfContests; runs++) {\r\n\t\t\t//run the test n times\r\n\t\t\t\r\n\t\t\t\tSystem.out.println(\"\\nContest Nr. \" + runs + \" started\");\r\n\t\t\t\tTimer t = new Timer(\"Contest Nr. \" + runs);\r\n\t\t\t\tt.start();\r\n\t\t\t\t\r\n\t\t\t\tfor (KaidaComposer algorithm : als) {\r\n\t\t\t\t\talgorithm.restartOrTakeOver();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (int g = 0; g < nrOfGenerations; g++) {\r\n\t\t\t\t\t//do one evolution step\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (KaidaComposer algorithm : als) {\r\n\t\t\t\t\t\tif (algorithm.isCycleCompleted()) {\r\n\t\t\t\t\t\t\talgorithm.startNextCycle();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\talgorithm.doOneEvolutionCycle();\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\tt.stopAndPrint();\r\n\t\t\t\tt.start(\"Adding to results\");\r\n\t\t\t\tsynchronized (results) {\r\n\t\t\t\t\tfor (int z=0; z < als.size(); z++) {\r\n\t\t\t\t\t\tresults.get(z).addTestRun(als.get(z).getGenerations().getRange(0,nrOfGenerations));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tt.stopAndPrint();\r\n\t\t\t\tt.start(\"Calculating statistics\");\r\n\t\t\t\tsynchronized (results) {\r\n\t\t\t\t\tfor (int z=0; z < als.size(); z++) {\r\n\t\t\t\t\t\tresults.get(z).calculateStats();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tt.stopAndPrint();\r\n\t\t\t\t\r\n\t\t\t\tsetProgress((double)runs/(double)(nrOfContests-1));\r\n\t\t\t\t\r\n\t\t\t\tif (pause!=0) {\r\n\t\t\t\t\tsleep(pause);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (isPleasePause()) break;\r\n\t\t\t}\r\n\t\t\tsynchronized (results) {\r\n\t\t\t\tfor (int z=0; z < als.size(); z++) { //als.size()\r\n\t\t\t\t\tresults.get(z).calculateStats();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsetProgress(1.0f);\r\n\t\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t//fail(\"al threw some Exception\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}", "public static void test(String[] args) {\n TestOrg test = new TestOrg(\"Test_OutTextPreparer\", 1, args);\n try {\n //Note: The creation of the test instance may cause errors if the OutTextPreparer construction\n //fails because errors in the pattern. It is reported in C# in the calling level of this routine already \n //because the calling of this static routine is loaded and created the type already.\n Test_OutTextPreparer_CallFor testObj = new Test_OutTextPreparer_CallFor();\n //nonsense: test.testClassic();\n testObj.testCall(test);\n \n } catch (Exception e) {\n test.exception(e);\n }\n test.finish();\n }", "private void getConfigParameters(String[] parameters, Map<String, String> params,\n String testName) {\n for (int i = 0; i < parameters.length; i++) {\n params.put(parameters[i], null);\n }\n Log.v(TAG, \"[\" + testName + \"] \" + \"params.size() = \" + params.size());\n File f = new File(CONFIG_FILE);\n assertTrue(testName + \" test file not exists: \" + CONFIG_FILE, f.exists());\n // test suite\n XmlParser parser = new XmlParser(CONFIG_FILE);\n Node testSuiteNode = parser.getRootNode();\n String testSuiteName = parser.getAttrValue(testSuiteNode, \"name\");\n Log.v(TAG, \"[\" + testName + \"] \" + \"testSuiteName = \" + testSuiteName);\n // test case\n Node testCaseNode = null;\n String testCaseName = null;\n NodeList nodeListTestCase = parser.getNodeList(testSuiteNode, \"TestCase\");\n for (int i = 0; i < nodeListTestCase.getLength(); i++) {\n testCaseNode = nodeListTestCase.item(i);\n String tempTestCaseName = parser.getAttrValue(testCaseNode, \"name\");\n Log.v(TAG, \"[\" + testName + \"] \" + \"testCaseName = \" + tempTestCaseName);\n if (0 == tempTestCaseName.compareTo(TAG)) {\n testCaseName = tempTestCaseName;\n break;\n }\n }\n // test\n NodeList nodeList = parser.getNodeList(testCaseNode, \"Test\");\n for (int i = 0; i < nodeList.getLength(); i++) {\n Node testNode = nodeList.item(i);\n String tempTestName = parser.getAttrValue(testNode, \"name\");\n Log.v(TAG, \"[\" + testName + \"] \" + \"testName = \" + tempTestName);\n if (0 == tempTestName.compareTo(testName)) {\n for (int j = 0; j < params.size(); j++) {\n String attrValue = parser.getAttrValue(parser.getNodeByName(testNode,\n parameters[j]), \"value\");\n params.put(parameters[j], attrValue);\n Log.v(TAG, \"[\" + testName + \"] \" + \"param = \" + parameters[j] + \" value = \"\n + params.get(parameters[j]));\n }\n break;\n }\n }\n }", "public static void main(String[]args){\n int machineSize = Integer.parseInt(args[0]);\n int pageSize = Integer.parseInt(args[1]);\n int processSize = Integer.parseInt(args[2]);\n int jobType = Integer.parseInt(args[3]);\n int numReferencesPerProcess = Integer.parseInt(args[4]);\n String replacementType = args[5];\n\n int totalNumPages = (int) Math.ceil((double)machineSize/pageSize);\n\n demandPaging demandPagingTest = new demandPaging(machineSize, pageSize, processSize, numReferencesPerProcess, jobType, totalNumPages, replacementType);\n demandPagingTest.doSimulation();\n\n\n\n }", "public static void main(String[] args) {\n testFactoryMethod();\n }", "private static String testGetRandomInstance(int iterations)\n {\n String output = \"\";\n for (int i = 0; i < iterations; i++) \n {\n output += \"Saying hello to the random greeter: \" \n + Greeter.getRandomInstance().sayHello() + \"\\n\";\n }\n return output;\n }", "@Override\r\n public void execute() throws BuildException { \r\n AbstractGenerator g;\r\n \r\n if (kind == null) {\r\n throw new BuildException(\"kind was not specified\");\r\n }\r\n final String k = kind.getValue();\r\n if (k.equals(INTERFACE)) {\r\n g = new InterfaceGen();\r\n }\r\n else if (k.equals(CRYSTAL)) {\r\n g = new CrystalGen();\r\n }\r\n else if (k.equals(OPERATOR)) {\r\n g = new OperatorGen();\r\n }\r\n else {\r\n throw new BuildException(\"Unknown kind was specified: \"+kind);\r\n }\r\n if (dest != null) {\r\n srcs.add(0, \"-out\");\r\n srcs.add(1, dest);\r\n }\r\n g.generate(srcs.toArray(new String[srcs.size()]));\r\n }", "public static void main(String args[]) throws Exception\t{\n\t\tScanner sc = new Scanner(new FileInputStream(\"sample_input_dominotrilling.txt\"));\r\n\r\n\t\tint T = sc.nextInt();\r\n\t\tfor(int test_case = 0; test_case < T; test_case++) {\r\n\t\t\tN = sc.nextInt();\r\n\t\t\tM = sc.nextInt();\r\n\t\t\t\r\n\t\t\t/**********************************\r\n\t\t\t* Implement your algorithm here. *\r\n\t\t\t***********************************/\r\n\t\t\tAnswer = 0;\r\n//\t\t\tAnswer = calculateSum(N) % M;\r\n\t\t\tAnswer = calculateSum(N,M);\r\n\t\t\t// Print the answer to standard output(screen).\r\n\t\t\tSystem.out.println(Answer);\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\t}", "private String generateChart() {\r\n\t\tint passedTestCount = data.getNumberofTestPassed();\r\n\t\tint skippedTestCount = data.getNumberofTestSkipped();\r\n\t\tint failedTestCount = data.getNumberofTestFailed();\r\n\r\n\t\tString script = \"<script>var svg = d3.select('svg'),\"\r\n\t\t\t\t+ \"margin = {top: 30, right: 20, bottom: 20, left: 50},\"\r\n\t\t\t\t+ \"width = +svg.attr('width') - margin.left - margin.right,\"\r\n\t\t\t\t+ \"height = +svg.attr('height') - margin.top - margin.bottom;\"\r\n\t\t\t\t+ \"var x = d3.scaleBand().range([0, 450]),\"\r\n\t\t\t\t+ \"y = d3.scaleLinear().rangeRound([230, 0]);\"\r\n\t\t\t\t+ \"var g = svg.append('g').attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');\"\r\n\t\t\t\t+\r\n\r\n\t\t\t\t\"var data = [{'name':'Pass','value':\"\r\n\t\t\t\t+ passedTestCount\r\n\t\t\t\t+ \"},{'name':'FaiL','value':\"\r\n\t\t\t\t+ failedTestCount\r\n\t\t\t\t+ \"},{'name':'Skip','value':\"\r\n\t\t\t\t+ skippedTestCount\r\n\t\t\t\t+ \"}];\"\r\n\t\t\t\t+\r\n\r\n\t\t\t\t\"var max = 0;\"\r\n\t\t\t\t+ \"var index = 0;\"\r\n\t\t\t\t+ \"for(index=0;index<data.length;index++) {\"\r\n\t\t\t\t+ \"if(max<data[index]['value']) {\"\r\n\t\t\t\t+ \"max = data[index]['value']; } }\"\r\n\t\t\t\t+ \"max = max%2 ==0? max : max +1;\"\r\n\t\t\t\t+ \"x.domain(data.map(function(d) { return d.name; }));\"\r\n\t\t\t\t+ \"y.domain([0, max]);\"\r\n\t\t\t\t+ \"g.append('g').attr('class', 'axis axis--x')\"\r\n\t\t\t\t+ \".attr('transform', 'translate(0,' + height + ')')\"\r\n\t\t\t\t+ \".call(d3.axisBottom(x)).attr('stroke', '#000000');\"\r\n\t\t\t\t+ \"g.append('g').attr('class', 'axis axis--y')\"\r\n\t\t\t\t+ \".call(d3.axisLeft(y).ticks(3)).attr('stroke', '#000000')\"\r\n\t\t\t\t+ \".append('text').attr('transform', 'rotate(-90)').attr('y', 6)\"\r\n\t\t\t\t+ \".attr('dy', '0.71em').attr('text-anchor', 'end');\"\r\n\t\t\t\t+ \"d3.selectAll('line').attr('stroke', '#000000');\"\r\n\t\t\t\t+ \"d3.selectAll('path').attr('stroke', '#000000');\"\r\n\t\t\t\t+ \"var temp=0;\"\r\n\t\t\t\t+ \"g.selectAll('.bar').data(data).enter().append('rect').attr('class', 'bar')\"\r\n\t\t\t\t+ \".attr('x', function(d) {return x(d.name)+50; })\"\r\n\t\t\t\t+ \".attr('y', function(d) { return y(d.value); })\"\r\n\t\t\t\t+ \".attr('width', 50)\"\r\n\t\t\t\t+ \".attr('height', function(d) { return height - y(d.value); }).attr('fill','#ff9900')\"\r\n\t\t\t\t+ \".attr('data-name',function(d){return d.name})\"\r\n\t\t\t\t+ \".attr('data-value',function(d){return d.value}).attr('height', 0).transition().duration(1000).delay(200).attr('height', function (d, i) {return height - y(d.value);});;</script>\";\r\n\t\treturn script;\r\n\t}", "public static void main (String [] args) {\r\n TestNG runner= new TestNG();\r\n suitefiles=new ArrayList<String>();\r\n checkarguments(args);\r\n //suitefiles.add(\"C:\\\\data\\\\workspace\\\\webauto\\\\Suites.xml\");\r\n runner.setTestSuites(suitefiles);\r\n runner.run();\r\n }", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint T = s.nextInt(); //number of tests\n\t\t\n\t\tfor(int i = 0; i < T; i++) {\n\t\t\tint N = s.nextInt(); //number of students\n\t\t\tint P = s.nextInt(); //number of students to pick\n\t\t\t\n\t\t\t//Get all skill scores\n\t\t\tint[] skillOfAllStudents = new int[N];\n\t\t\tfor(int j = 0; j < N; j++) {\n\t\t\t\tskillOfAllStudents[j] = s.nextInt();\n\t\t\t}\n\t\t\t\n\t\t\t//Sort\n\t\t\tArrays.sort(skillOfAllStudents);\n\t\t\t\n\t\t\t//Find min number of hours to get a fair team\n\t\t\t//Go from largest down to smallest. take however many needed from the right and calculate amount needed for fair team\n\t\t\tint numHours = Integer.MAX_VALUE;\n\t\t\t\n\t\t\tfor(int l = N-1; l > P-2; l--) {\n\t\t\t\tint tempSkill = 0;\n\t\t\t\t\n\t\t\t\tint highest = skillOfAllStudents[l];\n\t\t\t\tfor(int k = l-1; k > l - P; k--) {\n\t\t\t\t\ttempSkill += (highest - skillOfAllStudents[k]);\n\t\t\t\t\t//System.out.println(\"intermediate #1: \" + tempSkill );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(tempSkill < numHours) {\n\t\t\t\t\tnumHours = tempSkill;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Print solution\n\t\t\tSystem.out.println(\"Case #\" + (i+1) + \": \" + numHours);\n\t\t}\n\t}", "public static void main(String[] args)\r\n\t{\r\n\t\t// create the suite of tests\r\n\t\t/*final TestSuite tSuite = new TestSuite();\r\n\t\ttSuite.addTest(new PersonDaoGenericTest(\"testSavePerson\"));\r\n\t\ttSuite.addTest(new PersonDaoGenericTest(\"testLoadPerson\"));\r\n\t\tTestRunner.run(tSuite);*/\r\n\t}", "@Test\r\n\tpublic void generateFile() {\n\t\tfor (int i = 1; i <= 5; i++) {\r\n\t\t\t// String filePath = \"C://Users//AtifKhan//Desktop//sample-\" + i +\r\n\t\t\t// \".csv\";\r\n\t\t\tString filePath = \"C://Users//olcay tarazan//Desktop//sample-\" + i + \".csv\";\r\n\t\t\tint numberOfDataLines = 400;\r\n\t\t\ttry {\r\n\t\t\t\tgenerateCsvFile(filePath, numberOfDataLines);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"File generated : sample-\" + i + \".csv \");\r\n\t\t}\r\n\t}", "public GenerateRandomInstances(int n) {\r\n this.sources = new Source[n];\r\n this.sources[0] = new Factory(\"S\" + 0, (int) (Math.random() * 50) + 10);\r\n for (int i = 1; i < n; i++) { // generate random values for supply\r\n this.sources[i] = new Warehouse(\"S\" + i, (int) (Math.random() * 50) + 10);\r\n //sum += this.sources[i].getSupply();\r\n }\r\n this.destinations = new Destination[n];\r\n for (int i = 0; i < n; i++) { // generate random values for supply\r\n this.destinations[i] = new Destination(\"D\" + i, (int) (Math.random() * 50) + 10);\r\n }\r\n this.costMatrix = new int[n][n];\r\n for (int k = 0; k < n; k++) { // generate random values for cost matrix\r\n for (int j = 0; j < n; j++) {\r\n this.costMatrix[k][j] = (int) (Math.random() * 9) + 1;\r\n }\r\n }\r\n }", "@Test\n public void testCrear() {\n System.out.println(\"crear\");\n usuarioController.crear(usuario1);\n usuarioController.crear(usuario2);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public static void main(String[] args) {\n\t\tTestingPerformanceCalculator obj= new TestingPerformanceCalculator(\"./data/gitInfoNew.txt\", \"data/Results/FinalResultSidTest1.txt\");\n\t\t//Read Gold set\n\t\tobj.goldStMap=obj.LoadGoldSet();\n\t\t//MiscUtility.showResult(10, obj.goldStMap);\n\t\t//Resd output file/ test result file\n\t\tobj.finalResult=obj.LoadTestingResult();\n\t\t//MiscUtility.showResult(20, obj.finalResult);\n\t\t\n\t\t\n\t\t//Create a ranked list\n\t\t//obj.produceRankedResult(10);\n\t\tArrayList<String> rankedFinalTestingResult=obj.produceRankedResult(10);\n\t\tContentWriter.writeContent(\"./data/testing1RankedResult.txt\", rankedFinalTestingResult);\n\t\t//call another class BLPerformanceCalc to compute\n\t\t\n\t\t\n\t}", "public Integer call() throws IOException {\n \t\t\tint ret=90;\n \t\t\ttestCases = new ArrayList<String>();\n \t\t\trealIds = new ArrayList<String>();\n \t \tString path = \"./workspace/\"+jobname;\n\t\t\t\tlistener.getLogger().println(\"IL PATH DEL TESTRUN E' \"+path);\n \t\t\t/* folders = listFilesForFolder(new File(path),listener);\n \t\t\t// cerco il TestRun nell'svn di Polarion\n \tcheck:\tfor(String folder : folders){\n \t \tlistener.getLogger().println(\"confronto: \"+testrunid+\" - \"+folder);\n \t\t\t\tif(testrunid.equals(folder)){ \t\t\t\t\t\n \t\t\t\t\t// prelevo i TestCase relativi al TestRun\n \t\t\t\t\t */\n \t\t\t\t\ttestCases = getTestCases(path,listener);\n \t\t\t\t\tString nometestrun = \"Executed - \"+testrunid+\".xml\";\n \t\t\t\t\tif(!testCases.isEmpty()){\n \t\t\t\t\t\t// prelevo l'ID vero dei Test Case\n\t\t\t\t\t\t\trealIds = getRealTestCaseIdFromPolarion(listener,testCases);\n\t\t\t\t\t\t\tif(type.equals(\"TestMTP\")){ // ESECUZIONE SU MTP\n\t\t\t\t\t\t\t\tlistener.getLogger().println(\"eseguo MTP\");\n\t\t\t\t\t\t\t\tfor(String realId : realIds){\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/* Per l'esecuzione con lo stub (va messa fuori il for per funzionare)\n\t\t \t\t\t\t\tCreaXMLStub stub = new CreaXMLStub(testCases);\n\t\t\t\t\t\t\t\tstub.doTest(\"C:/JenkinsSlave/workspace/\"+jobname+\"/Temp/\"+nometestrun,listener);*/\n\t\t\t\t\t\t\t}else if(type.equals(\"TestMX\")){ // ESECUZIONE SU MICROMAX\n\t\t\t\t\t\t\t\tif(!scenario){\n\t\t\t\t\t\t\t\t\tArrayList<Integer> returnCodes = new ArrayList<Integer>();\n\t\t\t\t\t\t\t\t\tfor(String realId : realIds){\n\t\t\t\t\t\t\t\t\t\t// stampo il realId del test case\n\t\t\t\t\t\t\t \tlistener.getLogger().println(\"TC: \"+realId);\n\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"eseguo MX\");\n\t\t\t\t\t\t\t\t\t\tString[] parameters = realId.split(\",\");\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tProcessBuilder builder = new ProcessBuilder(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"MxVGUI\", \"/n\", \"/r\", mxpath+File.separator+parameters[0]+File.separator+parameters[1]+\".mxp\", mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\"+parameters[2]); \n\t\t\t\t\t\t\t\t\t\t\tbuilder.redirectErrorStream(true); \n\t\t\t\t\t\t\t\t\t\t\tProcess p = builder.start();\n\t\t\t\t\t\t\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\t\t\t\t\t\t\t\t\t\t\tString line;\n\t\t\t\t\t\t\t\t\t\t\twhile ((line = reader.readLine()) != null)\n\t\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"tasklist: \" + line);\n\t\t\t\t\t\t\t\t\t\t\tret=p.waitFor();\n\t\t\t\t\t\t\t\t\t\t\treturnCodes.add(ret);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"eseguito MX \"+ret);\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\tContactPolarion(listener);\n\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(e.getMessage());\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\t//Scrive i risultati in base al valore di ritorno di MxVDEV\n\t\t\t\t\t\t\t\t\twriteTestResults(\"C:/JenkinsSlave/Results/\"+nometestrun, testCases, returnCodes);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//Converto tutti i risultati nel formato desiderato leggendo i log\n\t\t\t\t\t\t\t\t//convertTestCaseResults(realIds, \"C:/JenkinsSlave/workspace/\"+jobname+\"/Temp/\"+nometestrun, testCases);\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//convertScenarioResults(testCases, new ArrayList<String>(), mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\"+testrunid ,testrunid);\n\t\t\t\t\t\t\t\t\tString[] parameters = realIds.get(0).split(\",\");\n\t\t\t\t\t\t\t\t\tScenario scenario = new Scenario(testrunid,realIds,mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\");\n\t\t\t\t\t\t\t\t\tif(scenario.createScenario()){\n\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"Scenario creato\");\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tProcessBuilder builder = new ProcessBuilder(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"MxVGUI\", \"/n\", \"/r\", mxpath+File.separator+parameters[0]+File.separator+parameters[1]+\".mxp\", mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\"+testrunid+\".mxs\"); \n\t\t\t\t\t\t\t\t\t\t\tbuilder.redirectErrorStream(true); \n\t\t\t\t\t\t\t\t\t\t\tProcess p = builder.start();\n\t\t\t\t\t\t\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\t\t\t\t\t\t\t\t\t\t\tString line;\n\t\t\t\t\t\t\t\t\t\t\twhile ((line = reader.readLine()) != null)\n\t\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"tasklist: \" + line);\n\t\t\t\t\t\t\t\t\t\t\tret=p.waitFor();\n\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"eseguito MX \"+ret);\n\t\t\t\t\t\t\t\t\t\t\tconvertScenarioResults(testCases, new ArrayList<String>(), mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\"+testrunid ,testrunid);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\tContactPolarion(listener);\n\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(e.getMessage());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"creazione dello scenario non riuscita\");\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else{ // CONDIZIONE EVENTUALI ERRORI\n\t\t\t\t\t\t\t\tContactPolarion(listener);\n\t\t\t\t\t\t\t\tlistener.getLogger().println(\"condizione inaspettata\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tpublishTest(\"C:/JenkinsSlave/Results/\",sharedpasswd,shareduser,nometestrun, listener, projectname);\n\t\t\t\t\t \t}else{\n\t\t\t\t\t \t\tContactPolarion(listener);\n\t\t\t\t\t \t\tlistener.getLogger().println(\"Nessun tc impostato. Setto tr a open\");\n\t\t\t\t\t \t//}\n\t\t\t\t\t \t//break check;\n \t\t\t\t//}\n \t\t\t}\n \t\t\treturn ret; \t\n \t\t}", "public void fnCreateHtmlReport(String strTestName) {\r\n\r\n //Set the default Operation count as 0\r\n g_OperationCount = 0;\r\n \r\n //Number of default Pass and Fail cases to 0\r\n g_iPassCount = 0;\r\n g_iFailCount = 0;\r\n \r\n //Snapshot count to start from 0\r\n g_iSnapshotCount = 0;\r\n \r\n //script name\r\n g_strScriptName = strTestName;\t\t\r\n\r\n //Set the name for the Test Case Report File\r\n g_strTestCaseReport = Environment.get(\"HTMLREPORTSPATH\") + \"\\\\Report_\" + g_strScriptName + \".html\";\r\n \r\n //Snap Shot folder\r\n g_strSnapshotFolderName = Environment.get(\"SNAPSHOTSFOLDER\") + \"\\\\\" + g_strScriptName;\r\n \r\n //Delete the Summary Folder if present\r\n\t\tFile file = new File(g_strSnapshotFolderName);\r\n\r\n\t\tif (file.exists()) {\r\n\t\t\tfile.delete();\r\n\t\t}\r\n\r\n\t\t//Make a new snapshot folder\r\n\t\tfile.mkdir();\r\n\r\n\t\t//Open the report file to write the report\r\n\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport);\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Write the Test Case name and allied headers into the file\r\n //Write the Test Case name and allied headers into the file\r\n\t\t//Close the html file\r\n\t\ttry \r\n\t\t{\t\t\r\n\t\t\tnew PrintStream(foutStrm).println(\"<HTML><BODY><TABLE BORDER=0 CELLPADDING=3 CELLSPACING=1 WIDTH=100% BGCOLOR=ORANGE>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR><TD WIDTH=90% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=ORANGE SIZE=3><B>Tieto NetBank Automation</B></FONT></TD></TR><TR><TD ALIGN=CENTER BGCOLOR=ORANGE><FONT FACE=VERDANA COLOR=WHITE SIZE=3><B>Selenium Framework Reporting</B></FONT></TD></TR></TABLE><TABLE CELLPADDING=3 WIDTH=100%><TR height=30><TD WIDTH=100% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=//0073C5 SIZE=2><B>&nbsp; Automation Result : \" + new Date() + \" on Machine \" + InetAddress.getLocalHost().getHostName() + \" by user \" + System.getProperty(\"user.name\") + \" on Browser \" + driverType +\"</B></FONT></TD></TR><TR HEIGHT=5></TR></TABLE>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TABLE BORDER=0 BORDERCOLOR=WHITE CELLPADDING=3 CELLSPACING=1 WIDTH=100%>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR><TD BGCOLOR=BLACK WIDTH=20%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Test Name:</B></FONT></TD><TD COLSPAN=6 BGCOLOR=BLACK><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>\" + g_strScriptName + \"</B></FONT></TD></TR>\");\r\n\t //new PrintStream(foutStrm).println(\"<TR><TD BGCOLOR=BLACK WIDTH=20%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Test Iteration:</B></FONT></TD><TD COLSPAN=6 BGCOLOR=BLACK><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B> </B></FONT></TD></TR>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"</TABLE><BR/><TABLE WIDTH=100% CELLPADDING=3>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR WIDTH=100%><TH BGCOLOR=ORANGE WIDTH=5%><FONT FACE=VERDANA SIZE=2>Step No.</FONT></TH><TH BGCOLOR=ORANGE WIDTH=28%><FONT FACE=VERDANA SIZE=2>Step Description</FONT></TH><TH BGCOLOR=ORANGE WIDTH=25%><FONT FACE=VERDANA SIZE=2>Expected Value</FONT></TH><TH BGCOLOR=ORANGE WIDTH=25%><FONT FACE=VERDANA SIZE=2>Obtained Value</FONT></TH><TH BGCOLOR=ORANGE WIDTH=7%><FONT FACE=VERDANA SIZE=2>Result</FONT></TH></TR>\");\r\n\t\t\r\n\t\t\tfoutStrm.close();\r\n\t\t} catch (IOException io) \r\n\t\t{\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n\t\t//Deference the file pointer\r\n\t\tfoutStrm = null;\r\n\r\n\t\t//Get the start time of the execution\r\n\t\tg_StartTime = new Date();\r\n\r\n\t}", "public int countTestCases() {\n return 1;\n }", "private static void generateRandomTestDataAndPrint(GridGraph gridGraph) {\n AlgoFunction algo = AnyAnglePathfinding.setDefaultAlgoFunction();\n ArrayList<Point> points = ReachableNodes.computeReachable(gridGraph, 5, 5);\n \n LinkedList<Integer> startX = new LinkedList<>();\n LinkedList<Integer> startY = new LinkedList<>();\n LinkedList<Integer> endX = new LinkedList<>();\n LinkedList<Integer> endY = new LinkedList<>();\n LinkedList<Double> length = new LinkedList<>();\n \n int size = points.size();\n System.out.println(\"Points: \" + size);\n \n for (int i=0; i<100; i++) {\n Random random = new Random();\n int first = random.nextInt(size);\n int last = random.nextInt(size-1);\n if (last == first) last = size-1; // prevent first and last from being the same\n \n Point s = points.get(first);\n Point f = points.get(last);\n int[][] path = Utility.generatePath(algo, gridGraph, s.x, s.y, f.x, f.y);\n if (path.length >= 2) {\n double len = Utility.computePathLength(gridGraph, path);\n startX.offer(s.x);\n startY.offer(s.y);\n endX.offer(f.x);\n endY.offer(f.y);\n length.offer(len);\n }\n if (i%10 == 0) System.out.println(\"Computed: \" + i);\n }\n System.out.println(startX);\n System.out.println(startY);\n System.out.println(endX);\n System.out.println(endY);\n System.out.println(length);\n }", "public static void main(String[] args) throws FileNotFoundException\n {\n\n Scanner sc = new Scanner(new File(\"example.in\"));\n\n // Read the number of testcases to follow\n int t = sc.nextInt();\n\n //Iterate over the testcases and solve the problem\n for (int i = 0; i < t; i++) {\n int n = sc.nextInt();\n int m = sc.nextInt();\n\n AdjacencyList adj = new AdjacencyList(n);\n\n for (int j = 0; j < m; j++)\n {\n int v = sc.nextInt();\n int u = sc.nextInt();\n\n adj.addEdge(v, u);\n }\n\n System.out.println();\n System.out.println(\"testcase \" + i);\n testcase(adj);\n System.out.println();\n\n }\n }", "public static void main(String[] args) {\n\t\tUtility utility = new Utility();\n\t\t\n\t\t// build trainingset\n\t\tSystem.out.println(\"Training System....\");\n\t\tArrayList<Student> trainingSet = utility.readStudentfile(\"porto_math_train.csv\");\n\t\tArrayList<Variable> variableSets = Student.getAllVar();\n\n\t\tTree tree = new Tree();\n\t\tNode decisionTree = tree.buildTree2(trainingSet, variableSets);\n\n\t\tutility .printNode(decisionTree);\n\n\t\t// testing DT\n\t\tSystem.out.println(\"\\tTesting System (trainingSet)....\");\n\t\tutility.testTree2(trainingSet, decisionTree);\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\tTesting System (testSet)....\");\n\t\tArrayList<Student> testSet = utility.readStudentfile(\"porto_math_test.csv\");\n\t\tutility.testTree2(testSet, decisionTree);\t\t\n\t}", "public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }", "public ParameterJUnitTest(int oper1, int oper2, int result){\n\t\tthis.operator1 = oper1;\n\t\tthis.operator2 = oper2;\n\t\tthis.result = result;\n\t}", "public static void main(String[] args){\n //Variables\n Scanner scnr = new Scanner(System.in);\n //Custom test case\n if(scnr.hasNext()){\n String testInput = \"\";\n while(scnr.hasNext()){\n testInput = scnr.nextLine();\n System.out.println(testInput + \" : \" + evaluate(testInput));\n }\n }\n //Default test case\n else{\n String [] sampletests = {\"(1+(2*3))\", \"(2*(4*(6/3)))\",\"(3+(4*2))\"};\n double [] sampleoutput = {7.0, 16.0, 11.0};\n for(int i = 0; i < sampletests.length; i++){\n if(evaluate(sampletests[i]) != sampleoutput[i]){\n System.out.println(\"Failed sample tests\");\n return;\n }\n }\n System.out.println(\"Passed sample tests\");\n }\n }", "Multiplication createRandomMultiplication();", "Multiplication createRandomMultiplication();", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\tNTest01 nt = new NTest01();\n\t\tnt.prn01();\n\t\tnt.prn02();\n\t\tnt.prn03();\n\t}", "public CreateAccountTest(String arg1, int arg2, int arg3, int arg4, int arg5){\n\t\tthis.arg1 = arg1;\n\t\tthis.arg2 = arg2;\n\t\tthis.arg3 = arg3;\n\t\tthis.arg4 = arg4;\n\t\tthis.arg5 = arg5;\n\t}", "private void generate_run_test_code()\n {\n StringBuffer Code = new StringBuffer();\n\n // Use a static variable to avoid infinite recursion\n Code.append(\"\\t\\tstatic bool s_FirstTime = true; if (s_FirstTime) { s_FirstTime = false; run_test(-1); }\");\n\n // Insert the cut tags\n Code.insert(0, k_BEGINCUT);\n Code.append(k_ENDCUT);\n\n m_Tags.put(k_RUNTEST, Code.toString());\n }", "public static void runRandom() throws Exception {\r\n\t\ti = (int) (Math.random()*10)+1;\r\n\t\tfor (int a = 1;a <= i;a++) {\r\n\t\t\ttestRun(a);\r\n\t\t\tSystem.out.println(\"\\n\\n\");\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint T = sc.nextInt();\r\n\t\tfor (int test_case = 1; test_case <= T; test_case++) {\r\n\t\t\tint N = sc.nextInt();\r\n\t\t\toperator = new int[4];\r\n\t\t\tnum = new int[N];\r\n\t\t\tmax = Integer.MIN_VALUE;\r\n\t\t\tmin = Integer.MAX_VALUE;\r\n\t\t\tfor (int i = 0; i < operator.length; i++) {\r\n\t\t\t\toperator[i] = sc.nextInt();\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < num.length; i++) {\r\n\t\t\t\tnum[i] = sc.nextInt();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint[] count = new int[4];\r\n\t\t\tcalculator(count,0,num[0]);\r\n\t\t\tSystem.out.println(\"#\" + test_case + \" \" + (max-min));\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\tint testNum = scan.nextInt();\n\t\tfor(int i=1;i<=testNum;i++){\n\t\t\tlong A = scan.nextLong();\n\t\t\tlong B = scan.nextLong();\n\t\t\tlong num = Solution.getNumFairAndSquare(A, B);\n\t\t\tSystem.out.printf(\"Case #%d: %d\\n\", i, num);\n\t\t}\n\t\tscan.close();\n\t}", "@Timeout(10)\n @TestFactory\n public DynamicContainer generateTestsForAllClasses() throws URISyntaxException {\n List<DynamicNode> tests = new ArrayList<>();\n\n if (structureOracleJSON == null) {\n fail(\"The ClassTest test can only run if the structural oracle (test.json) is present. If you do not provide it, delete ClassTest.java!\");\n }\n\n for (int i = 0; i < structureOracleJSON.length(); i++) {\n JSONObject expectedClassJSON = structureOracleJSON.getJSONObject(i);\n JSONObject expectedClassPropertiesJSON = expectedClassJSON.getJSONObject(JSON_PROPERTY_CLASS);\n\n // Only test the classes that have additional properties (except name and package) defined in the structure oracle.\n if (expectedClassPropertiesJSON.has(JSON_PROPERTY_NAME) && expectedClassPropertiesJSON.has(JSON_PROPERTY_PACKAGE) && hasAdditionalProperties(expectedClassPropertiesJSON)) {\n String expectedClassName = expectedClassPropertiesJSON.getString(JSON_PROPERTY_NAME);\n String expectedPackageName = expectedClassPropertiesJSON.getString(JSON_PROPERTY_PACKAGE);\n ExpectedClassStructure expectedClassStructure = new ExpectedClassStructure(expectedClassName, expectedPackageName, expectedClassJSON);\n tests.add(dynamicTest(\"testClass[\" + expectedClassName + \"]\", () -> testClass(expectedClassStructure)));\n }\n }\n if (tests.size() == 0) {\n fail(\"No tests for classes available in the structural oracle (test.json). Either provide attributes information or delete ClassTest.java!\");\n }\n // Using a custom URI here to workaround surefire rendering the JUnit XML without the correct test names.\n return dynamicContainer(getClass().getName(), new URI(getClass().getName()), tests.stream());\n }", "public static void main(String[] args) {\n Part2_2 part2_2 = new Part2_2();\n part2_2.testHowMany();\n Part2_3 part_23 = new Part2_3();\n part_23.testHowManyGenes();\n Part3_1 part3_1 = new Part3_1();\n part3_1.testCgRatio();\n }", "public static void main(String[] args) throws Exception {\n Class<?> test = CheckSwitchInTestClass.class.getClassLoader().loadClass(\"Test\");\n Method method = test.getMethod(\"test\", int.class);\n\n // Get keys and default value from arguments.\n List<Integer> keys = new ArrayList<>();\n for (int i = 0; i < args.length - 1; i++) {\n keys.add(Integer.parseInt(args[i]));\n }\n int defaultValue = Integer.parseInt(args[args.length - 1]);\n\n // Run over all keys and test a small interval around each.\n long delta = 2;\n for (Integer key : keys) {\n for (long potential = key - delta; potential < key + delta; potential++) {\n if (Integer.MIN_VALUE <= potential && potential <= Integer.MAX_VALUE) {\n int testKey = (int) potential;\n int result = ((Integer) method.invoke(null, testKey));\n int expect = defaultValue;\n if (keys.contains(testKey)) {\n expect = testKey;\n }\n if (result != expect) {\n System.out.println(\"Expected \" + expect + \" but got \" + result);\n System.exit(1);\n }\n }\n }\n }\n }", "public final Instances getTestingFromParams(String params)\n {\n if(params.equals(\"default\"))\n return getTesting();\n return _getTestingFromParams(params);\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n drunkardTest(TEST_STEP_TIMES_1, TEST_STEP_SIZE_1);\n drunkardTest(TEST_STEP_TIMES_2, TEST_STEP_SIZE_2);\n\t}", "public static void main(String[] args) throws ClassNotFoundException, SQLException {\n\t\tnew GenerateCombinations().generateCombinations(\"11\", 1, 10);\n\n\t}", "public static void multiRunTest(){\n /* Input resources.\n * For each String:\n * - the first character is the name of the first image.\n * - the second character is the name of the second image.\n */\n String[] inputs = new String[]{\n \"ab\",\n \"cd\",\n \"ef\",\n \"gh\",\n \"il\",\n \"mn\"\n };\n \n BlueRand random = new BlueRand();\n random.setOutputFile(\"sample/output/multiRuns_output.txt\");\n random.setOutputImage(\"sample/output/multiRuns_output.bmp\");\n random.overwriteOutputFile(false); \n //random.deleteInputFiles(true);\n try {\n\t for (String s : inputs){\n\t random.setInputImages(\"sample/input/\"+s.charAt(0)+\".jpg\",\n\t \"sample/input/\"+s.charAt(1)+\".jpg\"); \n\t ArrayList<Byte> output = random.generateRandom();\n\t System.out.println(\"run finished... Bytes generated: \" + output.size());\n\t }\n } catch (BlueRandException e){\n \tSystem.out.println(e.getMessage());\n }\n }", "public ParamNameTest(String testName) {\n super(testName);\n }", "@SuppressWarnings(\"static-access\")\r\n\tpublic static void main(String args[]) {\n//\t koenig1.getHP();\r\n//\t \r\n//\t koenig1.getAttribute();\r\n//\t \r\n\t Generator.Generate(Generator.Anzahl(), Generator.Tier());\r\n\t \r\n\t\t \r\n\t }" ]
[ "0.6556636", "0.6311531", "0.57846797", "0.57447827", "0.56755775", "0.55799454", "0.55659884", "0.5551398", "0.54961705", "0.54458016", "0.5269407", "0.5215487", "0.5207223", "0.5198118", "0.5181935", "0.5155295", "0.5150446", "0.51314884", "0.50869423", "0.50846475", "0.50583893", "0.50202733", "0.5003945", "0.4989546", "0.49868986", "0.49852896", "0.49823552", "0.49770632", "0.49606138", "0.4958994", "0.49505076", "0.49316368", "0.4930636", "0.4910001", "0.49083027", "0.49043265", "0.48854792", "0.48831794", "0.48799765", "0.48655605", "0.4864053", "0.48484027", "0.48450437", "0.4840649", "0.48145822", "0.48120552", "0.48063073", "0.47945705", "0.4791682", "0.4771245", "0.4768714", "0.47646996", "0.4762078", "0.47620308", "0.47579437", "0.47548112", "0.47511762", "0.47456965", "0.47444147", "0.47382626", "0.47382602", "0.47380513", "0.47355634", "0.47352335", "0.4734541", "0.4732371", "0.47314852", "0.472657", "0.47242174", "0.47213182", "0.4717244", "0.47152433", "0.47140545", "0.47132784", "0.47095883", "0.47044456", "0.4699887", "0.46993414", "0.46969318", "0.46946275", "0.46889988", "0.46876156", "0.46864712", "0.46789992", "0.46789992", "0.46632653", "0.46627283", "0.46621177", "0.4658796", "0.4656167", "0.46560735", "0.4653077", "0.46512377", "0.4642308", "0.4636475", "0.4633735", "0.4626622", "0.46258575", "0.4624655", "0.46238086" ]
0.5762419
3
constructor generate random values for sources, destinations and cost Matrix with the property: Total supply=Total demand
public GenerateRandomInstances(int n) { this.sources = new Source[n]; this.sources[0] = new Factory("S" + 0, (int) (Math.random() * 50) + 10); for (int i = 1; i < n; i++) { // generate random values for supply this.sources[i] = new Warehouse("S" + i, (int) (Math.random() * 50) + 10); //sum += this.sources[i].getSupply(); } this.destinations = new Destination[n]; for (int i = 0; i < n; i++) { // generate random values for supply this.destinations[i] = new Destination("D" + i, (int) (Math.random() * 50) + 10); } this.costMatrix = new int[n][n]; for (int k = 0; k < n; k++) { // generate random values for cost matrix for (int j = 0; j < n; j++) { this.costMatrix[k][j] = (int) (Math.random() * 9) + 1; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CostMatrix(int agents, int tasks, Random rnd)\n {\n _agents = new int[agents];\n _costArray = new int[agents][agents];\n _n = agents;\n\n for (int i = 0; i < agents; ++i)\n {\n for (int j = 0; j < tasks; ++j)\n {\n SetCost(i, j, rnd.nextInt(90) + 10);\n }\n }\n }", "private DataSet caucyDataSet(){\n CauchyDistribution cauchyDistribution = new CauchyDistribution(TARGET_MEAN, TARGET_MEAN/10);\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate costs from sampling from normal distribution\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n Long cost = (long) Math.max(1, cauchyDistribution.sample()); //make sure no 0 cost events\n tasks[i] = new Task(cost, uuid);\n }\n //generate task multiplities from sampling from uniform distribution\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }", "public static void main(String[] args) {\n Source s1 = new Source(SourceType.FACTORY, \"Source1\");\n s1.setCapacity(10);\n Source s2 = new Source(35, SourceType.WAREHOUSE, \"Source2\");\n Source s3 = new Source(25, SourceType.WAREHOUSE, \"Source3\");\n System.out.println(s1.toString());\n // create the instances for Destination class\n Destination d1 = new Destination();\n d1.setDemand(20);\n d1.setName(\"Destination1\");\n Destination d2 = new Destination(25, \"Destination2\");\n Destination d3 = new Destination(25, \"Destination3\");\n // add sources and destinations\n Problem app = new Problem(3, 3);\n app.addSource(s1);\n app.addSource(s2);\n app.addSource(s3);\n\n app.addDestination(d1);\n app.addDestination(d2);\n app.addDestination(d3);\n\n int[][] cost1 = {{2, 3, 1}, {5, 4, 8}, {5, 6, 8}};\n\n app.setCost(cost1, 3, 3);\n System.out.println(app.toString()); // print the matrix of cost\n\n for (Source s : app.getSource()) {\n System.out.print(s.getCapacity() + \" \");\n }\n System.out.println();\n for (Destination d : app.getDestination()) {\n System.out.print(d.getDemand() + \" \");\n }\n\n }", "public void generateMatrix() {\n\n flow = new int[MATRIX_TAM][MATRIX_TAM];\n loc = new int[MATRIX_TAM][MATRIX_TAM];\n\n for (int i = 0; i < MATRIX_TAM; i++) {\n for (int j = 0; j < MATRIX_TAM; j++) {\n\n //fill the distances matrix\n if (i != j) {\n loc[i][j] = rn.nextInt(MAX_DISTANCE - MIN_DISTANCE + 1) + MIN_DISTANCE;\n } else {\n loc[i][j] = 0;\n }\n\n //fill the flow matrix\n if (i != j) {\n flow[i][j] = rn.nextInt(MAX_FLOW - MIN_FLOW + 1) + MIN_FLOW;\n } else {\n flow[i][j] = 0;\n }\n\n }\n }\n\n }", "private void generateMap () {\n for (int i = 0 ; i < n ; i++) {\n mapCoordinate[i] = new CoordinateInfo(100 * random.nextFloat(), 100 * random.nextFloat());\n\n for (int j = 0 ; j <= i ; j++) {\n mapDistance[i][j] = mapDistance[j][i] = getDistance(mapCoordinate[i], mapCoordinate[j]);\n }\n }\n }", "public CostMatrix(int[][] costMatrix) {\n initCostMatrix(costMatrix);\n _alleleNames = null;\n }", "Route() \n\t{\n\t\tcost = 0;\n\t\tload = 0;\n\t\tcapacity = 50;\n\t\t// A new arraylist of nodes is created\n\t\tcustomers = new ArrayList<Customer>();\n\t}", "private DataSet normalDataSet(){\n //create normal distribution with mean .05 and sd .05/3 so that 99.7% of events are < .1\n NormalDistribution normalDistribution = new NormalDistribution(TARGET_MEAN, TARGET_MEAN/3D);\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate costs from sampling from normal distribution\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n Long cost = (long) Math.max(1, normalDistribution.sample()); //make sure no 0 cost events\n tasks[i] = new Task(cost, uuid);\n }\n //generate task multiplities from sampling from uniform distribution\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }", "private DataSet constantDataSet(){\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate taks with all 50 mills\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n tasks[i] = new Task(TARGET_MEAN, uuid);\n }\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }", "public void generateCost() throws StandardException {\n\n double baseTableSelectivity = computePhaseSelectivity(selectivityHolder,QualifierPhase.BASE);\n double filterBaseTableSelectivity = computePhaseSelectivity(selectivityHolder,QualifierPhase.BASE,QualifierPhase.FILTER_BASE);\n double projectionSelectivity = computePhaseSelectivity(selectivityHolder,QualifierPhase.FILTER_PROJECTION);\n double totalSelectivity = computeTotalSelectivity(selectivityHolder);\n\n assert filterBaseTableSelectivity >= 0 && filterBaseTableSelectivity <= 1.0:\"filterBaseTableSelectivity Out of Bounds -> \" + filterBaseTableSelectivity;\n assert baseTableSelectivity >= 0 && baseTableSelectivity <= 1.0:\"baseTableSelectivity Out of Bounds -> \" + baseTableSelectivity;\n assert projectionSelectivity >= 0 && projectionSelectivity <= 1.0:\"projectionSelectivity Out of Bounds -> \" + projectionSelectivity;\n assert totalSelectivity >= 0 && totalSelectivity <= 1.0:\"totalSelectivity Out of Bounds -> \" + totalSelectivity;\n\n // Total Row Count from the Base Conglomerate\n double totalRowCount = scc.baseRowCount();\n assert totalRowCount >= 0 : \"totalRowCount cannot be negative -> \" + totalRowCount;\n // Rows Returned is always the totalSelectivity (Conglomerate Independent)\n scanCost.setEstimatedRowCount(Math.round(totalRowCount*totalSelectivity));\n\n double baseTableAverageRowWidth = scc.getBaseTableAvgRowWidth();\n double baseTableColumnSizeFactor = scc.baseTableColumnSizeFactor(totalColumns);\n\n // We use the base table so the estimated heap size and remote cost are the same for all conglomerates\n double colSizeFactor = baseTableAverageRowWidth*baseTableColumnSizeFactor;\n assert baseTableAverageRowWidth >= 0 : \"baseTableAverageRowWidth cannot be negative -> \" + baseTableAverageRowWidth;\n assert baseTableColumnSizeFactor >= 0 : \"baseTableColumnSizeFactor cannot be negative -> \" + baseTableColumnSizeFactor;\n\n double openLatency = scc.getOpenLatency();\n double closeLatency = scc.getCloseLatency();\n double localLatency = scc.getLocalLatency();\n double remoteLatency = scc.getRemoteLatency();\n double remoteCost = openLatency + closeLatency + totalRowCount*totalSelectivity*remoteLatency*(1+colSizeFactor/100d);\n assert openLatency >= 0 : \"openLatency cannot be negative -> \" + openLatency;\n assert closeLatency >= 0 : \"closeLatency cannot be negative -> \" + closeLatency;\n assert localLatency >= 0 : \"localLatency cannot be negative -> \" + localLatency;\n assert remoteLatency >= 0 : \"remoteLatency cannot be negative -> \" + remoteLatency;\n assert remoteCost >= 0 : \"remoteCost cannot be negative -> \" + remoteCost;\n // Heap Size is the avg row width of the columns for the base table*total rows\n // Average Row Width\n // This should be the same for every conglomerate path\n scanCost.setEstimatedHeapSize((long)(totalRowCount*totalSelectivity*colSizeFactor));\n // Should be the same for each conglomerate\n scanCost.setRemoteCost((long)remoteCost);\n // Base Cost + LookupCost + Projection Cost\n double congAverageWidth = scc.getConglomerateAvgRowWidth();\n double baseCost = openLatency+closeLatency+(totalRowCount*baseTableSelectivity*localLatency*(1+congAverageWidth/100d));\n assert congAverageWidth >= 0 : \"congAverageWidth cannot be negative -> \" + congAverageWidth;\n assert baseCost >= 0 : \"baseCost cannot be negative -> \" + baseCost;\n scanCost.setFromBaseTableRows(filterBaseTableSelectivity * totalRowCount);\n scanCost.setFromBaseTableCost(baseCost);\n double lookupCost;\n if (lookupColumns == null)\n lookupCost = 0.0d;\n else {\n lookupCost = totalRowCount*filterBaseTableSelectivity*(openLatency+closeLatency);\n scanCost.setIndexLookupRows(filterBaseTableSelectivity*totalRowCount);\n scanCost.setIndexLookupCost(lookupCost+baseCost);\n }\n assert lookupCost >= 0 : \"lookupCost cannot be negative -> \" + lookupCost;\n\n double projectionCost;\n if (projectionSelectivity == 1.0d)\n projectionCost = 0.0d;\n else {\n projectionCost = totalRowCount * filterBaseTableSelectivity * localLatency * colSizeFactor*1d/1000d;\n scanCost.setProjectionRows(scanCost.getEstimatedRowCount());\n scanCost.setProjectionCost(lookupCost+baseCost+projectionCost);\n }\n assert projectionCost >= 0 : \"projectionCost cannot be negative -> \" + projectionCost;\n\n double localCost = baseCost+lookupCost+projectionCost;\n assert localCost >= 0 : \"localCost cannot be negative -> \" + localCost;\n scanCost.setLocalCost(localCost);\n scanCost.setNumPartitions(scc.getNumPartitions());\n scanCost.setLocalCostPerPartition((baseCost + lookupCost + projectionCost)/scc.getNumPartitions());\n }", "public GridSimRandom() {\n // empty\n }", "public void solveUsingLeastCostMethod() {\n\n this.solution = new Solution();\n\n Source[] proxySources = Arrays.copyOf(sources, sources.length);\n Destination[] proxyDestinations = Arrays.copyOf(destinations, destinations.length);\n int[][] matrix = new int[costs.length][costs[0].length];\n\n List<Integer> rows = new ArrayList<Integer>();\n List<Integer> columns = new ArrayList<Integer>();\n while ( rows.size() != proxySources.length && columns.size() != proxyDestinations.length ) {\n //getting minimum cell (if there is a tie, we choose where is the maximum quantity)\n int indexI,indexJ, value;\n indexI = 0;\n indexJ = 0;\n value = 0;\n boolean firstElement = true;\n for(int i=0;i<proxySources.length;i++) {\n if( !rows.contains(i) ) {\n for(int j=0;j<proxyDestinations.length;j++) {\n if( !columns.contains(j) ) {\n if ( firstElement ) {\n indexI = i;\n indexJ = j;\n value = costs[i][j];\n firstElement = false;\n }\n if( costs[i][j] < value ) {\n indexI = i;\n indexJ = j;\n value = costs[i][j];\n }\n else if( costs[i][j] == value ) {\n if( Math.min(proxySources[i].getSupply(),proxyDestinations[j].getDemand()) > Math.min(proxySources[indexI].getSupply(),proxyDestinations[indexJ].getDemand()) ) {\n indexI = i;\n indexJ = j;\n value = costs[i][j];\n }\n }\n }\n }\n }\n }\n int supply = proxySources[indexI].getSupply();\n int demand = proxyDestinations[indexJ].getDemand();\n\n\n this.solution.add(sources[indexI], destinations[indexJ], Math.min(supply,demand), costs[indexI][indexJ]);\n\n if ( supply < demand ) {\n proxySources[indexI].setSupply(0);\n proxyDestinations[indexJ].setDemand(demand - supply);\n rows.add(indexI);\n }\n else if( supply > demand ) {\n proxySources[indexI].setSupply(supply-demand);\n proxyDestinations[indexJ].setDemand(0);\n columns.add(indexJ);\n }\n else {\n proxySources[indexI].setSupply(0);\n proxyDestinations[indexJ].setDemand(0);\n rows.add(indexI);\n columns.add(indexJ);\n }\n }\n this.solution.showSolution();\n\n\n }", "public double[] newstater (){\r\n double[] styles = new double[Config.numberOfSeeds];\r\n for(int iii=0; iii < Config.numberOfSeeds; iii++)\r\n {\r\n Random randomr = new Random();\r\n styles[iii] = 0 + (5 - 0) * randomr.nextDouble();\r\n// RandGenerator.randDouble(0, 5);\r\n }\r\n return styles;\r\n }", "public void randomDemand(inValues entrada, outValues salida) {\n int VarRandom = new Random().nextInt(100);\n salida.demandRandom.add(VarRandom);\n int Sum = 0;\n for (int i = 0; i < entrada.demandsArray.length; i++) {\n if (VarRandom < (entrada.demandsArray[i][1] + Sum)) {\n salida.demand.add(entrada.demandsArray[i][0]);\n return;\n }\n Sum = Sum + entrada.demandsArray[i][1];\n }\n }", "public static int [][] generateValues (int sources) {\n\t\t\tRandom rand = new Random();\n\t\t\tint [][] tempGridValues = new int[gridSize.getValue()][gridSize.getValue()]; //holds new values temporarily\n\t\t\t\n\t\t\t//random 2D array of either ones and zeros\n\t\t\tif (sources == -1) {\n\t\t\t\tfor (int i = 0; i < gridSize.getValue(); i++ ) {\n\t\t\t\t\tfor (int j = 0; j < gridSize.getValue(); j++) {\n\t\t\t\t\t\tgridValues[i][j] = rand.nextInt(2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn gridValues;\n\t\t\t}\n\t\t\t//assigns new grid values based on game rules\n\t\t\telse {\n\t\t\t\tfor (int i = 0; i < gridSize.getValue(); i++ ) {\n\t\t\t\t\tfor (int j = 0; j < gridSize.getValue(); j++) {\n\t\t\t\t\t\tint alivePoints = checkAlive(i, j);\n\t\t\t\t\t\tif (gridValues[i][j] == 0 && alivePoints == 3) {\n\t\t\t\t\t\t\ttempGridValues[i][j] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (gridValues[i][j] == 1 && (alivePoints < 2 ||alivePoints > 3)) {\n\t\t\t\t\t\t\ttempGridValues[i][j] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttempGridValues[i][j] = gridValues[i][j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tgridValues = tempGridValues;\n\t\t\t\treturn gridValues;\n\t\t\t}\n\t\t\t\n\t\t}", "private void initializeShippingPoints() {\n shipping_points = new ShippingPoint[num_shipping_points];\n \n int x_size = 8;\n int y_size = 8;\n int[][] grid = new int[x_size][y_size]; //keeps track of which locations are taken\n //so no two ShippingPoints have the same location\n \n int x = 0;\n int y = 0;\n \n for(int i = 0; i < num_shipping_points; i++)\n {\n x = (int)(Math.random() * x_size);\n y = (int)(Math.random() * y_size);\n while(grid[x][y] != 0) {\n x = (int)(Math.random() * x_size);\n y = (int)(Math.random() * y_size);\n }\n grid[x][y] = 1;\n if(i % 4 == 0) { //be careful -- probably won't work in the general case\n Supplier supplier = new Supplier(x, y, i);\n shipping_points[i] = supplier;\n }\n else {\n Customer customer = new Customer(x, y, i);\n shipping_points[i] = customer;\n }\n }\n \n if(eight_shipping_points) {\n //for 8 shipping points\n shipping_points[0].setPosition(4, 0);\n shipping_points[1].setPosition(8, 0);\n shipping_points[2].setPosition(8, 4);\n shipping_points[3].setPosition(8, 8);\n shipping_points[4].setPosition(4, 8);\n shipping_points[5].setPosition(0, 8);\n shipping_points[6].setPosition(0, 4);\n shipping_points[7].setPosition(0, 0);\n }\n \n else {\n //for 20 shipping points\n /**/shipping_points[0].setPosition(4,0);\n shipping_points[1].setPosition(8, 0);\n shipping_points[2].setPosition(12, 0);\n shipping_points[3].setPosition(16, 0);\n shipping_points[4].setPosition(20, 0);\n shipping_points[5].setPosition(20, 4);\n shipping_points[6].setPosition(20, 8);\n shipping_points[7].setPosition(20, 12);\n shipping_points[8].setPosition(20, 16);\n shipping_points[9].setPosition(20, 20);\n shipping_points[10].setPosition(16, 20);\n shipping_points[11].setPosition(12, 20);\n shipping_points[12].setPosition(8, 20);\n shipping_points[13].setPosition(4, 20);\n shipping_points[14].setPosition(0, 20);\n shipping_points[15].setPosition(0, 16);\n shipping_points[16].setPosition(0, 12);\n shipping_points[17].setPosition(0, 8);\n shipping_points[18].setPosition(0, 4);\n shipping_points[19].setPosition(0, 0);/**/\n }\n \n displayShippingPoints();\n }", "protected void generate() {\n\t\tcpGenerator( nx, ny, nz, ClosePackedLattice.HCP);\n\t}", "private static DenseMatrix generateRandomMatrix (int rows, int cols, int m_seed){\n\n Random random_value = new Random(m_seed);\n DenseMatrix randomMX = new DenseMatrix(rows, cols);\n for (int i=0; i<rows; i++){\n for (int j=0; j<cols;j++){\n randomMX.set(i,j, random_value.nextDouble());\n }\n }\n return randomMX;\n }", "private void generateConfig() \n {\n Random randomSpin = new Random();\n //System.out.println(\"Generated lattice looks like this:\");\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < m; j++) {\n if (randomSpin.nextDouble() < 0.5) {\n lattice[i][j] = -1; \n } else {\n lattice[i][j] = 1;\n }\n // System.out.printf(\"%d \", lattice[i][j]);\n }\n // System.out.println();\n\n }\n }", "RandomArrayGenerator() {\n this.defaultLaenge = 16;\n }", "public void generateOneRowCost() throws StandardException {\n double totalRowCount = 1.0d;\n // Rows Returned is always the totalSelectivity (Conglomerate Independent)\n scanCost.setEstimatedRowCount(Math.round(totalRowCount));\n\n double baseTableAverageRowWidth = scc.getBaseTableAvgRowWidth();\n double baseTableColumnSizeFactor = scc.baseTableColumnSizeFactor(totalColumns);\n // We use the base table so the estimated heap size and remote cost are the same for all conglomerates\n double colSizeFactor = baseTableAverageRowWidth*baseTableColumnSizeFactor;\n\n // Heap Size is the avg row width of the columns for the base table*total rows\n // Average Row Width\n // This should be the same for every conglomerate path\n scanCost.setEstimatedHeapSize((long)(totalRowCount*colSizeFactor));\n // Should be the same for each conglomerate\n scanCost.setRemoteCost((long)(scc.getOpenLatency()+scc.getCloseLatency()+totalRowCount*scc.getRemoteLatency()*(1+colSizeFactor/100d)));\n // Base Cost + LookupCost + Projection Cost\n double congAverageWidth = scc.getConglomerateAvgRowWidth();\n double baseCost = scc.getOpenLatency()+scc.getCloseLatency()+(totalRowCount*scc.getLocalLatency()*(1+scc.getConglomerateAvgRowWidth()/100d));\n scanCost.setFromBaseTableRows(totalRowCount);\n scanCost.setFromBaseTableCost(baseCost);\n double lookupCost;\n if (lookupColumns == null)\n lookupCost = 0.0d;\n else {\n lookupCost = totalRowCount*(scc.getOpenLatency()+scc.getCloseLatency());\n scanCost.setIndexLookupRows(totalRowCount);\n scanCost.setIndexLookupCost(lookupCost+baseCost);\n }\n double projectionCost = totalRowCount * scc.getLocalLatency() * colSizeFactor*1d/1000d;\n scanCost.setProjectionRows(scanCost.getEstimatedRowCount());\n scanCost.setProjectionCost(lookupCost+baseCost+projectionCost);\n scanCost.setLocalCost(baseCost+lookupCost+projectionCost);\n scanCost.setNumPartitions(scc.getNumPartitions());\n }", "private void initMatrix() {\n\t\ttry {\n\t\t\tRandom random = new Random();\n\t\t\tfor (int row=0; row<_numRows; ++row) {\n\t\t\t\tfor (int column=0; column<_numColumns; ++column) {\n\t\t\t\t\t// generate alive cells, with CHANCE_OF_ALIVE chance\n\t\t\t\t\tboolean value = (random.nextInt(100) < CHANCE_OF_ALIVE);\n\t\t\t\t\t_matrix.setCellValue(row, column, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// This is not supposed to happend because we use only legal row and column numbers\n\t\t}\n\t}", "@Override\n\n //-----------------\n\n public void init() {\n //test(); // <---------------- Uncomment to TEST!\n\n // %-distribution of RED, BLUE and NONE\n double[] dist = {0.49, 0.49, 0.02};\n\n // Number of locations (places) in world (square)\n int nLocations = 950;\n\n Actor[] distArray = distribution(nLocations, dist); //Generates array with correct distribution.\n distArray = shuffle(distArray); //Shuffles array\n world = toMatrix(distArray, nLocations, world); //Generates the start world.\n // Should be last\n fixScreenSize(nLocations);\n }", "private RandomLocationGen() {}", "public SupplyDemand() {\r\n\t\t//begin\r\n\t\tproducerList = new ArrayList<>();\r\n\t\tretailerList = new ArrayList<>();\r\n\t\t//end\r\n\t}", "public void initializeDemandVector() {\r\n\t\tdouble marketSplit = Parameters.marketSplit / 100.0;\r\n\t\tfor (int i = 0; i < demandVector.length; i++) {\r\n\t\t\t\r\n\t\t\tdouble r = RandomHelper.nextDoubleFromTo(0, 1);\r\n\t\t\t\r\n\t\t\tdemandVector[i] = r < marketSplit ? 1 : 0;\r\n\t\t}\r\n\t}", "public ToZeroRampGenerator() { \r\n }", "public void generateIndividual() {\n // Loop through all our destination cities and add them to our tour\n for (int cityIndex = 0; cityIndex < TourManager.numberOfCities(); cityIndex++) {\n setCity(cityIndex, TourManager.getCity(cityIndex));\n }\n // Randomly reorder the tour\n Collections.shuffle(tour);\n }", "private TSDBData generateDynamicRate() {\n //TODO: replace with single method generateRate and parameter (static, dynamic)\n double rate;\n Random rateGenerator = new Random();\n TSDBData rateData = new TSDBData();\n ArrayList<String> strArr = null;\n ArrayList<Object> objArrNode;\n ArrayList<ArrayList<Object>> objArr = new ArrayList<ArrayList<Object>>();\n\n // Iterate through the list and generate the rate for each enabled meters\n for (int k = 0; k < enabledResourceList.size(); k++) {\n //rate = getDynamicRate(enabledResourceList.get(k).toString());\n rate = rateGenerator.nextInt((3 - 1) + 1) + 1;\n strArr = StringUtil.strArr(\"resource\", \"rate\", \"rate_policy\");\n //strArr.add(\"resource\");\n //strArr.add(\"rate\");\n //strArr.add(\"rate_policy\");\n objArrNode = new ArrayList<Object>();\n objArrNode.add(enabledResourceList.get(k));\n objArrNode.add(rate);\n objArrNode.add(Flag.getMeteringType());\n objArr.add(objArrNode);\n }\n\n rateData.setName(\"rate\");\n rateData.setColumns(strArr);\n rateData.setPoints(objArr);\n return rateData;\n }", "private void initCostMatrix(int[][] costMatrix) {\n if (costMatrix.length != costMatrix[0].length) {\n throw new Errors.MatrixColumnsNotEqualToRows();\n }\n _matrix = new int[costMatrix.length][costMatrix.length];\n for (int i = 0; i < costMatrix.length; i++) {\n _matrix[i] = Arrays.copyOf(costMatrix[i], costMatrix[i].length);\n }\n }", "public RandomizedSet() {\n data=new ArrayList<>();\n valueIndex=new HashMap<>();\n random=new Random();\n }", "public ProductionPower(){\n this(0, new NumberOfResources(), new NumberOfResources(), 0, 0);\n }", "private void generateCandies(){\n\t\tfor (int i = 0; i < 16; i++){\n\t\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t\tCandy candy = new Candy(coordX, coordY, i);\n\t\t\tcandies.put(i, candy);\n\t\t}\n\t}", "public CostFactoryImpl() {\n\t\tsuper();\n\t}", "private DataSet zipfDataSet(){\n ZipfDistribution zipfDistribution = new ZipfDistribution(NUM_DISTINCT_TASKS, 1);\n //Magic number which is computed the following way\n //Take the H_{2500,1}/(1+4+9+...) * Target Mean\n //this will result in mean of 50\n Double multiplier = (8.4/1.644)*TARGET_MEAN;\n DataSet dataSet = new DataSet();\n Map<Integer, UUID> ids = new HashMap<>();\n //generate costs from sampling from normal distribution\n for(int i=0; i < NUM_TASKS; i++){\n //zipf gives numbers from 1 to NUM_DISTINCT_TASKS where 1 is most frequent\n int sample = zipfDistribution.sample();\n UUID id = ids.getOrDefault(sample, UUID.randomUUID());\n ids.put(sample, id);\n Double cost = multiplier * (1D/sample);\n dataSet.getTasks().add(new Task(cost.longValue(), id));\n }\n return dataSet;\n }", "public void initialize() {\n final Double optimismRate = new Double(0.0);\n _counts.clear();\n _values.clear();\n\n for (Integer index : Range.closed(0, _armsNo - 1).asSet(DiscreteDomains.integers())) {\n _counts.add(index, optimismRate.intValue());\n _values.add(index, optimismRate);\n }\n }", "public City(){\n this.x = (int)(Math.random()*200);\n this.y = (int)(Math.random()*200);\n }", "public static void generateMatrix() {\r\n Random random = new Random();\r\n for (int i = 0; i < dim; i++)\r\n {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n if (i != j)\r\n \r\n adjacencyMatrix[i][j] = I; \r\n }\r\n }\r\n for (int i = 0; i < dim * dim * fill; i++)\r\n {\r\n adjacencyMatrix[random.nextInt(dim)][random.nextInt(dim)] =\r\n random.nextInt(maxDistance + 1);\r\n }\r\n \r\n\r\n\r\n \r\n //print(adjacencyMatrix);\r\n \r\n \r\n //This makes the main matrix d[][] ready\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n d[i][j] = adjacencyMatrix[i][j];\r\n if (i == j)\r\n {\r\n d[i][j] = 0;\r\n }\r\n }\r\n }\r\n }", "Matrix(int rows, int columns) {\n try {\n if (rows < 1 || columns < 1) {\n throw zeroSize;\n }\n this.rows = rows;\n this.columns = columns;\n matrix = new int[rows][columns];\n\n for (int rw = 0; rw < rows; rw++) {\n for (int col = 0; col < columns; col++) {\n matrix[rw][col] = (int) Math.floor(Math.random() * 100);\n }\n }\n }\n catch (Throwable zeroSize) {\n zeroSize.printStackTrace();\n }\n\n }", "public Chromosone() {\n Random rand = new Random();\n for(int i=0;i<=75;i++)\n {\n int rnd = rand.nextInt(2);// [1,0...]\n\n Val.add(rnd);\n }\n }", "public static void main(String[] args) {\n\t\tCustomer depot = new Customer();\n\t\tdepot.x = 50;\n\t\tdepot.y = 50;\n\t\tdepot.demand = 0;\n\n\n\t\tint myBirthNumber = 8021994;\n\n\t\tRandom ran = new Random (myBirthNumber); \n\n\t\tint numberOfCustomers = 30;\n\n\t\t//Creating the list with the customers\t\t\n\t\tArrayList <Customer> customers = new ArrayList<>(); // with this code we initialize the new ArrayList, which is called \"customers\"\n\t\tfor (int i = 1 ; i <= numberOfCustomers; i++)\n\t\t{\n\t\t\tCustomer cust = new Customer();\n\t\t\tcust.x = ran.nextInt(100);\n\t\t\tcust.y = ran.nextInt(100); \n\t\t\tcust.demand = 4 + ran.nextInt(7); \n\t\t\tcustomers.add(cust);\n\t\t}\n\n\t\t//Build the allCustomers array and the corresponding distance matrix\n\t\tArrayList <Customer> allCustomers = new ArrayList<Customer>();\n\n\n\t\tallCustomers.add(depot);\n\t\tfor (int i = 0 ; i < customers.size(); i++)\n\t\t{\n\t\t\tCustomer cust = customers.get(i);\n\t\t\tallCustomers.add(cust);\n\t\t}\n\n\t\tfor (int i = 0 ; i < allCustomers.size(); i++)\n\t\t{\n\t\t\tCustomer nd = allCustomers.get(i);\n\t\t\tnd.ID = i;\n\t\t}\n\n\n\t\t// This is a 2-D array which will hold the distances between node pairs\n\t\t// The [i][j] element of this array is the distance required for moving \n\t\t// from the i-th node of allNodes (node with id : i)\n\t\t// to the j-th node of allNodes list (node with id : j)\n\t\tdouble [][] distanceMatrix = new double [allCustomers.size()][allCustomers.size()];\n\t\tfor (int i = 0 ; i < allCustomers.size(); i++)\n\t\t{\n\t\t\tCustomer from = allCustomers.get(i);\n\n\t\t\tfor (int j = 0 ; j < allCustomers.size(); j++)\n\t\t\t{\n\t\t\t\tCustomer to = allCustomers.get(j);\n\n\t\t\t\tdouble Delta_x = (from.x - to.x);\n\t\t\t\tdouble Delta_y = (from.y - to.y);\n\t\t\t\tdouble distance = Math.sqrt((Delta_x * Delta_x) + (Delta_y * Delta_y));\n\n\t\t\t\tdistance = Math.round(distance);\n\n\t\t\t\tdistanceMatrix[i][j] = distance;\n\n\t\t\t}\n\t\t}\n\n\n\n\t\t// This is the solution object - It will store the solution as it is iteratively generated\n\t\t// The constructor of Solution class will be executed\n\t\tSolution s = new Solution();\n\n\t\tint numberOfVehicles = 10;\n\n\t\t//Let rtList be the ArrayList of Vehicles assigned to the solution \"s\".\t\t\n\t\tArrayList <Route> rtList = s.routes; \n\t\tfor (int i = 1 ; i <= numberOfVehicles; i++)\n\t\t{\n\t\t\tRoute routeTemp = new Route();\n\t\t\trouteTemp.load = 0;\n\t\t\trouteTemp.capacity = 50;\n\t\t\trouteTemp.cost = 0;\n\t\t\trtList.add(routeTemp);\n\t\t}\n\n\t\t// indicate that all customers are non-routed\n\t\tfor (int i = 0 ; i < customers.size(); i++)\n\t\t{\n\t\t\tcustomers.get(i).isRouted = false;\n\t\t}\n\n\n\t\t/* \n\t\t * ##################\n\t\t * # INITIALIZATION #\n\t\t * ##################\n\t\t * */\n\n\t\t// Setting a count for customers who are not inserted in the solution yet\n\t\tint notInserted = numberOfCustomers;\n\n\t\tfor (int j=0; j < numberOfVehicles; j++)\n\t\t{\n\t\t\tArrayList <Customer> nodeSequence = rtList.get(j).customers;\n\t\t\tnodeSequence.add(depot);\t\n\n\t\t\tint capacity = rtList.get(j).capacity; // The capacity of this vehicle (=50)\n\t\t\tint load = rtList.get(j).load; // The initial load of this vehicle (=0)\n\t\t\t// Setting a boolean variable that shows the assignment is not final yet.\n\t\t\tboolean isFinal = false;\n\t\t\t// If we have no more customers to insert, we add the depot at the end of the sequence. \n\t\t\tif (notInserted == 0) {\n\t\t\t\tisFinal = true;\n\t\t\t\tnodeSequence.add(depot);\n\t\t\t}\n\t\t\twhile (isFinal == false)\t\t\t{\n\t\t\t\t//this will be the position of the nearest neighbor customer -- initialization to -1\n\t\t\t\tint positionOfTheNextOne = -1;\n\t\t\t\t// This will hold the minimal cost for moving to the next customer - initialized to something very large\n\t\t\t\tdouble bestCostForTheNextOne = Double.MAX_VALUE;\n\t\t\t\t//This is the last customer of the route (or the depot if the route is empty)\n\t\t\t\tCustomer lastInTheRoute = nodeSequence.get(nodeSequence.size() - 1);\n\t\t\t\t//identify nearest non-routed customer\n\t\t\t\tfor (int k = 0 ; k < customers.size(); k++)\n\t\t\t\t{\n\t\t\t\t\t// The examined customer is called candidate\n\t\t\t\t\tCustomer candidate = customers.get(k);\n\t\t\t\t\t// if this candidate has not been visited by a vehicle\n\t\t\t\t\tif (candidate.isRouted == false)\t\t\t\t\t{\n\t\t\t\t\t\t//This is the cost for moving from the last visited customer to the candidate customer\n\t\t\t\t\t\tdouble trialCost = distanceMatrix[lastInTheRoute.ID][candidate.ID];\n\t\t\t\t\t\t//If this is the minimal cost found so far -> store this cost and the position of this best candidate\n\t\t\t\t\t\tif (trialCost < bestCostForTheNextOne && candidate.demand<= capacity)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpositionOfTheNextOne = k;\n\t\t\t\t\t\t\tbestCostForTheNextOne = trialCost;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} // moving on to the next (candidate) customer\n\n\t\t\t\t// Step 2: Push the customer in the solution\n\t\t\t\t// We have found the customer to be pushed.\n\t\t\t\t// He is located in the positionOfTheNextOne position of the customers list\n\t\t\t\t// Let's inert him and update the cost of the solution and of the route, accordingly\n\n\t\t\t\tif (positionOfTheNextOne != -1 )\n\t\t\t\t{\n\t\t\t\t\tCustomer insertedNode = customers.get(positionOfTheNextOne);\n\t\t\t\t\t//Push the customer in the sequence\n\t\t\t\t\tnodeSequence.add(insertedNode);\n\t\t\t\t\t\n\t\t\t\t\trtList.get(j).cost = rtList.get(j).cost + bestCostForTheNextOne;\n\t\t\t\t\ts.cost = s.cost + bestCostForTheNextOne;\n\t\t\t\t\tinsertedNode.isRouted = true;\n\t\t\t\t\tcapacity = capacity - insertedNode.demand;\n\t\t\t\t\trtList.get(j).load = load + insertedNode.demand;\n\t\t\t\t\tload = load + insertedNode.demand;\n\t\t\t\t\tnotInserted = notInserted - 1;\n\t\t\t\t\t\n\t\t\t\t} else \n\t\t\t\t{ \n\t\t\t\t\t//if the positionOfTheNextOne = -1, it means there is no suitable candidate for this vehicle. So, we add the depot.\n\t\t\t\t\tnodeSequence.add(depot);\n\t\t\t\t\trtList.get(j).cost = rtList.get(j).cost + distanceMatrix[lastInTheRoute.ID][0];\n\t\t\t\t\ts.cost = s.cost + distanceMatrix[lastInTheRoute.ID][0];\n\t\t\t\t\tisFinal = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* \n\t\t * ###########\n\t\t * # RESULTS #\n\t\t * ###########\n\t\t * */\n\n\n\t\tfor (int j=0; j<numberOfVehicles; j++)\n\t\t{\n\t\t\tint vehicle_number = j+1;\n\t\t\tSystem.out.println(\"Route for Vehicle #\" + vehicle_number);\n\t\t\tfor (int k=0; k<s.routes.get(j).customers.size(); k++) \n\t\t\t{\n\t\t\t\tSystem.out.print(s.routes.get(j).customers.get(k).ID + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"Route Cost = \" + s.routes.get(j).cost);\n\t\t\tSystem.out.println(\"Final Load: \" + s.routes.get(j).load);\n\t\t\tSystem.out.println(\"Final Remaining Capacity = \" + (rtList.get(j).capacity - s.routes.get(j).load));\n\t\t\tSystem.out.println(\"----------------------------------------\");\n\n\t\t}\t\t\n\t\tSystem.out.println(\"Total Solution Cost = \" + s.cost);\n\n\t\t// End of GCS Instance\n\n\n\t\t/* \n\t\t * ###################################################\n\t\t * # LOCAL SEARCH USING INTER+INTRA-RELOCATION MOVES #\n\t\t * ###################################################\n\t\t * */\n\n\n\t\t//this is a boolean flag (true/false) for terminating the local search procedure\n\t\tboolean terminationCondition = false;\n\n\t\t//this is a counter for holding the local search iterator\n\t\tint localSearchIterator = 0;\n\n\t\t//Here we apply the best relocation move local search scheme\n\t\t//This is an object for holding the best relocation move that can be applied to the candidate solution\n\t\tRelocationMove rm = new RelocationMove(); // in order to apply one relocation move for all routes - dont want to lose previous if i change vehicle\n\n\t\t//Initialize the relocation move rm\n\t\trm.positionOfRelocated = -1;\n\t\trm.positionToBeInserted = -1;\n\t\trm.fromRoute = 0;\n\t\trm.toRoute = 0;\n\t\trm.fromMoveCost = Double.MAX_VALUE;\n\t\trm.toMoveCost = Double.MAX_VALUE;\n\n\t\t// Until the termination condition is set to true repeat the following block of code\n\t\twhile (terminationCondition == false)\n\t\t{\n\t\t\t//With this function we look for the best relocation move\n\t\t\t//the characteristics of this move will be stored in the object rm\n\t\t\tfindBestRelocationMove(rm, s, distanceMatrix, numberOfVehicles);\n\n\t\t\t// If rm (the identified best relocation move) is a cost improving move, or in other words\n\t\t\t// if the current solution is not a local optimum\n\t\t\tif (rm.moveCost < 0)\n\t\t\t{\n\t\t\t\t//This is a function applying the relocation move rm to the candidate solution\n\t\t\t\tapplyRelocationMove(rm, s, distanceMatrix);\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//if no cost improving relocation move was found,\n\t\t\t\t//or in other words if the current solution is a local optimum\n\t\t\t\t//terminate the local search algorithm\n\t\t\t\tterminationCondition = true;\n\t\t\t}\n\n\t\t\tlocalSearchIterator = localSearchIterator + 1;\n\t\t}\n\n\n\t\t/* \n\t\t * ###########\n\t\t * # RESULTS #\n\t\t * ###########\n\t\t * */\n\t\t\n\t\t\n\t\tSystem.out.println(\"\");\n\t\tfor (int j=0; j<numberOfVehicles; j++)\n\t\t{\n\t\t\tint vehicle_number = j+1;\n\t\t\tSystem.out.println(\"Updated Route for Vehicle #\" + vehicle_number);\n\t\t\tfor (int k=0; k<s.routes.get(j).customers.size(); k++) \n\t\t\t{\n\t\t\t\tSystem.out.print(s.routes.get(j).customers.get(k).ID + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"Route Cost = \" + s.routes.get(j).cost);\n\t\t\tSystem.out.println(\"Final Load: \" + s.routes.get(j).load);\n\t\t\tSystem.out.println(\"Final Remaining Capacity = \" + (rtList.get(j).capacity - s.routes.get(j).load));\n\t\t\tSystem.out.println(\"----------------------------------------\");\n\n\t\t}\t\t\n\t\tSystem.out.println(\"Total Solution Cost = \" + s.cost);\n\t\tSystem.out.println(\"Total Local Search Iterations = \" + localSearchIterator);\n\t\tSystem.out.println(\"Total Local Search Relocations = \" + (localSearchIterator-1));\n\n\n\n\t}", "private Pair<Integer, Integer> genRandomSrcDst(){\n int src = (int)(Math.random()*nodesNum);\n int dst = src;\n do {\n dst = (int)(Math.random()*nodesNum);\n }while(dst == src);\n return new Pair<Integer, Integer>(src, dst);\n }", "private CostHelper() {}", "@Override\n public void create() {\n theMap = new ObjectSet<>(2048, 0.5f);\n generate();\n }", "public static MatrixSource asRandomSource(int rows, int columns) {\n return new RandomMatrixSource(rows, columns);\n }", "City(){\n x_coordinate = (int)(Math.random()*200);\n y_coordinate = (int)(Math.random()*200);\n }", "protected void initializeUniformWeight() {\n\n if(CrashProperties.fitnessFunctions.length == 2){\n for (int n = 0; n < populationSize; n++) {\n double a = 1.0 * n / (populationSize - 1);\n lambda[n][0] = a;\n lambda[n][1] = 1 - (a);\n }\n }else {\n for (int n = 0; n < populationSize; n++) {\n double a = 1.0 * n / (populationSize - 1);\n lambda[n][0] = a;\n lambda[n][1] = (1 - (a))/2;\n lambda[n][2] = (1 - (a))/2;\n }\n }\n\n }", "public GridSimRandom(long seed, double lessFactorIO, double moreFactorIO,\n double lessFactorExec, double moreFactorExec)\n {\n random_.setSeed(seed);\n lessFactorIO_ = lessFactorIO;\n moreFactorIO_ = moreFactorIO;\n lessFactorExec_ = lessFactorExec;\n moreFactorExec_ = moreFactorExec;\n }", "Seed(){\r\n seedCells = new ArrayList<>();\r\n edgeCells = new ArrayList<>();\r\n }", "public void randomInit() {\n Plain plain = new Plain(width + 2);\n grid = new Living[width + 2][width + 2];\n for (int i = 1; i < grid.length - 1; i++) {\n for (int j = 1; j < grid[i].length - 1; j++) {\n int randomNum = (int) (Math.random() * 5);\n switch (randomNum) {\n case 0:\n grid[i][j] = new Badger(plain, i, j, 0);\n break;\n case 1:\n grid[i][j] = new Empty(plain, i, j);\n break;\n case 2:\n grid[i][j] = new Fox(plain, i, j, 0);\n break;\n case 3:\n grid[i][j] = new Grass(plain, i, j);\n break;\n case 4:\n grid[i][j] = new Rabbit(plain, i, j, 0);\n break;\n }\n }\n }\n }", "public MapGen()//Collect images, create Platform list, create grassy array and generate a random integer as the map wideness\n\t{\n\t\tblocksWide= ThreadLocalRandom.current().nextInt(32, 64 + 1);\n\t\tclouds=kit.getImage(\"Resources/SkyBackground.jpg\");\n\t\tdirt=kit.getImage(\"Resources/Dirt.png\");\n\t\tgrass[0]=kit.getImage(\"Resources/Grass.png\");\n\t\tgrass[1]=kit.getImage(\"Resources/Grass1.png\");\n\t\tgrass[2]=kit.getImage(\"Resources/Grass2.png\");\n\t\tplatforms=new ArrayList<Platform>();\n\t\tgrassy=new int[blocksWide];\n\t\tgrassT=new int[blocksWide];\n\t\tgenerateTerrain();\n\t\t\n\t\t\n\t\t\n\t}", "public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "BlueSphere() {\n Random random = new Random();\n value[0] = random.nextInt(16) + 1;\n }", "public PassCost() {\r\n\r\n }", "public Matrix(int m, int n, double s) {\n this.m = m;\n this.n = n;\n data = new double[m][n];\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n data[i][j] = s;\n }\n }\n }", "public RandomizedSet() {\n nums = new ArrayList<Integer>();\n location = new HashMap<Integer, Integer>();\n }", "public RandomizedSet() {\n // public RandomizedSet1() {\n lst = new ArrayList<>();\n rand = new Random();\n map = new HashMap<>();\n }", "public ProbabilityDistribution(Random random) {\n\t\trandom_ = random;\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "@Override\r\n public void generateTasks() {\r\n int tasks = Integer.parseInt(this.getProperty(\"numTask\", \"1000\"));\r\n setNumOfTasks(tasks);\r\n //TODO:fixed port here !!!! need to change!!!\r\n serverPort = Integer.parseInt(this.getProperty(\"reqServerPort\", \"5560\")); \r\n PROC_MAX = Integer.parseInt(this.getProperty(\"reqServerMaxConcurrentClients\",\"10\"));\r\n location = this.getProperty(\"location\", \"rutgers\");\r\n energyplusPropertyFile = this.getProperty(\"energyplusTemplate\", \"energyplus.property\");\r\n \r\n winnerTakeAll = Boolean.parseBoolean(this.getProperty(\"winnerTakeAll\",\"true\"));\r\n jobDistributionMap = new HashMap<Integer,Integer>();\r\n copyJobDistributionMap = new HashMap<Integer,Integer>();\r\n //System.out.println(\"energyplusPropertyFile:\"+energyplusPropertyFile);\r\n \r\n initInfoSystem();\r\n initDistributionSystem();\r\n startFedServer();\r\n }", "public void bsetCostElements() {\n\t\t\t\n\t\t\t\n\t\tfor (int obj = 0; obj < finalLocation.length; obj++) {\n\t\t for (int time = 0; time < finalLocation[obj].length; time++) {\n\t\t\t\n\t\t bfCost[obj][time].bstorageCost=totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].bstorageCost;\n\t\t\t bfCost[obj][time].breadCost=totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].breadCost;\n\t\t\t bfCost[obj][time].bwriteCost=totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].bwriteCost;\n\t\t\t bfCost[obj][time].btranCost=totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].btranCost;\n\t\t\t \n\t\t\t //1. we calculate latency cost for two cases separately: when the object is in the hot tier or cool tier.\n\t\t\t if (finalLocation[obj][time]==0){//Object is in the cool tier\n\t\t\t\t bfCost[obj][time].bdelayCost=totalCostCalculation.btotalResidentCost[time][obj][0].bdelayCost;\n\t\t\t\t \n\t\t\t }else{// object is in both tiers and, in consequence, the latency cost of writes is the maximum latency of writing in both tiers, and the read latency is the one in hot tier.\n\t\t\t\t bfCost[obj][time].bedelCost=fc.bdelayMaxWriteReadCost(workloadGenerator.objectListRegion[obj], 1, obj, time);\n\t\t\t }\n\t\t\t \n\t\t /* 2. Here we calculate storage cost and transaction cost to make consistent data. This requires just write transaction. Since in our cost \n calculation make a computation for both read and writes.\n\t\t */\n\t\t \n\t\t if(finalLocation[obj][time]==1){//NOTE: in above cost storage, we calculate the cost of object in either in hot or cold tier. \n\t\t \t //So here we calculate the storage cost in cold tier when the object is in hot tier.\n\t\t \t bfCost[obj][time].bstorageCost=bfCost[obj][time].bstorageCost.add(totalCostCalculation.btotalResidentCost[time][obj][0].bstorageCost);\n\t\t bfCost[obj][time].bconsisCost=totalCostCalculation.btotalResidentCost[time][obj][0].bconsisCost;\n\t\t }\n\t\t\t bfCost[obj][time].bnonMigrationCost=bfCost[obj][time].bstorageCost.add(bfCost[obj][time].breadCost).add( bfCost[obj][time].bwriteCost).\n\t\t\t\t\t add(bfCost[obj][time].btranCost).add( bfCost[obj][time].bconsisCost).\n\t\t\t\t\t add(bfCost[obj][time].bdelayCost);\n\t\t\t\t\t //totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].bnonMigrationCost.add(bfCost[obj][time].bconsisCost);\n\t\t\t \n\t\t\t //3. We need to calculate just transfer cost between cold to hot tier. From hot to cold tier does not make sense because we have a copy of data in cold tier.\n\t\t if(breakPoint==1){//If breakPoint is ONE then for serving every user, the object for each time slot is transfered from Cold to Hot tier.\n\t\t \t \n\t\t }\n\t\t else if(time>0 && finalLocation[obj][time-1]==0 && finalLocation[obj][time]==1){\n\t\t\t bfCost[obj][time].bmigrationCost=totalCostCalculation.btotalMigrationCost[time][obj][finalLocation[obj][time-1]][finalLocation[obj][time]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "public void calculateCost()\n\t{\n\t\tLogManager lgmngr = LogManager.getLogManager(); \n\t\tLogger log = lgmngr.getLogger(Logger.GLOBAL_LOGGER_NAME);\n\t\tString s = \"\";\n\t\tint costperfeet = 0;\n\t\tif (this.materialStandard.equals(\"standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1200;\n\t\telse if (this.materialStandard.equals(\"above standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1500;\n\t\telse if(this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1800;\n\t\telse if (this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == true)\n\t\t\tcostperfeet = 2500;\n\t\t\n\t\tint totalCost = costperfeet * this.totalArea;\n\t\t/*s = \"Total Cost of Construction is :- \";\n\t\twriter.printf(\"%s\" + totalCost, s);\n\t\twriter.flush();*/\n\t\tlog.log(Level.INFO, \"Total Cost of Construction is :- \" + totalCost);\n\t}", "PackageBuilder() {\n\t\tweightMap = new HashMap<>();\n\t\tcostMap = new HashMap<>();\n\t\tcombinations = new ArrayList<>();\n\t}", "public DistributionCounter(List<T> listOfTargets) {\n distributionList = new ArrayList<>();\n this.listOfTargets = listOfTargets;\n sumOfExpenses = calculateSum();\n }", "public CellularAutomatonRNG()\n {\n this(DefaultSeedGenerator.getInstance().generateSeed(SEED_SIZE_BYTES));\n }", "private RandomData() {\n initFields();\n }", "public ProductionPower(int points, NumberOfResources outputRes, NumberOfResources inputRes){\n this(points, outputRes, inputRes, 0, 0);\n }", "private static void makeInitialDistanceMatrix() {\n\t\ttry {\n\t\t\tfor(int i=1;i<=totalGenes;i++) {\n\t\t\t\tTreeMap<String, Double> temp1 = new TreeMap<>();\n\t\t\t\tif(distanceMatrix.containsKey(i+\"\"))\n\t\t\t\t\ttemp1 = distanceMatrix.get(i+\"\");\n\t\t\t\tfor(int j=i+1;j<=totalGenes;j++) {\n\t\t\t\t\tdouble dist = getDist(i, j);\n\t\t\t\t\tTreeMap<String, Double> temp2 = new TreeMap<>();\n\t\t\t\t\tif(distanceMatrix.containsKey(j+\"\"))\n\t\t\t\t\t\ttemp2 = distanceMatrix.get(j+\"\");\n\t\t\t\t\ttemp2.put(i+\"\", dist);\n\t\t\t\t\tdistanceMatrix.put(j+\"\", temp2);\n\t\t\t\t\ttemp1.put(j+\"\", dist);\n\t\t\t\t\tupdateMinMatrix(i+\"\",j+\"\",dist);\n\t\t\t\t}\n\t\t\t\tdistanceMatrix.put(i+\"\", temp1);\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\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 RandomizedSet() {\n data = new ArrayList<>();\n val2Index = new HashMap<>();\n }", "private static VehicleRoutingTransportCostsMatrix createMatrix(VehicleRoutingProblem.Builder vrpBuilder)\n {\n VehicleRoutingTransportCostsMatrix.Builder matrixBuilder = VehicleRoutingTransportCostsMatrix.Builder.newInstance(true);\n\n for (String from : vrpBuilder.getLocationMap().keySet())\n {\n for (String to : vrpBuilder.getLocationMap().keySet())\n {\n Coordinate fromCoord = vrpBuilder.getLocationMap().get(from);\n Coordinate toCoord = vrpBuilder.getLocationMap().get(to);\n //double distance = EuclideanDistanceCalculator.calculateDistance(fromCoord, toCoord);\n double distance = ( (GeoPointer) new GCJPointer(fromCoord.getX(), fromCoord.getY())).distance(new GCJPointer(toCoord.getX(), toCoord.getY())) ;\n // should get distance in meters (?)\n matrixBuilder.addTransportDistance(from, to, distance);\n //matrixBuilder.addTransportTime(from, to, (distance / 2.));\n }\n }\n return matrixBuilder.build();\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 }", "Multiplication createRandomMultiplication();", "Multiplication createRandomMultiplication();", "public NoiseGenerator(final long seed, final double bF, final double bA,\n final double l, final double g, final int oC, final NoiseMode m,\n final ColorGradient c, final TextureGradient t) { //All parameters are necessary.\n Random r = new Random(seed);\n perm = Arrays.copyOf(SUPPLY, 2 * SUPPLY_LENGTH);\n for (int i = 0; i < SUPPLY_LENGTH; i++) {\n int j = r.nextInt(SUPPLY_LENGTH);\n short temp = perm[i];\n perm[i] = perm[j];\n perm[j] = temp;\n }\n for (int i = 0; i < 2 * SUPPLY_LENGTH; i++) {\n perm[i] = perm[i & (SUPPLY_LENGTH - 1)];\n permMod12[i] = (short) (perm[i] % GTAB.length);\n }\n baseFreq = bF;\n baseAmp = bA;\n lacunarity = l;\n gain = g;\n octaveCap = oC;\n mode = m;\n colors = c;\n textures = t;\n }", "public MonteCarloVSmp()\r\n\t{\r\n\t}", "@Override\n\tvoid get_cost_per_sqarefeet() {\n\t\tcost=1800;\n\t}", "public void generateRandomMap() {\n\n\t}", "ShipmentCostEstimate createShipmentCostEstimate();", "static void configure() {\n float weight = (float) (Math.random() * 4000);\n System.out.println(\"Weight: \" + String.format(\"%.2f\", weight) + \"kg\");\n\n if (weight < 2000) {\n logisticsFactory = new RoadLogistics();\n } else {\n logisticsFactory = new SeaLogistics();\n }\n\n }", "public SARSA(int nStates, int nActions, long rngSeed) {\n\t\tsuper(nStates, nActions);\n\n\t\trng=new Random(rngSeed);\n\t\tthis.e = new DenseDoubleMatrix2D( nStates, nActions );\n\t\tthis.q = new DenseDoubleMatrix2D( nStates, nActions );\n\t}", "public MobilitySourceCollection(MobilitySource[] mobilitySources) {\n\t\tthis.mobilitySources = mobilitySources;\n\t\taddressMobilitySourceMap = new HashMap();\n\t\taddressAddressMap = new HashMap();\n\t\tcurrentEnterIndex = 0;\n\t\tcurrentAddress = 0;\n\t\trectangle = null;\n\t\tshape = new ShapeCollection();\n\t\ttotalDeviceCount = 0;\n\t\tfor(int i=0; i<mobilitySources.length; i++) {\n\t\t\trectangle = rectangle == null ? mobilitySources[i].getRectangle() : rectangle.union(mobilitySources[i].getRectangle());\n\t\t\tshape.addShape(mobilitySources[i].getShape(), Position.NULL_POSITION);\n\t\t\ttotalDeviceCount += mobilitySources[i].getTotalDeviceCount();\n\t\t}\n\t}", "public CrossoverOrder() {\n\t\tthis.randomGenerator = new Random(System.currentTimeMillis());\n\t}", "protected abstract double getDefaultCost();", "private void initTables(){\n\tfor (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n if (myID == i) {\n myNeighboursDistTable[i] = costs;\n } else {\n int[] tmp = new int[RouterSimulator.NUM_NODES];\n Arrays.fill(tmp, RouterSimulator.INFINITY);\n myNeighboursDistTable[i] = tmp;\n }\n if (costs[i] == RouterSimulator.INFINITY) {\n neighbours[i] = false;\n route[i] = -1;\n } else if (i != myID) {\n neighbours[i] = true;\n route[i] = i;\n }\n\t}\n }", "public MarkovZero() {\n\t\tmyRandom = new Random();\n\t}", "public Map(){\n this.matrix = new int[10][10];\n }", "public Approx(int numPoints) {\n numNodes = numPoints;\n\n // Initialize bestDist.\n bestDist = Integer.MAX_VALUE;\n\n // Initialize bestTour and currTour.\n bestTour = new ArrayList<>();\n currTour = new ArrayList<>();\n\n // Calculate distance matrix.\n matrix = FileIo.calDistMat(FileIo.getType(), FileIo.getPoints(), numPoints, \"Approx\");\n }", "public void createGrid() {\r\n generator.generate();\r\n }", "public Single_Edge_CCS_Network(int n, ArrayList<Terminal> sources, ArrayList<Terminal> sinks, SingleEdge[][] matrix) {\n this.n = n;\n this.sources = sources;\n this.sinks = sinks;\n errorCheckTerminals();\n this.matrix = matrix;\n }", "private void generateData(){\n generateP50boys();\n generateP50girls();\n generateP97boys();\n generateP97girls();\n }", "@Override\n public double cost(){\n return 1 + super.sandwich.cost();\n }", "private void generateData(int popsize, int ntrials) {\n data = new double[ntrials][100];\n \n for (int i = 0; i < ntrials; i++) {\n Population pop = new Population(popsize, rand);\n for (int j = 0; j < 100; j++) {\n data[i][j] = pop.totalA();\n pop.advance();\n }\n }\n }", "public MapSum() {\n\n }", "public Rng() {\n\t\tr = new Random();\n\t}", "public Entity3()\r\n {\r\n int[] neighbor_costs = {7, 999, 2, 0};\r\n\r\n for (int i = 0; i < NetworkSimulator.NUMENTITIES; i++) {\r\n Arrays.fill(distanceTable[i], 999);\r\n }\r\n for (int i = 0; i < NetworkSimulator.NUMENTITIES; i++) {\r\n distanceTable[NODE_NUM][i] = neighbor_costs[i];\r\n }\r\n\r\n System.out.println();\r\n System.out.println(\"--------------------------------\");\r\n System.out.println(\"Initial distance table for Node \" + NODE_NUM);\r\n System.out.println(\"--------------------------------\");\r\n printDT();\r\n\r\n for (int neighbor : NEIGHBORS) {\r\n Packet dtPacket = new Packet(NODE_NUM, neighbor, neighbor_costs);\r\n NetworkSimulator.toLayer2(dtPacket);\r\n }\r\n }", "public Generator() {\n identificationNumbers = new int[100][31];\n }", "public abstract Case[][] generate();", "public void generateNextGeneration() {\n int neighbours;\n int minimum = Integer.parseInt(PreferencesActivity\n .getMinimumVariable(this._context));\n int maximum = Integer.parseInt(PreferencesActivity\n .getMaximumVariable(this._context));\n int spawn = Integer.parseInt(PreferencesActivity\n .getSpawnVariable(this._context));\n\n minimum = 2;\n maximum = 3;\n spawn = 3;\n\n int[][] nextGenerationLifeGrid = new int[HEIGHT][WIDTH];\n\n\n\n for (int h = 0; h < HEIGHT; h++) {\n for (int w = 0; w < WIDTH; w++) {\n neighbours = calculateNeighbours(h, w);\n\n\n if (_lifeGrid[h][w] != 0) {\n if ((neighbours >= minimum) && (neighbours <= maximum)) {\n nextGenerationLifeGrid[h][w] = neighbours;\n }\n\n } else {\n if (neighbours == spawn) {\n nextGenerationLifeGrid[h][w] = spawn;\n\n }\n }\n\n }\n\n }\n\n copyGrid(nextGenerationLifeGrid, _lifeGrid);\n\n }", "public void initMatrixRandom(DoubleMatrix m){\n\t\tfor(int i = 0; i < m.rows; i++)\n\t\t\tfor(int j = 0; j < m.columns; j++)\n\t\t\t\tm.put(i, j, randomValue());\n\t}", "public Grid()\n {\n dest = new GridReference[2];\n dest[0] = new GridReference(Game.GRID_WIDTH-(int)((double)Game.GRID_WIDTH*0.05),\n Game.GRID_HEIGHT-(int)((double)Game.GRID_HEIGHT*0.2));\n dest[1] = new GridReference(Game.GRID_WIDTH-(int)((double)Game.GRID_WIDTH*0.05),\n Game.GRID_HEIGHT-(int)((double)Game.GRID_HEIGHT*0.8));\n //dest[2] = new GridReference(5,50);\n defaultStart = new GridReference((int)((double)Game.GRID_WIDTH*0.05),\n Game.GRID_HEIGHT-(int)((double)Game.GRID_HEIGHT*0.5));\n defaultWalker = Walkers.WEIGHTED2;\n \n createField();\n \n walkers = new ArrayList<>();\n //addUnits(randDest(), randDest());\n /*for (int i = 0; i < grassPatches.length; i++)\n {\n System.out.println(i + \":\" + grassPatches[i]);\n }*/\n }" ]
[ "0.64797384", "0.59080786", "0.5882152", "0.58312047", "0.5639942", "0.5597387", "0.55837446", "0.55790776", "0.5472465", "0.54699016", "0.54666686", "0.5356859", "0.5345325", "0.5342259", "0.533185", "0.5304985", "0.5286578", "0.5275484", "0.52584624", "0.52534324", "0.5241624", "0.5233301", "0.52296376", "0.5214689", "0.5188873", "0.51710624", "0.5145359", "0.5118847", "0.51187176", "0.5110154", "0.51042515", "0.50929", "0.5087754", "0.5080991", "0.5055878", "0.5054819", "0.50440556", "0.5038883", "0.5032132", "0.5030415", "0.5014367", "0.5008616", "0.49994618", "0.497381", "0.49709886", "0.49688938", "0.4967417", "0.49621978", "0.49619147", "0.4931165", "0.49263376", "0.49258342", "0.4918334", "0.49125722", "0.4912337", "0.49025503", "0.48955062", "0.48951373", "0.48929513", "0.48873532", "0.48842835", "0.4882942", "0.48818856", "0.48808187", "0.48796195", "0.4878406", "0.48778325", "0.48754767", "0.48737547", "0.48727497", "0.48720112", "0.48712555", "0.48712555", "0.4868228", "0.4864515", "0.48629126", "0.48625785", "0.4855843", "0.48537213", "0.48522067", "0.48508474", "0.48381898", "0.48365882", "0.483357", "0.48212653", "0.48197713", "0.4801887", "0.4798495", "0.4796916", "0.47927114", "0.47918823", "0.479083", "0.47814426", "0.47796234", "0.47775182", "0.47726002", "0.47712895", "0.47710904", "0.47700188", "0.47652712" ]
0.6494987
0
create the problem with sources, destinations and costMatrix display the problem on the screen create a solution using the Vogel's approximation method display on the screen the total cost
public void displaySolution() { Problem pb = new Problem(sources, destinations, costMatrix); pb.printProblem(); Solution sol = new Solution(pb); sol.computeCost(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n Source s1 = new Source(SourceType.FACTORY, \"Source1\");\n s1.setCapacity(10);\n Source s2 = new Source(35, SourceType.WAREHOUSE, \"Source2\");\n Source s3 = new Source(25, SourceType.WAREHOUSE, \"Source3\");\n System.out.println(s1.toString());\n // create the instances for Destination class\n Destination d1 = new Destination();\n d1.setDemand(20);\n d1.setName(\"Destination1\");\n Destination d2 = new Destination(25, \"Destination2\");\n Destination d3 = new Destination(25, \"Destination3\");\n // add sources and destinations\n Problem app = new Problem(3, 3);\n app.addSource(s1);\n app.addSource(s2);\n app.addSource(s3);\n\n app.addDestination(d1);\n app.addDestination(d2);\n app.addDestination(d3);\n\n int[][] cost1 = {{2, 3, 1}, {5, 4, 8}, {5, 6, 8}};\n\n app.setCost(cost1, 3, 3);\n System.out.println(app.toString()); // print the matrix of cost\n\n for (Source s : app.getSource()) {\n System.out.print(s.getCapacity() + \" \");\n }\n System.out.println();\n for (Destination d : app.getDestination()) {\n System.out.print(d.getDemand() + \" \");\n }\n\n }", "public void solveUsingVogelApproximationMethod() {\n this.solution = new Solution();\n\n Source[] proxySources = Arrays.copyOf(sources, sources.length);\n Destination[] proxyDestinations = Arrays.copyOf(destinations, destinations.length);\n int[][] matrix = new int[costs.length][costs[0].length];\n\n List<Integer> rows = new ArrayList<Integer>();\n List<Integer> columns = new ArrayList<Integer>();\n\n while ( rows.size() != proxySources.length && columns.size() != proxyDestinations.length ) {\n int[] penaltyRow = new int[proxyDestinations.length];\n int[] penaltyColumn = new int[proxySources.length];\n\n int firstTwo = 2;\n int firstValue = 0, secondValue = 0;\n for (int i = 0; i < proxySources.length; i++) {\n if (!rows.contains(i)) {\n for (int j = 0; j < proxyDestinations.length; j++) {\n if (!columns.contains(j)) {\n if (firstTwo == 2) {\n firstValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 1) {\n secondValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 0) {\n if (costs[i][j] < firstValue || costs[i][j] < secondValue) {\n if (firstValue < secondValue) secondValue = costs[i][j];\n else firstValue = costs[i][j];\n }\n }\n }\n }\n penaltyColumn[i] = Math.abs(firstValue - secondValue);\n firstTwo = 2;\n }\n }\n\n firstTwo = 2;\n\n for (int j = 0; j < proxySources.length; j++) {\n if (!columns.contains(j)) {\n for (int i = 0; i < proxyDestinations.length; i++) {\n if (!rows.contains(i)) {\n if (firstTwo == 2) {\n firstValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 1) {\n secondValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 0) {\n if (costs[i][j] < firstValue || costs[i][j] < secondValue) {\n if (firstValue < secondValue) secondValue = costs[i][j];\n else firstValue = costs[i][j];\n }\n }\n }\n\n }\n penaltyRow[j] = Math.abs(firstValue - secondValue);\n firstTwo = 2;\n }\n }\n\n int maxI = 0;\n for(int j=0;j<proxyDestinations.length;j++) {\n if(penaltyRow[j] > penaltyRow[maxI]) maxI = j;\n }\n\n int maxJ = 0;\n for(int i=0;i<proxySources.length;i++) {\n if(penaltyColumn[i] > penaltyColumn[maxJ]) maxJ = i;\n }\n\n if( penaltyRow[maxI] > penaltyColumn[maxJ] )\n {\n int indexJ = maxI;\n\n int finalIndexI = 0;\n int finalIndexJ = 0;\n int value = 100000;\n for(int i=0;i<proxySources.length;i++) {\n if(!rows.contains(i)) {\n if(costs[i][indexJ] < value) {\n value = costs[i][indexJ];\n finalIndexI = i;\n finalIndexJ = indexJ;\n }\n else if( costs[i][indexJ] == value ) {\n if( Math.min(proxySources[i].getSupply(),proxyDestinations[indexJ].getDemand()) > Math.min(proxySources[finalIndexI].getSupply(),proxyDestinations[finalIndexJ].getDemand()) ) {\n value = costs[i][indexJ];\n finalIndexI = i;\n finalIndexJ = indexJ;\n }\n }\n }\n }\n\n int supply = proxySources[finalIndexI].getSupply();\n int demand = proxyDestinations[finalIndexJ].getDemand();\n\n\n this.solution.add(sources[finalIndexI], destinations[finalIndexJ], Math.min(supply,demand), costs[finalIndexI][finalIndexJ]);\n\n if ( supply < demand ) {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(demand - supply);\n rows.add(finalIndexI);\n }\n else if( supply > demand ) {\n proxySources[finalIndexI].setSupply(supply-demand);\n proxyDestinations[finalIndexJ].setDemand(0);\n columns.add(finalIndexJ);\n }\n else {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(0);\n rows.add(finalIndexI);\n columns.add(finalIndexJ);\n }\n }\n else {\n int indexI = maxJ;\n\n int finalIndexI = 0;\n int finalIndexJ = 0;\n int value = 100000;\n for(int j=0;j<proxyDestinations.length;j++) {\n if(!columns.contains(j)) {\n if(costs[indexI][j] < value) {\n value = costs[indexI][j];\n finalIndexI = indexI;\n finalIndexJ = j;\n }\n else if( costs[indexI][j] == value ) {\n if( Math.min(proxySources[indexI].getSupply(),proxyDestinations[j].getDemand()) > Math.min(proxySources[finalIndexI].getSupply(),proxyDestinations[finalIndexJ].getDemand()) ) {\n value = costs[indexI][j];\n finalIndexI = indexI;\n finalIndexJ = j;\n }\n }\n }\n }\n\n int supply = proxySources[finalIndexI].getSupply();\n int demand = proxyDestinations[finalIndexJ].getDemand();\n\n\n this.solution.add(sources[finalIndexI], destinations[finalIndexJ], Math.min(supply,demand), costs[finalIndexI][finalIndexJ]);\n\n if ( supply < demand ) {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(demand - supply);\n rows.add(finalIndexI);\n }\n else if( supply > demand ) {\n proxySources[finalIndexI].setSupply(supply-demand);\n proxyDestinations[finalIndexJ].setDemand(0);\n columns.add(finalIndexJ);\n }\n else {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(0);\n rows.add(finalIndexI);\n columns.add(finalIndexJ);\n }\n }\n }\n this.solution.showSolution();\n }", "public void solveUsingLeastCostMethod() {\n\n this.solution = new Solution();\n\n Source[] proxySources = Arrays.copyOf(sources, sources.length);\n Destination[] proxyDestinations = Arrays.copyOf(destinations, destinations.length);\n int[][] matrix = new int[costs.length][costs[0].length];\n\n List<Integer> rows = new ArrayList<Integer>();\n List<Integer> columns = new ArrayList<Integer>();\n while ( rows.size() != proxySources.length && columns.size() != proxyDestinations.length ) {\n //getting minimum cell (if there is a tie, we choose where is the maximum quantity)\n int indexI,indexJ, value;\n indexI = 0;\n indexJ = 0;\n value = 0;\n boolean firstElement = true;\n for(int i=0;i<proxySources.length;i++) {\n if( !rows.contains(i) ) {\n for(int j=0;j<proxyDestinations.length;j++) {\n if( !columns.contains(j) ) {\n if ( firstElement ) {\n indexI = i;\n indexJ = j;\n value = costs[i][j];\n firstElement = false;\n }\n if( costs[i][j] < value ) {\n indexI = i;\n indexJ = j;\n value = costs[i][j];\n }\n else if( costs[i][j] == value ) {\n if( Math.min(proxySources[i].getSupply(),proxyDestinations[j].getDemand()) > Math.min(proxySources[indexI].getSupply(),proxyDestinations[indexJ].getDemand()) ) {\n indexI = i;\n indexJ = j;\n value = costs[i][j];\n }\n }\n }\n }\n }\n }\n int supply = proxySources[indexI].getSupply();\n int demand = proxyDestinations[indexJ].getDemand();\n\n\n this.solution.add(sources[indexI], destinations[indexJ], Math.min(supply,demand), costs[indexI][indexJ]);\n\n if ( supply < demand ) {\n proxySources[indexI].setSupply(0);\n proxyDestinations[indexJ].setDemand(demand - supply);\n rows.add(indexI);\n }\n else if( supply > demand ) {\n proxySources[indexI].setSupply(supply-demand);\n proxyDestinations[indexJ].setDemand(0);\n columns.add(indexJ);\n }\n else {\n proxySources[indexI].setSupply(0);\n proxyDestinations[indexJ].setDemand(0);\n rows.add(indexI);\n columns.add(indexJ);\n }\n }\n this.solution.showSolution();\n\n\n }", "private static VehicleRoutingTransportCostsMatrix createMatrix(VehicleRoutingProblem.Builder vrpBuilder)\n {\n VehicleRoutingTransportCostsMatrix.Builder matrixBuilder = VehicleRoutingTransportCostsMatrix.Builder.newInstance(true);\n\n for (String from : vrpBuilder.getLocationMap().keySet())\n {\n for (String to : vrpBuilder.getLocationMap().keySet())\n {\n Coordinate fromCoord = vrpBuilder.getLocationMap().get(from);\n Coordinate toCoord = vrpBuilder.getLocationMap().get(to);\n //double distance = EuclideanDistanceCalculator.calculateDistance(fromCoord, toCoord);\n double distance = ( (GeoPointer) new GCJPointer(fromCoord.getX(), fromCoord.getY())).distance(new GCJPointer(toCoord.getX(), toCoord.getY())) ;\n // should get distance in meters (?)\n matrixBuilder.addTransportDistance(from, to, distance);\n //matrixBuilder.addTransportTime(from, to, (distance / 2.));\n }\n }\n return matrixBuilder.build();\n }", "public void createCostGraph()\n\t{\n\t\tASPManager mgr = getASPManager();\n\n\t\tint woGraphPoints;\n\t\tString costTyptemp;\n\t\tString costGraph_Ext;\n\t\tdouble woCostTemp; \n\t\tdouble strCostTemp;\n\t\tString sGraphTitle;\n\t\tString sLeftTitle;\n\n\t\tint noOfRows = itemset0.countRows(); \n\t\tGraphInNewWind = false;\n\t\tint wono = sWorkOrderNoTree;\n\n\t\tString[] woCostType = new String[noOfRows]; \n\t\tdouble[] woCost = new double[noOfRows];\n\t\tdouble[] structureCost = new double[noOfRows];\n\n\t\titemset0.first();\n\n\t\tfor (int i = 0 ; i < noOfRows ; i++)\n\t\t{\n\t\t\twoCost[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDCOSTSINGLE\");\n\t\t\twoCostType[i] = itemset0.getRow().getValue(\"SWOCOSTTYPE\");\n\t\t\tstructureCost[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDCOST\");\n\n\t\t\titemset0.forward(1);\n\t\t}\n\n\t\twoGraphPoints = 6;\n\n\t\tfor (int i = 0 ; i < noOfRows ; i++)\n\t\t{\n\t\t\tif (woCost[i]>0 || structureCost[i]>0)\n\t\t\t\tgraphflagWo = 1;\n\t\t}\n\n\t\tsGraphTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMWOCOSTTITLE: Work Order Cost\");\n\t\tsLeftTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMAMOUNTTR: Amount\");\n\n\t\tGraphInNewWind = true;\n\n\t\tdrawGraphPic(wono,sGraphTitle,sLeftTitle,noOfRows,woCostType,woCost,structureCost);\n\t}", "double getSolutionCost();", "public static void main(String[] args) {\n generateAndSaveExampleGraph();\n\n\n /*\n * select graph for prepairing and handling by algorhytm\n * determine graph source from config.xml:\n * config case = ?\n * 1 - from matrix\n * 2 - from edges list\n * 3 - from xml\n * */\n //read configCase\n Integer configCase = 0;\n try {\n configCase = (Integer) XMLSerializer.read( \"config.xml\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n //determine case\n EuclidDirectedGraph graph = null;\n switch (configCase){\n case 1:\n graph = getGraphFromMatrix();\n break;\n case 2:\n graph = getGraphFromEdgesList();\n break;\n case 3:\n graph = getGraphFromXML();\n break;\n default:\n return;\n\n }\n //find all sources and sinks\n ArrayList<BoundsGraphVertex> sources = new ArrayList<>();\n ArrayList<BoundsGraphVertex> sinks = new ArrayList<>();\n //get all sources and sinks\n for (Map.Entry<BoundsGraphVertex, Map<BoundsGraphVertex, Double>> vertexEntry : graph.getMap().entrySet()) {\n //if there are no edges from vertex then its sink\n if (vertexEntry.getValue().isEmpty()) {\n sinks.add(vertexEntry.getKey());\n } else {\n //mark all vertexes which have incoming edges\n for (BoundsGraphVertex dest : vertexEntry.getValue().keySet()) {\n dest.setMarked(true);\n }\n }\n }\n //all unmarked vertexes are sources\n for (BoundsGraphVertex vertex : graph) {\n if (!vertex.isMarked()) sources.add(vertex);\n }\n\n /*\n * First algorithm: for each source-sink pair get path using euclid heuristics\n * */\n List<BoundsGraphVertex> minPath = null;\n Double minLength = Double.MAX_VALUE;\n for (BoundsGraphVertex source :\n sources) {\n for (BoundsGraphVertex sink :\n sinks) {\n //need use path storage list because algorhytm returns only double val of length.\n //path will be saved in this storage.\n List<BoundsGraphVertex> pathStorage = new ArrayList<>();\n //do algo\n Double length = Algorithms.shortestEuclidDijkstraFibonacciPathWithHeuristics(graph, source, sink, pathStorage, minLength);\n //check min\n if (minLength > length) {\n minLength = length;\n minPath = pathStorage;\n }\n\n }\n }\n\n /*\n * Second algorithm: for each source get better sink\n * */\n minPath = null;\n minLength = Double.MAX_VALUE;\n for (BoundsGraphVertex source :\n sources) {\n //need use path storage list because algorhytm returns only double val of length.\n //path will be saved in this storage.\n List<BoundsGraphVertex> pathStorage = new ArrayList<>();\n //do algo\n Double length = Algorithms.shortestEuclidDijkstraFibonacciPathToManySinks(graph, source, sinks, pathStorage, minLength);\n //check min\n if (minLength > length) {\n minLength = length;\n minPath = pathStorage;\n }\n }\n try {\n XMLSerializer.write(minPath, \"output.xml\", false);\n XMLSerializer.write(minLength, \"output.xml\", true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }", "public void solver(){\n\n tohSolver(noDisks,1,3,2);\n\n }", "private Route calculate(String fromStation, String toStation) {\n\t\tif (stations==null){\r\n\t\t\tSystem.out.println(\"DEBUG RUN OF DIJKSTRA.\");\r\n\t\t\tstations = new ArrayList<Station>();\r\n\t\t\tcreateDebugMap(stations);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Check if the stations exists\r\n\t\t */\r\n\t\tStation startStation = null, endStation = null;\r\n\r\n\t\t// Find starting station\r\n\t\tfor (Station thisStation : stations) {\r\n\t\t\tif (thisStation.stationName.equals(fromStation)) {\r\n\t\t\t\tSystem.out.println(\"Found startStaion in the Database\");\r\n\t\t\t\tstartStation = thisStation;\r\n\t\t\t}\r\n\t\t\tif (thisStation.stationName.equals(toStation)) {\r\n\t\t\t\tSystem.out.println(\"Found endStation in the Database\");\r\n\t\t\t\tendStation = thisStation;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Station not found. Break\r\n\t\tif (startStation == null || endStation == null) {\r\n\t\t\tSystem.out.println(\"Shit! One of the stations could not be found\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Declare the variables for the algorithm\r\n\t\t */\r\n\r\n\t\t// ArrayList for keeping track of stations we have visited.\r\n\t\tArrayList<Station> visitedStations = new ArrayList<Station>();\r\n\t\t// Array for the DijkstraStations. This type holds the current best cost and best link to it.\r\n\t\tArrayList<DijkstraStation> dijkstraStations = new ArrayList<DijkstraStation>();\r\n\r\n\t\t// The station we are examining neighbors from.\r\n\t\tDijkstraStation currentStation = new DijkstraStation(new Neighbor(startStation, 0, 0), 0, startStation);\r\n\r\n\t\t// PriorityQueue for sorting unvisited DijkstraStations.\r\n\t\tNeighBorDijktstraComparetor Dijkcomparator = new NeighBorDijktstraComparetor();\r\n\t\tPriorityQueue<DijkstraStation> unvisitedDijkstraStations;\r\n\t\tunvisitedDijkstraStations = new PriorityQueue<DijkstraStation>(100, Dijkcomparator);\r\n\r\n\t\t// Variable to keep track of the goal\r\n\t\tboolean goalFound = false; // did we find the goal yet\r\n\t\tint goalBestCost = Integer.MAX_VALUE; // did we find the goal yet\r\n\r\n\t\t// Add the start staion to the queue so that the loop will start with this staiton\r\n\t\tunvisitedDijkstraStations.add(currentStation);\r\n\t\tdijkstraStations.add(currentStation);\r\n\r\n\t\t/***************************\r\n\t\t * The Dijkstra algorithm loop.\r\n\t\t ***************************/\r\n\r\n\t\twhile (!unvisitedDijkstraStations.isEmpty()) {\r\n\t\t\t// Take the next station to examine from the queue and set the next station as the currentStation\r\n\t\t\tcurrentStation = unvisitedDijkstraStations.poll();\r\n\r\n\t\t\tSystem.out.println(\"\\n============= New loop passtrough =============\");\r\n\t\t\tSystem.out.println(\"Analysing neighbors of \" + currentStation.stationRef.stationName + \". Cost to this station is: \" + currentStation.totalCost);\r\n\r\n\t\t\t// Add visited so we dont visit again.\r\n\t\t\tvisitedStations.add(currentStation.stationRef);\r\n\r\n\t\t\t// break the algorithm if the current stations totalcost if bigger than the best cost of the goal\r\n\t\t\tif (goalBestCost < currentStation.totalCost) {\r\n\t\t\t\tSystem.out.println(\"Best route to the goal has been found. Best cost is: \" + goalBestCost\r\n\t\t\t\t\t\t+ \" (To reach current station is: \" + currentStation.totalCost + \")\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Check all neighbors from the currentStation to the neighBorQueue so we can examine them\r\n\t\t\tfor (Neighbor thisNeighbor : currentStation.stationRef.neighbors) {\r\n\r\n\t\t\t\t// Skip stations we have already visited\r\n\t\t\t\tif (!visitedStations.contains(thisNeighbor.stationRef)) {\r\n\t\t\t\t\t// If we havent seen this station before\r\n\t\t\t\t\t// Add it to the list of Dijkstrastations and to the PriorityQueue of unvisited stations\r\n\t\t\t\t\tif (getDijkstraStationByID(thisNeighbor.stationRef.stationid, dijkstraStations) == null) {\r\n\t\t\t\t\t\tDijkstraStation thisDijkstraStation = new DijkstraStation(thisNeighbor, currentStation.totalCost\r\n\t\t\t\t\t\t\t\t+ thisNeighbor.cost, currentStation.stationRef);\r\n\t\t\t\t\t\tdijkstraStations.add(thisDijkstraStation);\r\n\t\t\t\t\t\tunvisitedDijkstraStations.offer(thisDijkstraStation);\r\n\r\n\t\t\t\t\t\tif (thisNeighbor.stationRef.equals(endStation)) {\r\n\t\t\t\t\t\t\tgoalFound = true;\r\n\t\t\t\t\t\t\tgoalBestCost = (int) thisDijkstraStation.totalCost;\r\n\t\t\t\t\t\t\tSystem.out.println(\"Goal station found :) Cost to goal is: \" + goalBestCost);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println(\"New station seen: \" + thisDijkstraStation);\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Station has been seen before.\r\n\r\n\t\t\t\t\t\t// Get the station as a DijkstraStation from the array\r\n\t\t\t\t\t\tDijkstraStation thisDijkstraStation = getDijkstraStationByID(thisNeighbor.stationRef.stationid,\r\n\t\t\t\t\t\t\t\tdijkstraStations);\r\n\r\n\t\t\t\t\t\t// Check if the connection is better than the one we already know\r\n\t\t\t\t\t\tif (currentStation.totalCost + thisNeighbor.cost < thisDijkstraStation.totalCost) {\r\n\r\n\t\t\t\t\t\t\t// New best link found\r\n\t\t\t\t\t\t\tSystem.out.println(\"New best route found for \" + thisNeighbor.stationRef.stationName);\r\n\t\t\t\t\t\t\tSystem.out.println(\"Old cost:\" + thisDijkstraStation.totalCost + \", New cost: \"\r\n\t\t\t\t\t\t\t\t\t+ (currentStation.totalCost + thisNeighbor.cost));\r\n\r\n\t\t\t\t\t\t\t// update the cost and via station on the DijkstraStation\r\n\t\t\t\t\t\t\tthisDijkstraStation.updateBestLink((int) (currentStation.totalCost + thisNeighbor.cost),\r\n\t\t\t\t\t\t\t\t\tcurrentStation.stationRef, thisNeighbor);\r\n\r\n\t\t\t\t\t\t\t// if this is the goal station, update the totalCost\r\n\t\t\t\t\t\t\tif (thisNeighbor.stationRef.equals(endStation)) {\r\n\t\t\t\t\t\t\t\tgoalBestCost = (int) thisDijkstraStation.totalCost;\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Updated cost for the goal to : \" + goalBestCost);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}// End while\r\n\r\n\t\t// Print the World:\r\n//\t\t System.out.println();\r\n//\t\t System.out.println(\"################# Printing the world ###################\");\r\n//\t\t for (DijkstraStation thisDijkstraStation : dijkstraStations) {\r\n//\t\t System.out.println(thisDijkstraStation.toString());\r\n//\t\t DijkstraStation tempStation = thisDijkstraStation;\r\n//\t\t System.out.print(\"BackTracking route =>\");\r\n//\t\t while (!tempStation.stationRef.equals(startStation)) {\r\n//\t\t System.out.print(\" \" + tempStation.cost + \" to \" + tempStation.viaStation.stationName + \" #\");\r\n//\t\t\r\n//\t\t tempStation = getDijkstraStationByID(tempStation.viaStation.stationid, dijkstraStations);\r\n//\t\t }\r\n//\t\t System.out.print(\" End\");\r\n//\t\t System.out.print(\"\\n\\n\");\r\n//\t\t }\r\n//\r\n\t\tif (goalFound) {\r\n\t\t\tSystem.out.println(\"Generating route to goal\");\r\n\t\t\t// create a route object with all the stations.\r\n\t\t\tRoute routeToGoal = new Route(fromStation, toStation);\r\n\t\t\t// get the goalStation as a DijkstraStation Type\r\n\t\t\tDijkstraStation goalStation = getDijkstraStationByID(endStation.stationid, dijkstraStations);\r\n\r\n\t\t\trouteToGoal.cost = goalStation.totalCost;\r\n\t\t\trouteToGoal.price = (int) goalStation.totalCost;\r\n\r\n\t\t\t// Find the route to the goal\r\n\t\t\tDijkstraStation tempStation = goalStation;\r\n\r\n\t\t\twhile (!tempStation.stationRef.equals(startStation)) {\r\n\t\t\t\t// Add the station to the route table\r\n\t\t\t\tSerializableStation thisStation = new SerializableStation(tempStation.cost, tempStation.cost,\r\n\t\t\t\t\t\ttempStation.stationRef.stationName, tempStation.stationRef.stationid);\r\n\t\t\t\t\r\n\t\t\t\t//Fix region string\r\n\t\t\t\tString regionString=\"\";\r\n\t\t\t\tfor (Integer regionID : tempStation.stationRef.region) {\r\n\t\t\t\t\tregionString.concat(regionID+ \",\");\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\tthisStation.region = regionString.substring(0, regionString.length() - 1);\r\n\t\t\t\t\r\n\t\t\t\t//Add the station\r\n\t\t\t\trouteToGoal.route.add(0, thisStation);\r\n\t\t\t\t// Go to the previous station\r\n\t\t\t\ttempStation = getDijkstraStationByID(tempStation.viaStation.stationid, dijkstraStations);\r\n\t\t\t}\r\n\t\t\t// add the starting station\r\n\t\t\tSerializableStation thisStation = new SerializableStation(tempStation.stationRef.latitude, tempStation.stationRef.longitude, tempStation.stationRef.stationName,\r\n\t\t\t\t\ttempStation.stationRef.stationid);\r\n\t\t\trouteToGoal.route.add(0, thisStation);\r\n\r\n\t\t\t// print the route\r\n\t\t\t//System.out.println(\"Printing best route to the Goal:\\n\" + routeToGoal.toString());\r\n\r\n\t\t\treturn routeToGoal;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "private void compute() {\n InputReader sc = null;\n try {\n sc = new InputReader(new FileInputStream(new File(\"./resources/worldtour\")));\n } catch (FileNotFoundException ex) {\n throw new IllegalArgumentException(ex);\n }\n\n //Build Graph\n Graph G = new Graph(sc);\n adj = new int[G.totalVertices + 1][G.totalVertices + 1];\n\n //Run BFS from each vertex and fill adjacency matrix\n for (int v = 1; v <= G.totalVertices; v++) {\n Bfs bfs = new Bfs(G, v, adj);\n }\n\n //printAdjMatrix();\n // Find the farthest 3 cities to each city\n City[][] threeFurthestTo = new City[G.totalVertices + 1][4];\n // Find the farthest 3 cities from each city\n City[][] threeFurthestFrom = new City[G.totalVertices + 1][4];\n\n for (int i = 1; i <= G.totalVertices; i++) {\n City[] source = new City[G.totalVertices + 1];\n int sourceIdx = 1;\n City[] dest = new City[G.totalVertices + 1];\n int destIdx = 1;\n for (int j = 1; j <= G.totalVertices; j++) {\n if (adj[j][i] > 0) {\n source[sourceIdx] = new City(j, adj[j][i]);\n sourceIdx++;\n }\n if (adj[i][j] > 0) {\n dest[destIdx] = new City(j, adj[i][j]);\n destIdx++;\n }\n }\n Arrays.sort(source, 1, sourceIdx);\n threeFurthestTo[i][1] = source[1];\n threeFurthestTo[i][2] = source[2];\n threeFurthestTo[i][3] = source[3];\n Arrays.sort(dest, 1, destIdx);\n threeFurthestFrom[i][1] = dest[1];\n threeFurthestFrom[i][2] = dest[2];\n threeFurthestFrom[i][3] = dest[3];\n }\n\n //printMax3To(threeFurthestTo);\n //printMax3From(threeFurthestFrom);\n //For every path a -> x -> y -> b find the largest path\n int max = 0;\n int[] result = new int[4];\n for (int x = 1; x <= G.totalVertices; x++) {\n for (int y = 1; y <= G.totalVertices; y++) {\n if (adj[x][y] > 0) {\n for (int a = 1; a < 4; a++) {\n City start = threeFurthestTo[x][a];\n if (start != null) {\n for (int b = 1; b < 4; b++) {\n City end = threeFurthestFrom[y][b];\n if (end != null) {\n int startCityId = start.cityId;\n int endCityId = end.cityId;\n if (isDistinctCity(startCityId, x, y, endCityId)) {\n int sum = adj[startCityId][x] + adj[x][y] + adj[y][endCityId];\n if (sum > max) {\n result[0] = startCityId;\n result[1] = x;\n result[2] = y;\n result[3] = endCityId;\n max = sum;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n for (int x : result) {\n System.out.print(x + \" \");\n }\n }", "private double[][] makeMSTDouble(GaneshaLakeId[] gla, GaneshaLakeDist[] gla1, GaneshaGaneshaDist[] gla2, int noofganesha, int nooflakes, Ganesha[] ganesha, Lake[] lake, PrintWriter pw) {\n double[][] resultPlot = new double[noofganesha+nooflakes+1][5];\n int re = 1;\n \n boolean visited[] = new boolean[noofganesha];\n \n// int lid = 1;\n// \n// int minvaldist=Integer.MAX_VALUE;\n// int misvalganeshaat = -1;\n// for(int i=0;i<noofganesha;i++){\n//// pw.println(gla[i].lakeId +\"--\"+ lid );\n// if(gla[i].lakeId == lid && minvaldist>gla1[lid*noofganesha+i].distance){\n// minvaldist = gla1[lid*noofganesha+i].distance;\n// misvalganeshaat = i;\n// }\n// }\n \n// for(int lid =0;lid<nooflakes;lid++){\n// int countCO1Lake = countClusterOfOneLake(gla,lid);\n// for(int i=0;i<noofganesha;i++){\n// at = 'k';\n// mintill = Integer.MAX_VALUE;\n// minisat = 0;\n// int start = lid*noofganesha;\n// for(int j=start;j<start+noofganesha;j++){\n// if(mintill > gla1[j].distance && !visited[gla[j].ganesha] && gla[gla[j].ganesha].lakeId == lid){\n// minisat=lid;\n// mintill=gla1[j].distance;\n// at='k';\n// minis=j;\n// }\n// }\n// }\n\n for(int i=0;i<nooflakes;i++)\n {\n \n int minvaldist=Integer.MAX_VALUE;\n int misvalganeshaat = -1;\n int noofginclust = 0;\n for(int ij=0;ij<noofganesha;ij++){\n// pw.println(gla[i].lakeId +\"--\"+ lid );\n if(gla[ij].lakeId == i && minvaldist>gla1[i*noofganesha+ij].distance){\n minvaldist = gla1[i*noofganesha+ij].distance;\n misvalganeshaat = ij;\n noofginclust++;\n }\n }\n newClass nc[]=new newClass[noofganesha+1];\n int p=0;\n nc[0]=new newClass();\n nc[0].isLake=true;\n nc[0].lakeId=i;\n Ganesha g[]=new Ganesha[noofganesha];\n int k1=0;\n for(int j=0;j<noofganesha;j++)\n {\n if(gla[j].lakeId == i)\n {\n g[k1]=new Ganesha();\n g[k1].ganeshaId=j;\n \n// pw.println(j+\" j+++\");\n k1++;\n \n }\n }\n pw.println(k1+\" k1+++\");\n for(int k=0;k<k1;k++)\n {\n int min=Integer.MAX_VALUE;\n int minIs=0;\n// pw.println(gla2.length);\n for(int l=0;l<gla2.length;l++)\n {\n if( g[k]!=null && gla2[l].ganesha1==g[k].ganeshaId && gla[gla2[l].ganesha2].lakeId == i)\n {\n// pw.println( gla[g[k].ganeshaId].lakeId+\" lakeid\");\n if(min>gla2[l].distance && visited[gla2[l].ganesha2]==false && gla2[l].distance !=0)\n {\n// pw.println(gla2[l].ganesha2+\"--\"+i);\n minIs=l;\n min=gla2[l].distance;\n visited[gla2[l].ganesha2]=true;\n }\n }\n }\n newClass nc1=new newClass();\n nc1.lakeId=i;\n nc1.ganeshaId=gla2[minIs].ganesha2;\n nc1.src=g[k].ganeshaId;\n nc1.isLake=false;\n p++;\n nc[p]=nc1;\n }\n if(misvalganeshaat != -1){\n resultPlot[re][0] = lake[i].lan;\n resultPlot[re][1] = lake[i].lng;\n resultPlot[re][2] = ganesha[misvalganeshaat].lan;\n resultPlot[re][3] = ganesha[misvalganeshaat].lng;\n \n resultPlot[re][4] = lake[i].lakeId;\n re++;\n pw.println(\"Lake: \"+i+\" (lan, log): (\"+lake[i].lan+\", \"+lake[i].lng+\" to ganesha: \"+misvalganeshaat+\" (lan, log): (\"+ganesha[misvalganeshaat].lan+\", \"+ganesha[misvalganeshaat].lng+\")\");\n for(int k=1;k<p;k++)\n {\n \n resultPlot[re][0] = ganesha[nc[k].src].lan;\n resultPlot[re][1] = ganesha[nc[k].src].lng;\n resultPlot[re][2] = ganesha[nc[k].ganeshaId].lan;\n resultPlot[re][3] = ganesha[nc[k].ganeshaId].lng;\n //change 1\n resultPlot[re][4] = lake[i].lakeId;\n re++;\n // pw.println(\"ganesha\\t\"+nc[k].ganeshaId+\"\\t from\\t ganesha: \"+nc[k].src);\n pw.println(\"ganesha: \"+nc[k].src+\"(lan, lng): (\"+ganesha[nc[k].src].lan+\", \"+ganesha[nc[k].src].lng+\") to ganesha: \"+nc[k].ganeshaId+\"(lan, lng): (\"+ganesha[nc[k].ganeshaId].lan+\", \"+ganesha[nc[k].ganeshaId].lng+\")\");\n }\n }\n else{\n \n resultPlot[re][0] = lake[i].lan;\n resultPlot[re][1] = lake[i].lng;\n resultPlot[re][2] = lake[i].lan;\n resultPlot[re][3] = lake[i].lng;\n resultPlot[re][4] = lake[i].lakeId;\n re++;\n pw.println(\"Lake \"+i+\" (lan, log): (\"+lake[i].lan+\", \"+lake[i].lng+\") is Too Far.\");\n }\n pw.println();\n }\n resultPlot[0][0] = re;\n \n// for(int j=0;j<noofganesha;j++){\n// int k1 = j*noofganesha;\n// for(int k=j*noofganesha;k<(j+1)*noofganesha;k++){\n// if((mintill>gla2[k].distance)&& !visited[j] && gla[j].lakeId==lid){\n// minisat = j;\n// mintill = gla2[j].distance;\n// minis = k1-j;\n// at = 'g';\n// }\n// }\n// }\n// for(int i=0;i<noofganesha;i++){\n// int j = i;\n// pw.println(gla[i].lakeId+\" - \"+lid);\n// if(gla[i].lakeId == lid)\n// while(j<gla2.length){\n// pw.println(mintill+\" - \"+gla2[j].distance+\" - \"+visited[gla2[j].ganesha1]+\" + \"+gla[gla2[j].ganesha1].lakeId);\n// if((mintill>gla2[j].distance)&& gla2[j].distance != 0 &&\n// visited[gla2[j].ganesha1] && lid==gla[gla2[j].ganesha1].lakeId && lid==gla[gla2[j].ganesha2].lakeId){\n// minisat = gla2[j].ganesha2;;\n// mintill = gla2[j].distance;\n// minis = gla2[j].ganesha1;\n// at = 'g';\n// }\n// j = j + noofganesha;\n// }\n// pw.println(\"+\"+minis);\n// visited[minis]=true;\n// pw.println(minisat +\"-\"+at+\"\\t---------------->\"+minis);\n// \n// }\n// pw.println(\"#\");\n// \n return resultPlot;\n }", "public void creat() throws Exception{\n\t\n\t\tString filePath = new File(\"\").getAbsolutePath();\n\t\t// read file Q(i,j) \n\t\t Scanner sc = new Scanner(new BufferedReader(new FileReader(filePath+\"/src/planningoptimization115657k62/daohoainam/Q.txt\")));\n\t\t while(sc.hasNextLine()) {\n\t\t \t Q = new int[N][M];\n\t\t for (int i = 0; i < Q.length; i++) {\n\t\t String[] line = sc.nextLine().trim().split(\" \");\n\t\t for (int j = 0; j < line.length; j++) {\n\t\t Q[i][j] = Integer.parseInt(line[j]);\n\t\t }\n\t\t }\n\t\t }\n\t\t sc.close();\n\t\t \n\t\t // read file d(i, j)\n\t\t d = new int[M+1][M+1];\n\t\t Scanner sc_d = new Scanner(new BufferedReader(new FileReader(filePath+\"/src/planningoptimization115657k62/daohoainam/distance.txt\")));\n\t\t while(sc_d.hasNextLine()) {\n\t\t for (int i = 0; i < d.length; i++) {\n\t\t String[] line = sc_d.nextLine().trim().split(\" \");\n\t\t for (int j = 0; j < line.length; j++) {\n\t\t d[i][j] = Integer.parseInt(line[j]);\n\t\t }\n\t\t }\n\t\t }\n\t\t sc_d.close();\n\t\t \n\t\t // read file q(k)\n\t\t q = new int[N];\n\t\t Scanner sc_q = new Scanner(new File(filePath+\"/src/planningoptimization115657k62/daohoainam/need.txt\"));\n\t\t int i = 0;\n\t\t while(sc_q.hasNextInt()){\n\t\t q[i++] = sc_q.nextInt();\n\t\t }\n\t\t sc_q.close();\n\t}", "public static void main(String[] args) {\n /* *************** */\n /* * QUESTION 7 * */\n /* *************** */\n /* *************** */\n\n for(double p=0; p<1; p+=0.1){\n for(double q=0; q<1; q+=0.1){\n int res_1 = 0;\n int res_2 = 0;\n for(int i=0; i<100; i++){\n Graph graph_1 = new Graph();\n graph_1.generate_full_symmetric(p, q, 100);\n //graph_2.setVertices(new ArrayList<>(graph_1.getVertices()));\n Graph graph_2 = (Graph) deepCopy(graph_1);\n res_1+=graph_1.resolve_heuristic_v1().size();\n res_2+=graph_2.resolve_heuristic_v2();\n }\n res_1/=100;\n System.out.format(\"V1 - f( %.1f ; %.1f) = %s \\n\", p, q, res_1);\n res_2/=100;\n System.out.format(\"V2 - f( %.1f ; %.1f) = %s \\n\", p, q, res_2);\n }\n }\n\n }", "@Override\n public void evaluate(Solution solution) throws JMException {\n\n int[] tour = new int[numberOfNodes + 1];\n int firstCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[0];\n int lastCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[numberOfNodes - 1];\n\n double fitness1_td = 0.0;\n\n // Calculate fitness 1 - total distance\n for (int i = 0; i < numberOfNodes - 1; i++) {\n int x = ((Permutation) solution.getDecisionVariables()[0]).vector_[i];\n int y = ((Permutation) solution.getDecisionVariables()[0]).vector_[i+1];\n\n tour[i] = x;\n tour[i+1] = y;\n\n fitness1_td += calDistances(x, y);\n }\n // generate tour with same start city and end city\n tour[numberOfNodes] = tour[0];\n\n fitness1_td += calDistances(firstCity, lastCity);\n\n\n // Correctness check: does the tour start and end in the same city\n if(tour[0] != tour[tour.length - 1]) {\n System.err.println(\"ERROR: The last city must be the same as the first city\");\n System.exit(1);\n }\n\n /*for (int i = 0; i < tour.length; i++) {\n System.out.print(tour[i] + \" \");\n }*/\n //System.out.println(\"\\n\" + tour.length);\n\n // Calculate fitness 2 - objective value of a given tour\n ArrayInt z = (ArrayInt) solution.getDecisionVariables()[1];\n //System.out.println(z.getLength());\n\n double fitness2_ob;\n double wc = 0.0;\n double ft = 0.0;\n double fp = 0.0;\n\n //the following is used for a different interpretation of \"packingPlan\"\n int itemsPerCity = z.getLength() / (tour.length - 2);\n //System.out.println(itemsPerCity);\n\n for (int i = 0; i < tour.length - 1; i++) {\n\n int currentCityTEMP = tour[i];\n // what's the current city? --> but the items start at city 2 in the TTP file, so I have to take another 1 off!\n int currentCity = currentCityTEMP - 1;\n\n if (i > 0) {\n\n if (currentCity == -1) {\n // No items in city 1\n wc += 0.0;\n fp += 0.0;\n\n } else {\n\n for (int itemNumber = 0; itemNumber < itemsPerCity; itemNumber++) {\n\n int indexOfPackingPlan = (i-1) * itemsPerCity + itemNumber;\n // what is the next item's index in items-array?\n int itemIndex = currentCity + itemNumber * (numberOfNodes - 1);\n //System.out.println(\"i: \" + i);\n\n if (z.getValue(indexOfPackingPlan) == 1) {\n // pack item\n //System.out.println(itemIndex);\n int currentWC = items[itemIndex][2];\n wc += currentWC;\n\n int currentFP = items[itemIndex][1];\n fp += currentFP;\n }\n }\n\n }\n\n int h = (i+1) % (tour.length-1); //h: next tour city index\n //System.out.println(\"h: \" + h);\n long distance = calDistances(i, h);\n // compute the adjusted (effective) distance\n ft += (distance / (1 - wc * (maxSpeed - minSpeed) / capacityOfKnapsack));\n }\n }\n\n wendUsed = wc;\n wend = capacityOfKnapsack - wc;\n fitness2_ob = fp - ft * rentingRatio;\n\n solution.setObjective(0, fitness1_td);\n solution.setObjective(1, -fitness2_ob); // Convert from maximum objective value to minimum objective value\n }", "public static void main(String[] args) {\n\t\tint grid[][] = new int[][]\n\t\t\t { \n\t\t\t { 1, 1, 0, 0, 0, 0, 1, 0, 0, 0 }, \n\t\t\t { 0, 1, 0, 1, 0, 0, 0, 1, 0, 0 }, \n\t\t\t { 0, 0, 0, 1, 0, 0, 1, 0, 1, 0 }, \n\t\t\t { 1, 1, 1, 1, 0, 1, 1, 1, 1, 0 }, \n\t\t\t { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1 }, \n\t\t\t { 0, 1, 0, 0, 0, 0, 1, 0, 1, 1 }, \n\t\t\t { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, \n\t\t\t { 0, 1, 0, 0, 0, 0, 1, 0, 0, 0 }, \n\t\t\t { 0, 0, 1, 1, 1, 1, 0, 1, 1, 0 } \n\t\t\t };\n\t\t\n // Step 1: Obtain an instance of GridBasedTrafficControl.\n Configurator cfg = new DefaultConfigurator();\n GridBasedTrafficControl gbtc = cfg.getGridBasedTrafficControl(grid);\n\t\t\n\t // Step 2: Obtain path for Journey-1.\n\t Point source1 = new Point(0, 0);\n\t Point dest1 = new Point(3,4);\t \n\t String vehicleId1 = formVehicleId(source1);\n\t List<Point> path1 = gbtc.allocateRoute(vehicleId1, source1, dest1);\n\t System.out.println(\"Route for Journey-1:\" + path1);\n\t \n\t // Step 3: Obtain path for Journey-2.\n\t // This call will not return a route as the available route conflicts with the route\n\t // allocated for Journey-1.\n\t Point source2 = new Point(3, 0);\n\t Point dest2 = new Point(2,4);\n\t String vehicleId2 = formVehicleId(source2);\n\t List<Point> path2 = gbtc.allocateRoute(vehicleId2, source2, dest2);\n\t System.out.println(\"Route for Journey-2:\" + path2);\n\t \n\t // Step 4: Start Journey-1 and mark Journey-1 as complete.\n\t GridConnectedVehicle vehicle1 = new GridConnectedVehicle(vehicleId1, gbtc);\n\t vehicle1.selfDrive(path1);\n\t gbtc.markJourneyComplete(vehicleId1, source1, dest1);\n\t \n\t // Step 5: Retry call to obtain path for Journey-2.\n\t // This call should return a valid path as Journey-1 was marked as complete.\n\t path2 = gbtc.allocateRoute(formVehicleId(source2), source2, dest2);\n\t System.out.println(\"Route for Journey-2:\" + path2);\n\t \n\t // Step 6: Start Journey-2 and mark Journey-2 as complete.\n\t GridConnectedVehicle vehicle2 = new GridConnectedVehicle(vehicleId2, gbtc);\n\t vehicle2.selfDrive(path2);\n\t gbtc.markJourneyComplete(vehicleId2, source2, dest2);\n\t}", "public static void main(String[] args) throws Exception {\n\n String[] options=new String[2];\n options[0]=\"Smart\";\n options[1]=\"Dummy\";\n String choice=\"\";\n String availableChars[] = {\"5x5maze.txt\",\"7x7maze.txt\",\"8x8maze.txt\",\"9x9maze.txt\",\"10x10maze.txt\",\"12x12maze.txt\"};\n\n int choiceG = JOptionPane.showOptionDialog(JOptionPane.getRootFrame(),\n \"Would you like to use the smart or dummy solution?\",\n \"Flow Free solver\",0,\n JOptionPane.INFORMATION_MESSAGE,null,options,null\n );\n if(choiceG==0){\n choice = (String) JOptionPane.showInputDialog(JOptionPane.getRootFrame(),\n \"Which puzzle size would you like to solve?\",\n \"Choose puzzle\",\n JOptionPane.PLAIN_MESSAGE,\n null,\n availableChars,\n 2);\n try{\n int[][] numberedMap=loadMap(choice);\n Node[] map=linkNodes(numberedMap);\n height=numberedMap.length;\n width=numberedMap[0].length;\n\n FlowDrawer.getInstance();\n FlowDrawer.setBoard(numberedMap);\n FlowFinder f=new FlowFinder(numberedMap,map,false);\n }\n catch(Exception e){System.out.println(e+\" \"+e.getStackTrace()[0].getLineNumber());}\n }\n else{\n choice = (String) JOptionPane.showInputDialog(JOptionPane.getRootFrame(),\n \"Which puzzle size would you like to solve?\",\n \"Choose puzzle\",\n JOptionPane.PLAIN_MESSAGE,\n null,\n availableChars,\n 2);\n try{\n int[][] numberedMap=loadMap(choice);\n Node[] map=linkNodes(numberedMap);\n height=numberedMap.length;\n width=numberedMap[0].length;\n\n FlowDrawer.getInstance();\n FlowDrawer.setBoard(numberedMap);\n FlowFinder f=new FlowFinder(numberedMap,map,true);\n }\n catch(Exception e){System.out.println(e+\" \"+e.getStackTrace()[0].getLineNumber());}\n }\n\n\n\n }", "public void run(){\n\t\tlong start_time, end_time, time_elapsed;\n System.out.println(\"Starting Problem \"+problem_number);\n start_time = System.currentTimeMillis();\n\t\t\n\t\tint matrixRows = 20;\n\t\tint matrixColumns = 20;\n\t\tint counter = 0;\n\t\tint num_of_adj = 4;\n\t\tString source = \"08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80 24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72 21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95 78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58 19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40 04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66 88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36 20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16 20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54 01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48\";\n\t\t\n\t\tString[] individualNums = source.split(\" \");\n\t\tmyMatrix m = new myMatrix(matrixRows, matrixColumns);\n\t\tArrayList<Integer> highest_factors = new ArrayList<Integer>();\n\t\tint highest_factor_product = 0;\n\t\tint temp_highest_factor_product = 1;\n\t\t\n\t\tfor(int i=0; i<m.getNumOfRows(); i++){\n\t\t\tfor(int j=0; j<m.getNumOfColumns(); j++){\t\t\t\t\n\t\t\t\tm.setMatrixEntry(i, j, Integer.valueOf(individualNums[counter]));\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(m);\n\t\t\n\t\t//up and down products\n\t\tfor(int i=0; i<m.getNumOfRows()-num_of_adj; i++){\t\t\t\n\t\t\tfor(int j=0; j<m.getNumOfColumns(); j++){\n\t\t\t\t\n\t\t\t\ttemp_highest_factor_product = 1;\n\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\ttemp_highest_factor_product = temp_highest_factor_product * m.getMatrixEntry(i+k, j);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(temp_highest_factor_product > highest_factor_product){\n\t\t\t\t\thighest_factor_product = temp_highest_factor_product;\n\t\t\t\t\thighest_factors.clear();\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\t\thighest_factors.add(m.getMatrixEntry(i+k, j));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//left and right products\n\t\tfor(int i=0; i<m.getNumOfRows(); i++){\t\t\t\n\t\t\tfor(int j=0; j<m.getNumOfColumns()-num_of_adj; j++){\n\t\t\t\t\n\t\t\t\ttemp_highest_factor_product = 1;\n\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\ttemp_highest_factor_product = temp_highest_factor_product * m.getMatrixEntry(i, j+k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(temp_highest_factor_product > highest_factor_product){\n\t\t\t\t\thighest_factor_product = temp_highest_factor_product;\n\t\t\t\t\thighest_factors.clear();\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\t\thighest_factors.add(m.getMatrixEntry(i, j+k));\n\t\t\t\t\t}\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t//NW to SE diagonals\n\t\tfor(int i=0; i<m.getNumOfRows()-num_of_adj; i++){\t\t\t\n\t\t\tfor(int j=0; j<m.getNumOfColumns()-num_of_adj; j++){\n\t\t\t\t\n\t\t\t\ttemp_highest_factor_product = 1;\n\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\ttemp_highest_factor_product = temp_highest_factor_product * m.getMatrixEntry(i+k, j+k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(temp_highest_factor_product > highest_factor_product){\n\t\t\t\t\thighest_factor_product = temp_highest_factor_product;\n\t\t\t\t\thighest_factors.clear();\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\t\thighest_factors.add(m.getMatrixEntry(i, j+k));\n\t\t\t\t\t}\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t//SW to NE diagonals\n\t\tfor(int i=0+num_of_adj-1; i<m.getNumOfRows(); i++){\t\t\t\n\t\t\tfor(int j=0+num_of_adj-1; j<m.getNumOfColumns(); j++){\n\t\t\t\t\n\t\t\t\ttemp_highest_factor_product = 1;\n\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\ttemp_highest_factor_product = temp_highest_factor_product * m.getMatrixEntry(i-k, j+k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(temp_highest_factor_product > highest_factor_product){\n\t\t\t\t\thighest_factor_product = temp_highest_factor_product;\n\t\t\t\t\thighest_factors.clear();\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\t\thighest_factors.add(m.getMatrixEntry(i-k, j+k));\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(highest_factor_product + \"\\n\\n\" + highest_factors);\n\t\t\n\t\tend_time = System.currentTimeMillis();\n System.out.println(\"Finished Problem\");\n time_elapsed = end_time - start_time;\n System.out.println(\"Time taken to finish problem: \"+time_elapsed);\n\t\t\n\t}", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "public static void liveDemo() {\n Scanner in = new Scanner( System.in );\n float srcTank1, srcTank2, destTank;\n int alternetPaths;\n Graph mnfld = new Graph();\n boolean runSearch = true;\n\n //might need to limit query results, too large maybe?\n //newnodes = JDBC.graphInformation(); //returns arraylist of nodes\n //mnfld.setPipes(newnodes); //set nodes to the manifold\n //JDBC.insertConnections(mnfld);\n\n//\t\t /*\n//\t\t\tfor (int i = 0; i < newnodes.length(); i++) { //length might be wrong\n//\t\t\t\t//need to look for way to add edges by looking for neighbor nodes i think\n//\t\t\t\t//loop through nodes and create Edges\n//\t\t\t\t//might need new query\n//\t\t\t\tnewedges.addEdge(node1,node2,cost);\n//\t\t\t}\n//\n//\t\t\tmnfld.setConnections(newedges);\n//\n//\t\t\tup to this point, graph should be global to Dijkstra and unused.\n//\t\t\tloop until user leaves page\n//\t\t\tget input from user for tanks to transfer\n//\t\t\tfind shortest path between both tanks\n//\t\t\tend loop\n//\t\t\tthis will change depending how html works so not spending any time now on it\n//\t\t*/\n //shortestPath.runTest();\n\n shortestPath.loadGraph( mnfld );\n while (runSearch) {\n // Gets user input\n System.out.print( \"First Source Tank: \" );\n srcTank1 = in.nextFloat();\n System.out.print( \"Second Source Tank: \" );\n srcTank2 = in.nextFloat();\n System.out.print( \"Destination Tank: \" );\n destTank = in.nextFloat();\n System.out.print( \"Desired Number of Alternate Paths: \" );\n alternetPaths = in.nextInt();\n\n // Prints outputs\n Dijkstra.resetCosts( mnfld );\n System.out.println( \"True shortest with alt paths\" );\n Dijkstra.findAltPaths( mnfld, alternetPaths, srcTank1, destTank );\n mnfld.restoreDroppedConnections();\n\n Dijkstra.resetCosts( mnfld );\n System.out.println( \"Lineup Considering used connections\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( srcTank1 ), true );\n mnfld.getPipe( destTank ).printLine();\n mnfld.restoreDroppedConnections();\n\n Dijkstra.resetCosts( mnfld );\n System.out.println( \"Lineup Considering only open connections\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( srcTank1 ), false );\n mnfld.getPipe( destTank ).printLine();\n mnfld.restoreDroppedConnections();\n\n Dijkstra.resetCosts( mnfld );\n System.out.println( \"Merge Lineup\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( srcTank1 ) );\n System.out.println( \"\\t Original Lineup: \" );\n mnfld.getPipe( destTank ).printLine();\n System.out.println( \"\\t Merged Lineup: \" );\n Dijkstra.mergePaths( mnfld, srcTank2, mnfld.getPipe( destTank ).getPath(), mnfld.getPipe( destTank ) );\n System.out.print( \"\\nRun another search [1:Yes, 0:No] :: \" );\n if (in.nextInt() == 0) runSearch = false;\n else System.out.println( \"\\n\\n\\n\" );\n }\n\n\n }", "public static void main(String[] args) throws Exception {\n final DataModel data = new DataModel();\n GeoApiContext context = new GeoApiContext.Builder().apiKey(\"AIzaSyDWspiiu2xZwfxBCtt4_B9tcdHR-uEZYvY\").build();\n\n long[][] distanceMatrix=null ;\n Gson gson = new Gson();\n String lines = Files.readString(Paths.get(\"out.txt\"), Charset.defaultCharset());\n System.out.println(lines);\n distanceMatrix = gson.fromJson(lines.toString(),long[][].class);\n\n\n data.distanceMatrix = distanceMatrix;\n\n // Create Routing Index Manager\n RoutingIndexManager manager = new RoutingIndexManager(data.distanceMatrix.length, data.vehicleNumber, data.depot);\n\n // Create Routing Model.\n RoutingModel routing = new RoutingModel(manager);\n\n // Create and register a transit callback.\n final int transitCallbackIndex = routing.registerTransitCallback((long fromIndex, long toIndex) -> {\n // Convert from routing variable Index to user NodeIndex.\n int fromNode = manager.indexToNode(fromIndex);\n int toNode = manager.indexToNode(toIndex);\n return data.distanceMatrix[fromNode][toNode];\n });\n\n // Define cost of each arc.\n routing.setArcCostEvaluatorOfAllVehicles(transitCallbackIndex);\n\n // Add Distance constraint.\n routing.addDimension(transitCallbackIndex, 0, 1000000000, true, // start cumul to zero\n \"Distance\");\n RoutingDimension distanceDimension = routing.getMutableDimension(\"Distance\");\n distanceDimension.setGlobalSpanCostCoefficient(100);\n\n // Setting first solution heuristic.\n RoutingSearchParameters searchParameters = main.defaultRoutingSearchParameters().toBuilder()\n .setFirstSolutionStrategy(FirstSolutionStrategy.Value.GLOBAL_CHEAPEST_ARC).build();\n\n // Solve the problem.\n Assignment solution = routing.solveWithParameters(searchParameters);\n\n // Print solution on console.\n printSolution(data, routing, manager, solution);\n }", "@Override\n\tpublic void solve() {\n\t\tlong startTime = System.nanoTime();\n\n\t\twhile(!unvisitedPM.isEmpty()){\n\t\t\tProblemModel current = findCheapestNode();\n\t\n\t\t\tfor(ProblemModel pm : current.getSubNodes()){\n\t\t\n\t\t\t\tif(!visited.contains(pm) && !unvisitedPM.contains(pm)){\n\t\t\t\t\t\n\t\t\t\t\tunvisitedPM.add(pm);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(current.getSideStart().isEmpty()){\n\t\t\t\tSystem.out.print( \"\\n\"+ \"StartSide Runners: \");\n\t\t\t\tfor(Integer r: current.getSideStart()){\n\t\t\t\t\tSystem.out.print( \" \" +r) ;\n\t\t\t\t}\n\t\t\t\tSystem.out.print( \"\\n\" + \"EndSide Runners: \");\n\t\t\t\tfor(Integer r: current.getSideEnd()){\n\t\t\t\t\tSystem.out.print( \" \" + r);\n\t\t\t\t}\n\n\t\t\t\tprintPathTaken(current);\n\t\t\t\tSystem.out.print( \"\\n\" + \"------------done--------------\");\n\t\t\t\tlong endTime = System.nanoTime();\n\t\t\t\tlong duration = ((endTime - startTime)/1000000);\n\t\t\t\tSystem.out.print( \"\\n\" + \"-AS1 Time taken: \" + duration + \"ms\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tvisited.add(current);\n\t\t\n\t\t}\n\t\t\n\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane2 = new javax.swing.JScrollPane();\n jTextArea2 = new javax.swing.JTextArea();\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jLabel2 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jTextArea2.setEditable(false);\n jTextArea2.setColumns(20);\n if(Execution.op1==1)\n x=adj2x2(Execution.a11,Execution.a12 ,Execution.a21,Execution.a22);\n else\n x=adj3x3(Execution.a11,Execution.a12,Execution.a13,Execution.a21,Execution.a22,Execution.a23,Execution.a31,Execution.a32,Execution.a33);\n jTextArea2.setText(\" \"+x);\n jTextArea2.setRows(5);\n jScrollPane2.setViewportView(jTextArea2);\n\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n jLabel1.setText(\"GIVEN MATRIX\");\n\n jTextArea1.setEditable(false);\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jTextArea1.setText(\" \" +Execution.getm());\n jScrollPane1.setViewportView(jTextArea1);\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 13)); // NOI18N\n jLabel2.setText(\"ADJOINT MATRIX\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(51, 51, 51)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(37, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addGap(81, 81, 81))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(28, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(37, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void generateCost() throws StandardException {\n\n double baseTableSelectivity = computePhaseSelectivity(selectivityHolder,QualifierPhase.BASE);\n double filterBaseTableSelectivity = computePhaseSelectivity(selectivityHolder,QualifierPhase.BASE,QualifierPhase.FILTER_BASE);\n double projectionSelectivity = computePhaseSelectivity(selectivityHolder,QualifierPhase.FILTER_PROJECTION);\n double totalSelectivity = computeTotalSelectivity(selectivityHolder);\n\n assert filterBaseTableSelectivity >= 0 && filterBaseTableSelectivity <= 1.0:\"filterBaseTableSelectivity Out of Bounds -> \" + filterBaseTableSelectivity;\n assert baseTableSelectivity >= 0 && baseTableSelectivity <= 1.0:\"baseTableSelectivity Out of Bounds -> \" + baseTableSelectivity;\n assert projectionSelectivity >= 0 && projectionSelectivity <= 1.0:\"projectionSelectivity Out of Bounds -> \" + projectionSelectivity;\n assert totalSelectivity >= 0 && totalSelectivity <= 1.0:\"totalSelectivity Out of Bounds -> \" + totalSelectivity;\n\n // Total Row Count from the Base Conglomerate\n double totalRowCount = scc.baseRowCount();\n assert totalRowCount >= 0 : \"totalRowCount cannot be negative -> \" + totalRowCount;\n // Rows Returned is always the totalSelectivity (Conglomerate Independent)\n scanCost.setEstimatedRowCount(Math.round(totalRowCount*totalSelectivity));\n\n double baseTableAverageRowWidth = scc.getBaseTableAvgRowWidth();\n double baseTableColumnSizeFactor = scc.baseTableColumnSizeFactor(totalColumns);\n\n // We use the base table so the estimated heap size and remote cost are the same for all conglomerates\n double colSizeFactor = baseTableAverageRowWidth*baseTableColumnSizeFactor;\n assert baseTableAverageRowWidth >= 0 : \"baseTableAverageRowWidth cannot be negative -> \" + baseTableAverageRowWidth;\n assert baseTableColumnSizeFactor >= 0 : \"baseTableColumnSizeFactor cannot be negative -> \" + baseTableColumnSizeFactor;\n\n double openLatency = scc.getOpenLatency();\n double closeLatency = scc.getCloseLatency();\n double localLatency = scc.getLocalLatency();\n double remoteLatency = scc.getRemoteLatency();\n double remoteCost = openLatency + closeLatency + totalRowCount*totalSelectivity*remoteLatency*(1+colSizeFactor/100d);\n assert openLatency >= 0 : \"openLatency cannot be negative -> \" + openLatency;\n assert closeLatency >= 0 : \"closeLatency cannot be negative -> \" + closeLatency;\n assert localLatency >= 0 : \"localLatency cannot be negative -> \" + localLatency;\n assert remoteLatency >= 0 : \"remoteLatency cannot be negative -> \" + remoteLatency;\n assert remoteCost >= 0 : \"remoteCost cannot be negative -> \" + remoteCost;\n // Heap Size is the avg row width of the columns for the base table*total rows\n // Average Row Width\n // This should be the same for every conglomerate path\n scanCost.setEstimatedHeapSize((long)(totalRowCount*totalSelectivity*colSizeFactor));\n // Should be the same for each conglomerate\n scanCost.setRemoteCost((long)remoteCost);\n // Base Cost + LookupCost + Projection Cost\n double congAverageWidth = scc.getConglomerateAvgRowWidth();\n double baseCost = openLatency+closeLatency+(totalRowCount*baseTableSelectivity*localLatency*(1+congAverageWidth/100d));\n assert congAverageWidth >= 0 : \"congAverageWidth cannot be negative -> \" + congAverageWidth;\n assert baseCost >= 0 : \"baseCost cannot be negative -> \" + baseCost;\n scanCost.setFromBaseTableRows(filterBaseTableSelectivity * totalRowCount);\n scanCost.setFromBaseTableCost(baseCost);\n double lookupCost;\n if (lookupColumns == null)\n lookupCost = 0.0d;\n else {\n lookupCost = totalRowCount*filterBaseTableSelectivity*(openLatency+closeLatency);\n scanCost.setIndexLookupRows(filterBaseTableSelectivity*totalRowCount);\n scanCost.setIndexLookupCost(lookupCost+baseCost);\n }\n assert lookupCost >= 0 : \"lookupCost cannot be negative -> \" + lookupCost;\n\n double projectionCost;\n if (projectionSelectivity == 1.0d)\n projectionCost = 0.0d;\n else {\n projectionCost = totalRowCount * filterBaseTableSelectivity * localLatency * colSizeFactor*1d/1000d;\n scanCost.setProjectionRows(scanCost.getEstimatedRowCount());\n scanCost.setProjectionCost(lookupCost+baseCost+projectionCost);\n }\n assert projectionCost >= 0 : \"projectionCost cannot be negative -> \" + projectionCost;\n\n double localCost = baseCost+lookupCost+projectionCost;\n assert localCost >= 0 : \"localCost cannot be negative -> \" + localCost;\n scanCost.setLocalCost(localCost);\n scanCost.setNumPartitions(scc.getNumPartitions());\n scanCost.setLocalCostPerPartition((baseCost + lookupCost + projectionCost)/scc.getNumPartitions());\n }", "public static void main(String args[]) {\n\t\tint cost[][] = { { 10, 1, 10, 1 }, { 1, 1, 1, 10 }, { 10, 1, 10, 1 }, { 1, 10, 1, 1 } };\n\n\t\tSystem.out.println(solution(cost));\n\t}", "public void compute()\n {\n // initialize data structures to some preliminary values\n numberOfNodes = -1;\n ports = new int[1];\n graphTable = new int[1][1];\n\n\n // read the configuration file into the data structures numberOfNodes, ports, and graphTable\n FileInputStream fin = null;\n try\n {\n fin = new FileInputStream(configFile);\n Scanner fileReader = new Scanner(fin);\n\n // read first number: the number of nodes\n numberOfNodes = fileReader.nextInt();\n\n\n // this allows us to initiailze the ports array and the graphTable array\n ports = new int[numberOfNodes];\n graphTable = new int[numberOfNodes][numberOfNodes];\n haveReceivedVector = new boolean[numberOfNodes];\n\n for (int i = 0; i < ports.length; i++) {ports[i] = -1;} // initialize the ports array to -1\n\n for (int i = 0; i < graphTable.length; i++) // initialize the graphTable to all -1's\n {\n for (int j = 0; j < graphTable[0].length; j++)\n {\n graphTable[i][j] = 999;\n }\n }\n\n for (int i = 0; i < haveReceivedVector.length; i++) {haveReceivedVector[i] = false;} // initially we have not received any vectors\n\n // read the rest of the file into the appropriate data structures\n while (fileReader.hasNext())\n {\n fileReader.next(); // ignore the node label. i will work with the node ID\n int neighborID = fileReader.nextInt(); // the id of the neighbor\n int c = fileReader.nextInt(); // the cost of the edge\n // the cost from router #routerID to router #neighborID is c. update the graphTable\n graphTable[routerID][neighborID] = c;\n graphTable[neighborID][routerID] = c;\n\n ports[neighborID] = fileReader.nextInt();\n\n }\n\n // fill in the ports and graphTable with own information\n ports[routerID] = routerPort;\n graphTable[routerID][routerID] = 0; // the distance to myself is 0 \n haveReceivedVector[routerID] = true;\n\n\n }\n catch (Exception e){\n System.out.println(\"Exception reading file: \" + e.getMessage());\n System.exit(0); // exit\n }finally{\n try{if (fin != null){fin.close();}}\n catch (IOException ex){\n System.out.println(\"error closing file.\");\n System.exit(0); // exit\n }\n }\n\n try\n {\n udpSocket = new DatagramSocket(routerPort); // initialize socket\n\n routersIP = InetAddress.getByName(ipAddress);\n\n\n timer = new Timer(true); // initialize timer. make thread daemon\n\n // set timer task to send link state vector to neighbouring nodes every neighborUpdateFreq ms\n StateVectorSender svs = new StateVectorSender(this);\n timer.scheduleAtFixedRate(svs, 0, neighborUpdateFreq);\n\n // set timer task to update node's route information every dijkstraFreq ms\n RouteUpdater ru = new RouteUpdater(this);\n timer.scheduleAtFixedRate(ru, 0, dijkstraFreq);\n\n\n // allocate space for receiving a LinkState message\n byte[] messageSpace = new byte[LinkState.MAX_SIZE];\n DatagramPacket messagePacket = new DatagramPacket(messageSpace, messageSpace.length);\n\n while(true)\n {\n // recieve link state message from neighbor\n udpSocket.receive(messagePacket);\n processUpDateDS(messagePacket); // updates data structures according to received vector and forwards it to neighbors according\n // to life time left algorithm\n }\n\n }\n catch (Exception e)\n {\n System.out.println(\"An unexpected error occured. The program will terminate.\");\n System.exit(0);\n } \n\n }", "public static void main(String[] args) {\n int vertices = Integer.parseInt(StdIn.readLine());\n //Storing vertex weights\n double[] vertW = new double[vertices];\n for(int i=0;i<vertices;i++)\n vertW[i] = Double.parseDouble(StdIn.readLine());\n //Reading in new graph, G**\n String[] Gstarstar = StdIn.readAllLines();\n //Making graph\n EdgeWeightedDigraph G = new EdgeWeightedDigraph(Gstarstar);\n //Dijkstra All Pairs\n DijkstraAllPairsSP DAP = new DijkstraAllPairsSP(G);\n //Printing output of paths\n for(int i=0; i<G.V(); i++){\n for(int j=0; j<G.V(); j++){\n if(!DAP.hasPath(i,j))\n StdOut.print(i+\" to \"+j+\"\\t\\tno path\");\n else{\n double newEW;\n double EW;\n Iterable<DirectedEdge> path = DAP.path(i,j);\n double totalWeight = 0;\n String sp = \"\"; //String that's going to form the path\n for(DirectedEdge x : path){\n newEW = x.weight();\n EW = newEW + vertW[x.to()] - vertW[x.from()]; //reverse calibrate\n totalWeight += EW;\n sp += \"\\t\"+x.from()+\"->\"+x.to()+\" \"+String.format(\"%.2f\",EW); //adding to path\n }\n StdOut.print(i+\" to \"+j+\"\\t(\"+String.format(\"%.2f\",totalWeight)+\") \");\n StdOut.print(sp);\n }\n StdOut.println();\n }\n StdOut.println();\n }\n }", "public TTPSolution SH2() {\n \n // get TTP data\n long[][] D = ttp.getDist();\n int[] A = ttp.getAvailability();\n double maxSpeed = ttp.getMaxSpeed();\n double minSpeed = ttp.getMinSpeed();\n long capacity = ttp.getCapacity();\n double C = (maxSpeed - minSpeed) / capacity;\n double R = ttp.getRent();\n int m = ttp.getNbCities(),\n n = ttp.getNbItems();\n TTPSolution s = new TTPSolution(m, n);\n int[] x = s.getTour(),\n z = s.getPickingPlan();\n \n /*\n * the tour\n * generated using greedy algorithm\n */\n x = linkernTour();\n z = zerosPickingPlan();\n Deb.echo(x);\n Deb.echo(z);\n \n /*\n * the picking plan\n * generated so that the TTP objective value is maximized\n */\n ttp.objective(s);\n \n // partial distance from city x_i\n long di;\n \n // partial time with item k collected from city x_i\n double tik;\n \n // item scores\n Double[] score = new Double[n];\n \n // total time with no items collected\n double t_ = s.ft;\n \n // total time with only item k collected\n double tik_;\n \n // fitness value\n double u[] = new double[n];\n \n for (int k=0; k<n; k++) {\n \n int i;\n for (i=0; i<m; i++) {\n if (A[k]==x[i]) break;\n }\n //P.echo2(\"[\"+k+\"]\"+(i+1)+\"~\");\n \n // time to start with\n tik = i==0 ? .0 : s.timeAcc[i-1];\n int iw = ttp.weightOf(k),\n ip = ttp.profitOf(k);\n \n // recalculate velocities from start\n di = 0;\n for (int r=i; r<m; r++) {\n \n int c1 = x[r]-1;\n int c2 = x[(r+1)%m]-1;\n \n di += D[c1][c2];\n tik += D[c1][c2] / (maxSpeed-iw*C);\n }\n \n score[k] = ip - R*tik;\n tik_ = t_ - di + tik;\n u[k] = R*t_ + ttp.profitOf(k) - R*tik_;\n //P.echo(k+\" : \"+u[k]);\n }\n \n Quicksort<Double> qs = new Quicksort<Double>(score);\n qs.sort();\n int[] si = qs.getIndices();\n int wc = 0;\n for (int k=0; k<n; k++) {\n int i = si[k];\n int wi = ttp.weightOf(i);\n // eliminate useless\n if (wi+wc <= capacity && u[i] > 0) {\n z[i] = A[i];\n wc += wi;\n }\n }\n \n ttp.objective(s);\n \n return s;\n }", "private static void test(int xy, int si, int sj, int ei, int ej, int[][] blocked){\n System.out.println(\"\\n\\nTest Case #\"+tCase);tCase++;\n //Reset\n long start_time = System.nanoTime();\n grid = new Cell[xy][xy];\n closed = new boolean[xy][xy];\n open = new PriorityQueue<>((Object o1, Object o2) -> {\n Cell c1 = (Cell)o1;\n Cell c2 = (Cell)o2;\n\n return Integer.compare(c1.finalCost, c2.finalCost);\n });\n //Set start position\n setStartCell(si, sj); //Setting to 0,0 by default\n\n //Set End Location\n setEndCell(ei, ej);\n\n for(int i=0;i<xy;++i){\n for(int j=0;j<xy;++j){\n grid[i][j] = new Cell(i, j);\n grid[i][j].heuristicCost = Math.abs(i-endI)+Math.abs(j-endJ);\n //System.out.print(grid[i][j].heuristicCost+\" \");\n }\n //System.out.println();\n }\n grid[si][sj].finalCost = 0;\n\n //Set blocked cells to null\n for (int bX = 0; bX < blocked.length; bX++) {\n for (int bY = 0; bY < blocked.length; bY++)\n if (blocked[bX][bY] == 1)\n setBlocked(bX, bY);\n }\n\n String[][] maze = new String[xy][xy];\n //Display initial map\n System.out.println(\"Grid: \");\n char block = '▋';\n String open = \"[]\";\n for(int i=0;i<xy;++i){\n for(int j=0;j<xy;++j){\n if(i==si&&j==sj){ System.out.print(\"SO \"); //Source\n maze[i][j] = \"SO \"; }\n else if(i==ei && j==ej){ System.out.print(\"DE \"); //Destination\n maze[i][j] = \"DE \"; }\n else if(grid[i][j]!=null){ System.out.print(open + \" \");\n maze[i][j] = open + \" \"; }\n else{ System.out.print(block + \" \");\n maze[i][j] = block + \" \"; }\n }\n System.out.println();\n }\n System.out.println();\n\n AStar();\n System.out.println(\"\\nScores for cells: \");\n for(int i=0;i<xy;++i){\n for(int j=0;j<xy;++j){\n if(grid[i][j]!=null)System.out.printf(\"%-4d \", grid[i][j].finalCost);\n else System.out.print(block + \" \");\n }\n System.out.println();\n }\n System.out.println();\n\n if(closed[endI][endJ]){\n //Trace back the path\n System.out.println(\"Path: \");\n Cell current = grid[endI][endJ];\n System.out.print(current);\n ArrayList<Cell> path = new ArrayList<>();\n path.add(current);\n while(current.parent!=null){\n System.out.print(\" -> \"+current.parent);\n current = current.parent;\n path.add(current);\n }\n System.out.println(\"\\n\");\n\n Collections.reverse(path);\n\n for (Cell index : path) {\n if (path.contains(index))\n maze[index.i][index.j] = \"- \";\n }\n\n //Display final path\n System.out.println(\"Final Path: \");\n System.out.println(path.toString() + \"\\n\");\n\n for(int i=0;i<xy;++i) {\n for (int j = 0; j < xy; ++j) {\n if(i==si&&j==sj)System.out.print(\"SO \"); //Source\n else if(i==ei && j==ej)System.out.print(\"DE \"); //Destination\n else System.out.print(maze[i][j]);\n }\n System.out.println();\n }\n\n System.out.println();\n }else System.out.println(\"No possible path\");\n\n long end_time = System.nanoTime();\n double difference = (end_time - start_time) / 1e6;\n\n System.out.println(difference + \"ms\\n\");\n\n }", "public static List<Vec2i> solve(int[][] grid, Vec2i start, Vec2i goal, Heuristic h){\n if(h == null){ //if null replace with default heuristic\n h = new Heuristic() {\n @Override\n\n public double eval(Vec2i loc) {\n double dx = (loc.x - goal.x);\n double dy = (loc.y - goal.y);\n return Math.sqrt(dx*dx + dy*dy);\n }\n };\n }\n\n PriorityQueue<GridLocation> edge = new PriorityQueue<GridLocation>(10, AStarGrid::compareGridLocations);\n edge.add(new GridLocation(start,0));\n\n Map<Vec2i, Vec2i> cameFrom = new HashMap<Vec2i, Vec2i>();\n Map<Vec2i, Double> g = new HashMap<Vec2i, Double>(); //distance to node\n g.put(start,0.0);\n Map<Vec2i, Double> f = new HashMap<Vec2i, Double>(); //distance from start to goal through this node\n f.put(start,h.eval(start));\n //f = g + h\n\n while(!edge.isEmpty()){\n\n Vec2i current = edge.poll().loc;\n if(current.x == goal.x && current.y == goal.y){\n return reconstructPath(cameFrom, current);\n }\n\n LinkedList<Vec2i> neighbors = new LinkedList<Vec2i>();\n if(current.x != 0 && grid[current.x - 1][current.y] == 0)\n neighbors.add(new Vec2i(current.x - 1,current.y));\n if(current.x != grid.length-1 && grid[current.x + 1][current.y] == 0)\n neighbors.add(new Vec2i(current.x + 1,current.y));\n if(current.y != 0 && grid[current.x][current.y - 1] == 0)\n neighbors.add(new Vec2i(current.x,current.y - 1));\n if(current.y != grid[0].length-1 && grid[current.x][current.y + 1] == 0)\n neighbors.add(new Vec2i(current.x,current.y + 1));\n\n\n for(Vec2i neighbor: neighbors){\n double score = g.get(current) + 1;\n if(!g.containsKey(neighbor) || score < g.get(neighbor)){\n cameFrom.put(neighbor,current);\n g.put(neighbor, score);\n f.put(neighbor, score + h.eval(neighbor));\n if(!edge.contains(neighbor)){\n edge.add(new GridLocation(neighbor,score + h.eval(neighbor)));\n }\n }\n }\n }\n //No path was found\n return null;\n }", "public void affichageSolution() {\n\t\t//On commence par retirer toutes les traces pré-existantes du labyrinthe\n\t\tfor (int i = 0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Trace) {\n\t\t\t\t\tthis.laby.getLabyrinthe()[i][j] = new Case();\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}\n\n\t\t//On parcourt toutes les cases du labyrinthe. Si on trouve un filon non extrait dont le chemin qui le sépare au mineur est plus petit que shortestPath, on enregistre la longueur du chemin ainsi que les coordonnees de ledit filon\n\t\tint shortestPath = Integer.MAX_VALUE;\n\t\tint[] coordsNearestFilon = {-1,-1};\n\t\tfor (int i=0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j=0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Filon && ((Filon)this.laby.getLabyrinthe()[i][j]).getExtrait() == false) {\n\t\t\t\t\tif (this.laby.solve(j,i) != null) {\n\t\t\t\t\t\tint pathSize = this.laby.solve(j,i).size();\n\t\t\t\t\t\tif (pathSize < shortestPath) {\n\t\t\t\t\t\t\tshortestPath = pathSize;\n\t\t\t\t\t\t\tcoordsNearestFilon[0] = j;\n\t\t\t\t\t\t\tcoordsNearestFilon[1] = i;\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\t//Si il n'y a plus de filon non extrait atteignable, on cherche les coordonnes de la clef\n\t\tif (coordsNearestFilon[0] == -1) {\n\t\t\tcoordsNearestFilon = this.laby.getCoordsClef();\n\t\t\t//Si il n'y a plus de filon non extrait atteignable et que la clef a deja ouvert la porte, on cherche les coordonnes de la sortie\n\t\t\tif (coordsNearestFilon == null)\tcoordsNearestFilon = this.laby.getCoordsSortie();\n\t\t}\n\n\t\t//On cree une pile qui contient des couples de coordonnees qui correspondent a la solution, puis on depile car le dernier element est l'objectif vise\n\t\tStack<Integer[]> solution = this.laby.solve(coordsNearestFilon[0], coordsNearestFilon[1]);\n\t\tsolution.pop();\n\n\t\t//Tant que l'on n'arrive pas au premier element de la pile (cad la case ou se trouve le mineur), on depile tout en gardant l'element depile, qui contient les coordonnees d'une trace que l'on dessine en suivant dans la fenetre\n\t\twhile (solution.size() != 1) {\n\t\t\tInteger[] coordsTmp = solution.pop();\n\t\t\tTrace traceTmp = new Trace();\n\t\t\tthis.laby.getLabyrinthe()[coordsTmp[1]][coordsTmp[0]] = new Trace();\n\t\t\t((JLabel)grille.getComponents()[coordsTmp[1]*this.laby.getLargeur()+coordsTmp[0]]).setIcon(traceTmp.imageCase());\n\t\t}\n\t\tSystem.out.println(\"\\n========================================== SOLUTION =====================================\\n\");\n\t\tthis.affichageLabyrinthe();\n\t}", "public void Main(){\n\t\t\n\t\tfillSFG();\n\t\tboolean[] visited = new boolean[AdjMatrix.length];\n\t\tLinkedList<Integer> pathdump = new LinkedList<Integer>();\n\t\textractForwardPaths(startNode, endNode, startNode, visited, pathdump);\n\t\textractLoops();\n\t\tgetForwardGains();\n\t\tgetLoopGains();\n\t\tprintForwardPaths();\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tprintLoops();\n\t\t\n\t\t\n\t\tcalculateDeltas();\n\t\tcalculateTotalGain();\n\t\tprintDeltasAndTotalGain();\n\t\t\n\t\tfor (int i = 1; i < nonTouching.length; i++) {\n\t\t\tSystem.out.println(\"Level = \"+i);\n\t\t\tfor (int j = 0; j < nonTouching[i].size(); j++) {\n\t\t\t\tLinkedList<Integer> dump = new LinkedList<Integer>();\n\t\t\t\tdump = nonTouching[i].get(j);\n\t\t\t\tfor (int k = 0; k < dump.size(); k++) {\n\t\t\t\t\tSystem.out.print(dump.get(k)+\" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\tSystem.out.println(\"************************************************\");\n\t\t}\n\t\t\n\t\tProgramWindow.getInstance().showResults(forwardPaths,forwardGains,loops,loopGains,deltas,TotalGain,nonTouching);\n\t}", "private void calculateCosts() {\r\n lb_CubicSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_Volume)) + \" €\");\r\n lb_MaterialCostSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_Price)) + \" €\");\r\n lb_CuttingTimeSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingHours)) + \" €\");\r\n lb_CuttingCostSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingPrice)) + \" €\");\r\n lb_TotalCosts.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingPrice) + getColmunSum(tc_Price)) + \" €\");\r\n\r\n ModifyController.getInstance().setProject_constructionmaterialList(Boolean.TRUE);\r\n }", "public void calculateCost()\n\t{\n\t\tLogManager lgmngr = LogManager.getLogManager(); \n\t\tLogger log = lgmngr.getLogger(Logger.GLOBAL_LOGGER_NAME);\n\t\tString s = \"\";\n\t\tint costperfeet = 0;\n\t\tif (this.materialStandard.equals(\"standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1200;\n\t\telse if (this.materialStandard.equals(\"above standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1500;\n\t\telse if(this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1800;\n\t\telse if (this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == true)\n\t\t\tcostperfeet = 2500;\n\t\t\n\t\tint totalCost = costperfeet * this.totalArea;\n\t\t/*s = \"Total Cost of Construction is :- \";\n\t\twriter.printf(\"%s\" + totalCost, s);\n\t\twriter.flush();*/\n\t\tlog.log(Level.INFO, \"Total Cost of Construction is :- \" + totalCost);\n\t}", "public static void main(String[] args) {\n // write your code here\n initialize();\n\n\n Sort(profile.getProfile());\n Integer[][][] mas = new Integer[11][11][1];\n\n R.add(Q.pollFirst());\n\n for (Integer[] e : Q) {\n if (DiskCover(e, R, Rant)) {\n R.add(e);\n // Rtmp.add(Q.pollFirst());\n }\n }\n\n FindMaxAngle(R, 0);\n\n Rg = R;\n //Rtmp-R add Q\n list_r.add(R);\n int j = 0;\n boolean flag = false;\n while (!Q.isEmpty()) {\n\n\n list_r.add(FindMaxPolygonCover(Rg));\n\n }\n\n MakePolygon(list_r);\n\n boolean work = true;\n\n do {\n R.clear();\n Gr.getEdge().clear();\n // algorithmConnectivity.setMarketVertexFirst();\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n\n AlgorithmConnectivity algorithmConnectivity = new AlgorithmConnectivity();\n algorithmConnectivity.initializated(Gr.getVertex().size());\n algorithmConnectivity.setMarketVertexFirst();\n algorithmConnectivity.setMarketVertexSecond(i);\n while (algorithmConnectivity.findSecond() != 100) {\n //int a= iterator.next();\n int index = algorithmConnectivity.findSecond();\n algorithmConnectivity.setMarketVertexThird(index);\n algorithmConnectivity = MakeConnection(index, algorithmConnectivity);\n }\n R.add(algorithmConnectivity.getMarket());\n }\n if (!checkConnectionGraf(R)) {\n //MakeConnection(Gr);\n ArrayList<Integer[]> result = new ArrayList<Integer[]>();\n ArrayList<Integer> ver = new ArrayList<Integer>();\n ArrayList<ArrayList<Integer>> v = new ArrayList<ArrayList<Integer>>();\n for (Integer[] p : R) {\n ArrayList<Integer> res = new ArrayList<Integer>();\n ver.clear();\n for (int i = 0; i < p.length; i++) {\n if (p[i] != 1) {\n ver.add(Gr.getVertex().get(i));\n }\n }\n if (ver.size() != 1) {\n // result.add(AddNewRoute(ver));\n // v.add(ver);\n result.addAll(AddNewRoute(ver));\n }\n }\n int minumum = 1000;\n Integer[] place = new Integer[3];\n for (int i = 0; i < result.size(); i++) {\n Integer[] ma = result.get(i);\n if (ma[2] == null) {\n System.out.print(\"\");\n }\n if ((minumum > ma[2]) && (ma[2]) != 0) {\n minumum = ma[2];\n place = ma;\n }\n }\n if (minumum == 1000) {\n for (Integer[] p : R) {\n ver.clear();\n for (int i = 0; i < p.length - 1; i++) {\n if (p[i] == 1) {\n ver.add(Gr.getVertex().get(i));\n }\n }\n result.addAll(AddNewRoute(ver));\n // result.add(AddNewRoute(ver));\n for (int i = 0; i < result.size(); i++) {\n Integer[] ma = result.get(i);\n if (ma[2] == null) {\n System.out.print(\"\");\n }\n if ((minumum > ma[2]) && (ma[2]) != 0) {\n minumum = ma[2];\n place = ma;\n }\n }\n AddNewVertex(place);\n }\n } else {\n AddNewVertex(place);\n }\n } else {\n work = false;\n }\n\n } while (work);\n\n MobileProfile prof = new MobileProfile();\n prof.initialization(Gr.getVertex().size());\n int sum = 0;\n int[][][] massive = profile.getProfile();\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n // sum=sum+massive;\n }\n\n\n zcd = new ZCD();\n\n zcd.setGraphR(Gr);\n\n Iterator<Edges> it = Gr.getEdgeses().iterator();\n boolean fla = false;\n while (it.hasNext()) {\n Edges d = it.next();\n LinkedList<Integer[]> graph_edges = g.getSort_index();\n\n for (int i = 0; i < graph_edges.size(); i++) {\n Integer[] mass = graph_edges.get(i);\n if (checkLine(g.getCoordinate().get(mass[0]), g.getCoordinate().get(mass[1]), Gr.getCoordinate().get(d.getX()), Gr.getCoordinate().get(d.getY()))) {\n if (!fla) {\n Integer[] wr = new Integer[3];\n wr[0] = d.getX();\n wr[1] = d.getY();\n wr[2] = mass[2];\n fla = true;\n zcd.addWrEdges(wr);\n }\n }\n }\n if (!fla) {\n\n Integer[] wr = new Integer[3];\n wr[0] = d.getX();\n wr[1] = d.getY();\n wr[2] = 2;\n\n zcd.addWrEdges(wr);\n\n }\n fla = false;\n }\n\n Edges e = null;\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n int sumwr = 0;\n HashSet<Edges> item = Gr.getEdgeses();\n Iterator<Edges> iterator = item.iterator();\n for (int k = 0; k < zcd.getWrEdges().size(); k++) {\n\n e = iterator.next();\n if (e.checkEdge(i)) {\n Integer[] m = zcd.getWrEdges().get(k);\n sumwr = sumwr + m[2];\n\n }\n\n }\n wr.add(sumwr);\n\n }\n\n int max = 0;\n int count = 0;\n for (int i = 0; i < wr.size(); i++) {\n if (max < wr.get(i)) {\n max = wr.get(i);\n count = i;\n }\n }\n Integer[] a = new Integer[2];\n a[0] = count;\n a[1] = max;\n zcd.setRoot_vertex(a);\n\n\n int number_vertex = 5;\n //ZTC ztc = new ZTC();\n neig = new int[Gr.getVertex().size()][Gr.getVertex().size()];\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n HashSet<Edges> item = Gr.getEdgeses();\n Iterator<Edges> iterator = item.iterator();\n while (iterator.hasNext()) {\n e = iterator.next();\n if (e.checkEdge(i)) {\n\n neig[i][e.getY()] = 1;\n }\n }\n }\n ztc.setNeigboor(neig);\n ztc.addTVertex(a[0]);\n Integer[] zero = new Integer[3];\n zero[0] = a[0];\n zero[1] = 0;\n zero[2] = 0;\n verLmtest.add(zero);\n vertex_be = new boolean[Gr.getVertex().size()];\n int root_number = 5;\n while (ztc.getTvertex().size() != Gr.getVertex().size()) {\n\n LinkedList<Edges> q = new LinkedList<Edges>();\n\n\n count_tree++;\n\n\n LinkedList<Integer> vertext_t = new LinkedList<Integer>(ztc.getTvertex());\n while (vertext_t.size() != 0) {\n // for(int i=0; i<count_tree;i++){\n\n number_vertex = vertext_t.pollFirst();\n weight_edges.clear();\n if (!vertex_be[number_vertex]) {\n vertex_be[number_vertex] = true;\n } else {\n continue;\n }\n\n // if(i<vertext_t.size())\n\n\n HashSet<Edges> item = Gr.getEdgeses();\n Iterator<Edges> iterator = item.iterator();\n // while (iterator.hasNext()) {\n for (int k = 0; k < item.size(); k++) {\n e = iterator.next();\n\n if (e.checkEdge(number_vertex)) {\n\n weight_edges.add(zcd.getWrEdges().get(k));\n q.add(e);\n }\n\n if (q.size() > 1)\n q = sort(weight_edges, q);\n\n\n while (!q.isEmpty()) {\n e = q.pollFirst();\n Integer[] lm = new Integer[3];\n\n\n lm[0] = e.getY();\n lm[1] = 1;\n lm[2] = 0;\n boolean add_flag = true;\n for (int i = 0; i < verLmtest.size(); i++) {\n Integer[] mess = verLmtest.get(i);\n if (e.getY() == mess[0]) {\n add_flag = false;\n }\n }\n if (add_flag) {\n for (int i = 0; i < verLmtest.size(); i++) {\n Integer[] mess = verLmtest.get(i);\n if (e.getX() == mess[0]) {\n mess[2] = mess[2] + 1;\n /* if (e.getX() == root_number) {\n mess[1] = 1;\n } else {\n mess[1] = mess[1] + 1;\n lm[1]=mess[1];\n\n }*/\n verLmtest.set(i, mess);\n break;\n }\n\n }\n for (int i = 0; i < verLmtest.size(); i++) {\n Integer[] mess = verLmtest.get(i);\n if (e.getX() == mess[0]) {\n lm[1] = mess[1] + 1;\n }\n\n }\n\n verLmtest.add(lm);\n } else {\n continue;\n }\n // }\n if (ztc.getTvertex().size() == 1) {\n edgesesTestHash.add(e);\n int x = e.getX();\n int y = e.getY();\n Edges e1 = new Edges(y, x);\n edgesesTestHash.add(e1);\n\n ztc.addEdges(e);\n ztc.addEdges(e1);\n\n ztc.addTVertex(lm[0]);\n // q.removeFirst();\n\n\n } else {\n // edgesTest.add(e);\n int x = e.getX();\n int y = e.getY();\n Edges e1 = new Edges(y, x);\n // disable.add(e);\n // disable.add(e1);\n\n edgesesTestHash.add(e1);\n edgesesTestHash.add(e);\n\n int[][] ad = getNeighboor();\n\n\n if (checkLegal(e, ad)) {\n ztc.addEdges(e);\n ztc.addEdges(e1);\n\n ztc.addTVertex(lm[0]);\n\n // if(q.size()!=0)\n // q.removeFirst();\n } else {\n // q.removeFirst();\n\n Iterator<Edges> edgesIterator = edgesesTestHash.iterator();\n while (edgesIterator.hasNext()) {\n Edges eo = edgesIterator.next();\n if ((eo.getY() == e.getY()) && (eo.getX() == e.getX())) {\n edgesIterator.remove();\n }\n if ((eo.getY() == e1.getY()) && (eo.getX() == e1.getX())) {\n edgesIterator.remove();\n }\n }\n\n verLmtest.removeLast();\n }\n\n\n }\n\n\n }\n\n\n }\n }\n }\n\n ztc.setEdgesesTree(edgesesTestHash);\n ztc.setGr(Gr);\n ConvertDataToJs convertDataToJs=new ConvertDataToJs();\n try {\n convertDataToJs.save(ztc);\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n }\n\n System.out.print(\"\");\n\n }", "public void compute()\n\t{\n//\t\tROWS = parseInt(calc.rows.value, 10); // size of maze\n//\t\tCOLS = parseInt(calc.cols.value, 10);\n\n//\t\tif (isNaN(ROWS)||(ROWS < 0)||\n//\t\t\t\tisNaN(COLS)||(COLS < 0)) // check input\n//\t\t{\n//\t\t\twindow.alert(\"Invalid input!\");\n//\t\t\treturn;\n//\t\t}\n\n\t\tinit_cells(); // create and display a maze\n\t\tgenerate_maze();\n//\t\topen_window();\n\t\twriteout_maze();\n//\t\tclose_window();\n\t}", "Solver (double aoa_degr, double thickness_pst, double camber_pst) { \n this.getFreeStream(); // thsi grabs globals such as velocity, height, planet\n this.getCirculation(aoa_degr, thickness_pst, camber_pst);\n // solver.compute_foil_geometry(aoa_degr);\n }", "public void layout() {\n final int N = fNodes.length;\n final double k1 = 1.0;\n final double k2 = 100.0 * 100.0;\n\n double xc = 0.0;\n double yc = 0.0;\n for (int i = 0; i < N; i++) {\n NodeBase v = (NodeBase) fNodes[i];\n \n double xv = v.getX();\n double yv = v.getY();\n \n\t\t\tIterator uIter = fGraph.sourceNodeSet(v).iterator();\n\t\t\t\n double sumfx1 = 0.0;\n double sumfy1 = 0.0;\n while (uIter.hasNext() ) {\n NodeBase u = (NodeBase) uIter.next();\n double xu = u.getX();\n double yu = u.getY();\n double dx = xv - xu;\n double dy = yv - yu;\n double d = Math.sqrt(dx * dx + dy * dy);\n d = (d == 0) ? .0001 : d;\n double c = k1 * (d - fEdgeLen) / d;\n sumfx1 += c * dx;\n sumfy1 += c * dy;\n }\n\n uIter = fGraph.iterator();\n double sumfx2 = 0.0;\n double sumfy2 = 0.0;\n while (uIter.hasNext() ) {\n NodeBase u = (NodeBase) uIter.next();\n if (u == v )\n continue;\n// System.out.println(\"electrical u = \" + u.name());\n double xu = u.getX();\n double yu = u.getY();\n double dx = xv - xu;\n double dy = yv - yu;\n double d = dx * dx + dy * dy;\n if (d > 0 ) {\n double c = k2 / (d * Math.sqrt(d));\n sumfx2 += c * dx;\n sumfy2 += c * dy;\n }\n }\n // System.out.println(\"sumfx2 = \" + sumfx2);\n // System.out.println(\"sumfy2 = \" + sumfy2);\n\n // store new positions\n fXn[i] = xv - Math.max(-5, Math.min(5, sumfx1 - sumfx2));\n fYn[i] = yv - Math.max(-5, Math.min(5, sumfy1 - sumfy2));\n\n // for determining the center of the graph\n xc += fXn[i];\n yc += fYn[i];\n }\n\n // offset from center of graph to center of drawing area\n double dx = fWidth / 2 - xc / N;\n double dy = fHeight / 2 - yc / N;\n\n // use only small steps for smooth animation\n dx = Math.max(-5, Math.min(5, dx));\n dy = Math.max(-5, Math.min(5, dy));\n\n // set new positions\n for (int i = 0; i < N; i++) {\n NodeBase v = (NodeBase) fNodes[i];\n // move each node towards center of drawing area and keep\n // it within bounds\n double x = Math.max(fMarginX, Math.min(fWidth - fMarginX, fXn[i] + dx));\n double y = Math.max(fMarginY, Math.min(fHeight - fMarginY, fYn[i] + dy));\n v.setPosition(x, y);\n }\n }", "public static void main(String[] args) {\n\n\t\tString[][] example = {\n //Boston ... Manila\n\t\t{\"-\" ,\"225\",\"575\",\"200\",\"70\" ,\"85\" ,\"340\",\"675\",\"975\"},\n\t\t{\"225\",\"-\" ,\"225\",\"50\" ,\"125\",\"220\",\"120\",\"435\",\"550\"},\n\t\t{\"575\",\"225\",\"-\" ,\"510\",\"650\",\"675\",\"735\",\"225\",\"200\"},\n\t\t{\"200\",\"50\" ,\"510\",\"-\" ,\"-\" ,\"-\" ,\"-\" ,\"-\" ,\"-\" },\n\t\t{\"70\" ,\"125\",\"650\",\"-\" ,\"-\" ,\"-\" ,\"-\" ,\"-\" ,\"-\" },\n\t\t{\"85\" ,\"220\",\"675\",\"-\" ,\"-\" ,\"-\" ,\"-\" ,\"-\" ,\"-\" },\n\t\t{\"340\",\"120\",\"735\",\"-\" ,\"-\" ,\"-\" ,\"-\" ,\"-\" ,\"-\" },\n\t\t{\"675\",\"435\",\"225\",\"-\" ,\"-\" ,\"-\" ,\"-\" ,\"-\" ,\"-\" },\n\t\t{\"975\",\"550\",\"200\",\"-\" ,\"-\" ,\"-\" ,\"-\" ,\"-\" ,\"-\" }};\n\n\t\tint n = example.length; //n x n grid\n\n\t\tNode[] nodes = new Node[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tnodes[i] = new Node(cities[i]);\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (!example[i][j].equals(\"-\")) {\n\t\t\t\t\tint cost = Integer.parseInt(example[i][j]);\n\t\t\t\t\tnodes[i].addEdge(new Edge(nodes[i], nodes[j], cost));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint start = cityIndex(\"Boston\"); //start of our trip\n\t\tint end = cityIndex(\"Beijing\"); //end of our trip\n\t\tSystem.out.println(\"total cost:\");\n\t\tSystem.out.println(dijkstra(nodes[start], nodes[end]));\n\t\tSystem.out.println(\"optimal path taken:\");\n\t\ttracePath(nodes[end]);\n\t}", "public void solveSA() {\r\n initState();\r\n for (int ab = 0; ab < Config.NumberOfMetropolisResets; ab++) {\r\n LogTool.print(\"==================== INACTIVE: START CALC FOR OUTER ROUND \" + ab + \"=========================\",\"notification\");\r\n\r\n if (Config.SAverboselvl>1) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\");\r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n }\r\n setCur_cost(costCURsuperfinal()); //One of four possible costNEX variants\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"CUR COST SUPER FINAL \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n /* [Newstate] with random dwelltimes */\r\n New_state = newstater(); \r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"NEW STATE \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n// newstater();\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"SolveSA: New State before Metropolis: A)\" + New_state[0] + \" B) \" + New_state[1] + \" C) \" + New_state[2],\"notification\");\r\n }\r\n \r\n setNew_cost(costNEXsuperfinal()); //One of four possible costNEX variants\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"NEW COST SUPER FINAL \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"SolveSA: New Cost : \" + New_cost,\"notification\");\r\n }\r\n\r\n /**\r\n * MetropolisLoop\r\n * @param Config.NumberOfMetropolisRounds\r\n */\r\n\r\n for(int x=0;x<Config.NumberOfMetropolisRounds;x++) { \r\n LogTool.print(\"SolveSA Iteration \" + x + \" Curcost \" + Cur_cost + \" Newcost \" + New_cost,\"notification\");\r\n if ((Cur_cost - New_cost)>0) { // ? die Kosten\r\n \r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 1 START\",\"notification\");\r\n }\r\n \r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: (Fall 1) Metropolis NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1) Metropolis CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA Cost delta \" + (Cur_cost - New_cost) + \" \",\"notification\");\r\n //</editor-fold>\r\n }\r\n Cur_state = New_state;\r\n Cur_cost = New_cost;\r\n if (Config.SAverboselvl>1) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: (Fall 1 nach set) Metropolis NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set) Metropolis CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set): NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set): CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n New_state = newstater();\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C1 after generate: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 1 STOP \",\"notification\");\r\n }\r\n } else if (Math.exp(-(New_cost - Cur_cost)/temperature)> RandGenerator.randDouble(0.01, 0.99)) {\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 2 START: Zufallsgenerierter Zustand traegt hoehere Kosten als vorhergehender Zustand. Iteration: \" + x,\"notification\");\r\n }\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 before set: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n Cur_state = New_state;\r\n Cur_cost = New_cost;\r\n \r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 after set: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after set: CurCost : \" + this.getCur_cost(),\"notification\");\r\n //</editor-fold>\r\n }\r\n New_state = newstater();\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 after generate: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 2 STOP: Zufallsgenerierter Zustand traegt hoehere Kosten als vorhergehender Zustand. Iteration: \" + x,\"notification\");\r\n }\r\n } else {\r\n New_state = newstater();\r\n }\r\n temperature = temperature-1;\r\n if (temperature==0) {\r\n break;\r\n }\r\n \r\n setNew_cost(costNEXsuperfinal());\r\n LogTool.print(\"NEW COST SUPER FINAL \",\"notification\");\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n//</editor-fold>\r\n if ((x==58)&(ab==0)) {\r\n LogTool.print(\"Last internal Iteration Checkpoint\",\"notification\");\r\n if ((Cur_cost - New_cost)>0) {\r\n Cur_state = New_state;\r\n Cur_cost = New_cost; \r\n }\r\n }\r\n if ((x>58)&(ab==0)) {\r\n LogTool.print(\"Last internal Iteration Checkpoint\",\"notification\");\r\n }\r\n }\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"Auskommentierter GLowestState Object Class\">\r\n// if (ab==9) {\r\n// double diff=0;\r\n// }\r\n \r\n // Hier wird kontrolliert, ob das minimalergebnis des aktuellen\r\n // Metropolisloops kleiner ist als das bsiher kleinste\r\n \r\n// if (Cur_cost<Global_lowest_cost) {\r\n// this.setGlobal_lowest_cost(Cur_cost);\r\n// GlobalState GLowestState = new GlobalState(this.Cur_state);\r\n// String rGLSOvalue = GLowestState.getGlobal_Lowest_state_string();\r\n// LogTool.print(\"GLS DEDICATED OBJECT STATE OUTPUT -- \" + GLowestState.getGlobal_Lowest_state_string(),\"notification\");\r\n// this.setGlobal_Lowest_state(GLowestState.getDwelltimes());\r\n // LogTool.print(\"READ FROM OBJECT OUTPUT -- \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n// LogTool.print(\"DEBUG: CurCost direct : \" + this.getCur_cost(),\"notification\"); \r\n// LogTool.print(\"Debug: Cur<global CurState get : \" + this.getCur_state_string(),\"notification\");\r\n// LogTool.print(\"Debug: Cur<global GLS get : \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n// this.setGlobal_Lowest_state(this.getCur_state(Cur_state));\r\n// LogTool.print(\"Debug: Cur<global GLS get after set : \" + this.getGlobal_Lowest_state_string(),\"notification\"); \r\n// }\r\n //</editor-fold>\r\n LogTool.print(\"SolveSA: Outer Iteration : \" + ab,\"notification\");\r\n LogTool.print(\"SolveSA: Last Calculated New State/Possible state inner loop (i.e. 99) : \" + this.getNew_state_string(),\"notification\");\r\n// LogTool.print(\"SolveSA: Best Solution : \" + this.getCur_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: GLS after all loops: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: LastNewCost, unchecked : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: CurCost : \" + this.getCur_cost() + \"i.e. lowest State of this round\",\"notification\"); \r\n }\r\n // return GLowestState;\r\n }", "public void printRoute() {\n\t\tString route = new String(\"[ROUTE INFO] - Cost: \");\n\t\tif(cost == 0) {\n\t\t\troute += \" Not Yet Calculated, \";\n\t\t}\n\t\telse {\n\t\t\troute += (\"\" + this.cost + \", \");\n\t\t}\n\t\troute += (\"Route Length: \" + solutionLength + \", Route: \");\n\t\troute += \"(\" + solutionRepresentation.get(0).getX() + \",\" + solutionRepresentation.get(0).getY() + \")\";\n\t\tfor(int i = 1; i < solutionLength; i++) {\n\t\t\troute+= \" -> (\" + solutionRepresentation.get(i).getX() + \",\" + solutionRepresentation.get(i).getY() + \")\";\n\t\t}\n\t\tSystem.out.println(route);\n\t}", "private void makeGUI() {\n\t\tframe = new JFrame(\"Sudoku\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tpane = frame.getContentPane();\n\t\t// Knappar\n\t\tbtnSolve = new JButton(\"Solve\");\n\t\tbtnClear = new JButton(\"Clear\");\n\t\tDimension btnDim = new Dimension(100, 25);\n\t\tbtnSolve.setPreferredSize(btnDim);\n\t\tbtnClear.setPreferredSize(btnDim);\n\t\t// ActionListeners\n\t\tbtnSolve.addActionListener(e -> {\n\t\t\tboolean errorFound = false;\n\t\t\tfor (int r = 0; r < size; r++) {\n\t\t\t\tfor (int c = 0; c < size; c++) {\n\t\t\t\t\tint nbr;\n\t\t\t\t\tString input = grid[r][c].getText();\n\t\t\t\t\tboolean isEmpty = input.equals(\"\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (input.strip().equals(\"0\")) {\n\t\t\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnbr = Integer.parseInt(input);\n\t\t\t\t\t} catch (NumberFormatException err1) {\n\t\t\t\t\t\tnbr = 0;\n\t\t\t\t\t\tif (!isEmpty) {\n\t\t\t\t\t\t\tgrid[r][c].setText(\"\");\n\t\t\t\t\t\t\tshowBadInputMessage();\n\t\t\t\t\t\t\terrorFound = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (nbr == 0) {\n\t\t\t\t\t\t\tb.clearNumber(r, c);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tb.setNumber(r, c, nbr);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IllegalArgumentException err2) {\n\t\t\t\t\t\tnbr = 0;\n\t\t\t\t\t\tgrid[r][c].setText(\"\");\n\t\t\t\t\t\tshowBadInputMessage();\n\t\t\t\t\t\terrorFound = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!errorFound) {\n\t\t\t\tboolean solved = b.solve();\n\t\t\t\tif (!solved) showUnsolvableMessage();\n\t\t\t\telse setMatrixText(b.getMatrix());\n\t\t\t}\n\t\t});\n\t\tbtnClear.addActionListener(e -> {\n\t\t\tb.clear();\n\t\t\tclear();\n\t\t});\n\t\t// Dimensioner\n\t\tint sqDim = (int) Math.sqrt(size);\n\t\t// Ramar\n\t\tsquareBorder = BorderFactory.createLineBorder(Color.BLACK, 2);\n\t\tcellBorder = BorderFactory.createLineBorder(Color.GRAY, 1);\n\t\tgridBorder = BorderFactory.createLineBorder(Color.DARK_GRAY, 2);\n\t\t// Lägg till alla textrutor i matrisen, sätt alla tal till 0\n\t\tfor (int r = 0; r < size; r++) {\n\t\t\tfor (int c = 0; c < size; c++) {\n\t\t\t\tb.getMatrix()[r][c] = 0;\n\t\t\t\tJTextField cell = new JTextField();\n\t\t\t\tcell.setBorder(cellBorder);\n\t\t\t\tcell.setHorizontalAlignment(JTextField.CENTER);\n\t\t\t\tcell.setFont(new Font(\"Verdana\", Font.CENTER_BASELINE, 20));\n\t\t\t\tgrid[r][c] = cell;\n\t\t\t}\n\t\t}\n\t\t//Paneler\n\t\tsquarePanels = new JPanel[sqDim][sqDim];\n\t\tgridPanel = new JPanel();\n\t\tgridPanel.setLayout(new GridLayout(sqDim, sqDim));\n\t\tgridPanel.setBorder(gridBorder);\n\t\t\n\t\tbtnPanel = new JPanel();\n\t\tbtnPanel.setLayout(new BorderLayout());\n\t\tbtnPanel.add(btnSolve,\tBorderLayout.WEST);\n\t\tbtnPanel.add(btnClear,\tBorderLayout.EAST);\n\t\t// Lägg till alla stora rutor i matrisen och rutnätet\n\t\tfor (int r = 0; r < sqDim; r++) {\n\t\t\tfor (int c = 0; c < sqDim; c++) {\n\t\t\t\tJPanel square = new JPanel();\n\t\t\t\tsquare.setLayout(new GridLayout(sqDim, sqDim));\n\t\t\t\tsquare.setBorder(squareBorder);\n\t\t\t\tsquarePanels[r][c] = square;\n\t\t\t\tgridPanel.add(square);\n\t\t\t}\n\t\t}\n\t\t// Lägg till textrutorna i de stora stora rutorna\n\t\tfor (int r = 0; r < size; r++) {\n\t\t\tfor (int c = 0; c < size; c++) {\n\t\t\t\tint currentRow = r / sqDim;\n\t\t\t\tint currentCol = c / sqDim;\n\t\t\t\tsquarePanels[currentRow][currentCol].add(grid[r][c]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tpane.add(gridPanel,\tBorderLayout.CENTER);\n\t\tframe.add(btnPanel,\tBorderLayout.SOUTH);\n\t\tpane.setPreferredSize(new Dimension(400,400));\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t}", "public static void main(String[] args)\n {\t\t\n\t\t\tFastTimer timer = new FastTimer();\n\t\t\n\t\t\n\t\t\tGameGrid loaded_grid = new GameGrid(7,7);\n\t\t\t\tboolean isSuccess = loaded_grid.LoadFromFile(\"test.puzzle\");\n\t\t\tif(isSuccess == true){\n\t\t\t\tSystem.out.print(\"Solution initiale\\n\");\n\t\t\t\tloaded_grid.PrintToCmd();\t\t\t\n\t\t\t}\n\t\t\tList<GameMove> found_moves = loaded_grid.GetAvailableMove(); \n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"\\n\\nInitial possible moves\\n\");\n\t\t\tfor(GameMove current_move :found_moves){\n\t\t\t\tcurrent_move.PrintOutCmd();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tList<GameMove> solution_move = new LinkedList();\n\t\t\tloaded_grid.ResetMonitoring();\n\t\t\t\n\t\t\ttimer.StartTime();\n\t\t\t\tboolean result = loaded_grid.FindSolution(solution_move);\n\t\t\ttimer.StopTime();\n\t\t\t\n\t\t\tSystem.out.println(\"\\n**************************\");\n\t\t\tSystem.out.println(\"File name : \" + loaded_grid.loaded_file_name+\"\\n\");\n\t\t\tif(result == false){\n\t\t\t\tSystem.out.println(\"Pas de solution\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Solution in \" +solution_move.size() +\" moves\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\tTime : \"+timer.LastDelta + \" millsec\");\n\t\t\tSystem.out.println(\"\tNode visited :\"+loaded_grid.node_visited_cpt);\n\t\t\tSystem.out.println(\"\tDept require :\"+loaded_grid.max_dept);\n\t\t\tSystem.out.println(\"\tDept limitation :\"+loaded_grid.dept_limit);\n\t\t\t\n\t\t\tif(solution_move.size() > 0){\n\t\t\t\tSystem.out.println(\"\\nMove from last to first\\n\");\n\t\t\t\tfor(GameMove current_move :solution_move){\n\t\t\t\t\tcurrent_move.PrintOutCmd();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\\n**************************\\n\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.print(\"Final grid\\n\");\n\t\t\tloaded_grid.PrintToCmd();\n }", "public void generateNeighborhood(TSPSolution s){\r\n\t\tint [] rounte = new int[problem.city_num+1];\r\n\t\tfor(int i=0;i<problem.city_num;i++) rounte[i] = s.route[i];\r\n\t\trounte[problem.city_num] = rounte[0];\r\n\t\tint [] pos = new int[problem.city_num];\r\n\t\tproblem.calculatePosition(rounte, pos);\r\n\t\tint pos1 = 0;\r\n\t\tint pos2 = 0;\r\n\t\tfor(int k=0;k<problem.city_num;k++){\r\n\t\t\tint i = k;\r\n\t\t\tpos1 = i;\r\n\t\t\tint curIndex = rounte[i];\r\n\t\t\tint nextIndex = rounte[i+1];\r\n\t\t\tArrayList<Integer> candidate = problem.candidateList.get(curIndex);\r\n\t\t\tIterator<Integer> iter = candidate.iterator();\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tint next = iter.next();\r\n\t\t\t\tpos2 = pos[next];\r\n\t\t\t\tint curIndex1 = rounte[pos2];\r\n\t\t\t\tint nextIndex1 = rounte[pos2+1];\r\n\t\t\t\tif(curIndex == nextIndex1) continue;\r\n\t\t\t\tif(curIndex == curIndex1) continue;\r\n\t\t\t\tif(nextIndex == nextIndex1) continue;\r\n\t\t\t\tif(curIndex1 == nextIndex) continue;\r\n\t\t\t\tint betterTimes = 0;\r\n\t\t\t\tTSPSolution solution = new TSPSolution(problem.city_num, problem.obj_num, -1);\r\n\t\t\t\tfor(int j=0;j<problem.obj_num;j++){\r\n\t\t\t\t\tint gain = problem.disMatrix[j*problem.city_num*problem.city_num+curIndex*problem.city_num+curIndex1] +\r\n\t\t\t\t\t\t\tproblem.disMatrix[j*problem.city_num*problem.city_num+nextIndex*problem.city_num+nextIndex1] - \r\n\t\t\t\t\t\t\t(problem.disMatrix[j*problem.city_num*problem.city_num+curIndex*problem.city_num+nextIndex]+\r\n\t\t\t\t\t\t\tproblem.disMatrix[j*problem.city_num*problem.city_num+curIndex1*problem.city_num+nextIndex1]);\r\n\t\t\t\t\tif(gain<0) betterTimes++;\r\n\t\t\t\t\tsolution.object_val[j] = s.object_val[j] + gain;\r\n\t\t\t\t}\r\n\t\t\t\tif(betterTimes==0) continue;\r\n\t\t\t\tsolution.route = s.route.clone();\r\n\r\n\t\t\t\tif(problem.kdSet.add(solution)){\r\n\t\t\t\t\tproblem.converse(pos1, pos2, solution.route, 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void calculaMatrizCostes() {\n int i, j;\n double xd, yd;\n costes = new int[n][n];\n for (i = 0; i < n; i++) {\n for (j = 0; j < n; j++) {\n xd = vx[i] - vx[j];\n yd = vy[i] - vy[j];\n costes[i][j] = (int) Math.round(Math.sqrt((xd * xd) + (yd * yd)));\n }\n }\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n mNodes = sc.nextInt();\n mEdges = sc.nextInt();\n \n mDistances = new int[mNodes+1][mNodes+1];\n \n for (int i =1; i <= mNodes; i++)\n {\n \n for (int j =1; j <=mNodes;j++)\n {\n mDistances[i][j] = Integer.MAX_VALUE;\n \n }\n }\n \n for (int i =1; i <= mNodes; i++)\n {\n mDistances[i][i] =0;\n }\n \n for (int i = 0 ; i < mEdges; i++)\n {\n int from = sc.nextInt();\n int to = sc.nextInt();\n \n mDistances[from][to] = sc.nextInt();\n \n \n }\n \n \n //FW\n \n for (int k = 1; k <= mNodes; k++)\n {\n \n for (int i = 1; i <= mNodes; i++)\n {\n \n for (int j = 1; j <= mNodes; j++)\n {\n \n if (mDistances[i][k]!= Integer.MAX_VALUE && mDistances[k][j] != Integer.MAX_VALUE )\n {\n if (mDistances[i][j] > mDistances[i][k] + mDistances[k][j])\n {\n \n mDistances[i][j] = mDistances[i][k] + mDistances[k][j];\n }\n \n }\n \n }\n }\n \n }\n \n mQueries = sc.nextInt();\n \n for (int i =0; i < mQueries; i++)\n {\n int dist = mDistances[sc.nextInt()][sc.nextInt()];\n \n if (dist == Integer.MAX_VALUE)\n {\n dist = -1;\n }\n \n System.out.println(dist);\n \n }\n \n \n \n \n \n \n \n \n \n }", "public static void main(String[] args) {\n // if required - start the graphical output using -v parameter\n if (args.length > 0) {\n if (args[0].equals(\"-v\")) {\n visualize = true;\n }\n } else {\n // change this to true if you want to visualize always, disregarding parameters.\n visualize = false;\n }\n // stores references to animation windows\n LinkedList<Visualizator> windows = new LinkedList();\n // if true then create windows with graps.\n if (visualize) {\n createGUI(windows);\n }\n\n // list of results\n LinkedList results = new LinkedList();\n\n // data set name(s) are stored in this list. Typically, the data are expected to be in a \"$PATH/data-set/\" directory, where $PATH is the path to where the Alea directory is.\n // Therefore, this directory should contain both ./Alea and ./data-set directories. Files describing machines should be placed in a file named e.g., \"metacentrum.mwf.machines\".\n // Similarly machine failures (if simulated) should be placed in a file called e.g., \"metacentrum.mwf.failures\".\n // Please read carefully the copyright note when using public workload traces!\n //String data_sets[] = {\"SDSC-SP2.swf\", \"hpc2n.swf\", \"star.swf\", \"thunder.swf\", \"metacentrum.mwf\", \"meta2008.mwf\", \"atlas.swf\",};\n String data_sets[] = {\"metacentrum.mwf\"};\n\n // number of gridlets in data set\n //int total_gridlet[] = {59700, 202876, 96000, 121038, 103656, 187370, 42724,};\n int total_gridlet[] = {6, 6};\n // the weight of the fairness criteria in objective function\n int fairw[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n // set true to use failures\n failures = false;\n // set true to use specific job requirements\n reqs = true;\n // set true to use runtime estimates\n estimates = false;\n\n // set true to refine estimates using job avg. length\n useAvgLength = false;\n // set true to use last job length as a new runtime estimate\n useLastLength = false;\n // set true to use \"on demand\" schedule optimization when early job completions appear\n useEventOpt = false;\n\n // set true to use very imprecise estimates\n useUserPrecision = false;\n // set true to use Feitelson's deterministic f-model to generate runtime estimates\n useDurationPrecision = false;\n // if useDurationPrecision = true, then following number denotes the level of imprecison\n // 100 = 2 x real lenght, 400 = 5 x real length, 900 = 10x, 1900 = 20x, 4900 = 50x\n userPercentage = 4900;\n // the minimal length (in seconds) of gap in schedule since when the \"on demand\" optimization is executed\n gap_length = 10 * 60;\n // the weigh of fairness criterion\n fair_weight = 1;\n\n // use binary heap dat structure to represent schedule (generally faster solution)\n useHeap = true;\n\n\n //defines the name format of output files\n String problem = \"Result\";\n if (!failures && !reqs) {\n problem += \"Basic\";\n }\n if (reqs) {\n problem += \"R-\";\n }\n if (failures) {\n problem += \"F\";\n }\n if (estimates) {\n problem += \"-Estim\";\n } else {\n problem += \"-Exact\";\n }\n if (useAvgLength) {\n problem += \"-AvgL\";\n }\n if (useLastLength) {\n problem += \"-LastL\";\n }\n if (useEventOpt) {\n problem += \"-EventOpt\";\n }\n if (useUserPrecision) {\n problem += \"-UserPrec\" + userPercentage;\n }\n if (useDurationPrecision) {\n problem += \"-DurPrec\" + userPercentage;\n }\n\n // data sets are outside the project folder (i.e. in ../data-set/)\n data = true;\n // multiply the number of iterations of optimization techniques\n multiplicator = 1;\n // used to influence the frequency of job arrivals (mwf files only)\n double multiplier = 1.0;\n\n // used only when executed on a real cluster (do not change)\n path = \"estim100/\";\n meta = false;\n if (meta) {\n String date = \"-\" + new Date().toString();\n date = date.replace(\" \", \"_\");\n date = date.replace(\"CET_\", \"\");\n date = date.replace(\":\", \"-\");\n System.out.println(date);\n problem += date;\n }\n\n String user_dir = \"\";\n if (ExperimentSetup.meta) {\n user_dir = \"/scratch/xklusac/\" + path;\n } else {\n user_dir = System.getProperty(\"user.dir\");\n }\n try {\n Output out = new Output();\n out.deleteResults(user_dir + \"/jobs(\" + problem + \"\" + ExperimentSetup.algID + \").csv\");\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n // creates Result Collector\n ResultCollector result_collector = new ResultCollector(results, problem);\n\n\n // this cycle selects data set from data_sets[] list\n for (int set = 0; set <= 0; set++) {\n String prob = problem;\n fair_weight = fairw[set];\n if (useUserPrecision) {\n prob += \"-UserPrec\" + userPercentage;\n }\n max_estim = 0;\n result_collector.generateHeader(data_sets[set] + \"_\" + prob);\n prevAlgID = -1;\n\n // selects algorithm\n // write down the IDs of algorithm that you want to use (FCFS = 0, EDF = 1, EASY = 2, CONS = 4, PBS PRO = 5, BestGap = 10, BestGap+RandomSearch = 11, ...)\n int algorithms[] = {2};\n\n // select which algorithms from the algorithms[] list will be used.\n for (int sel_alg = 0; sel_alg <= 0; sel_alg++) {\n\n // reset values from previous iterations\n use_compresion = false;\n opt_alg = null;\n fix_alg = null;\n\n // get proper algorithm\n int alg = algorithms[sel_alg];\n int experiment_count = 1;\n name = data_sets[set];\n algID = alg;\n if (sel_alg > 0) {\n prevAlgID = algorithms[sel_alg - 1];\n }\n\n // used for output description\n String suff = \"\";\n // initialize the simulation - create the scheduler\n Scheduler scheduler = null;\n String scheduler_name = \"Alea_3.0_scheduler\";\n try {\n Calendar calendar = Calendar.getInstance();\n boolean trace_flag = false; // true means tracing GridSim events\n String[] exclude_from_file = {\"\"};\n String[] exclude_from_processing = {\"\"};\n String report_name = null;\n GridSim.init(entities, calendar, trace_flag, exclude_from_file, exclude_from_processing, report_name);\n scheduler = new Scheduler(scheduler_name, baudRate, entities, results, alg, data_sets[set], total_gridlet[set], suff, windows, result_collector, sel_alg);\n } catch (Exception ex) {\n Logger.getLogger(ExperimentSetup.class.getName()).log(Level.SEVERE, null, ex);\n }\n // this will set up the proper algorithm according to the algorithms[] list\n if (alg == 0) {\n policy = new FCFS(scheduler);\n suff = \"FCFS\";\n }\n if (alg == 1) {\n policy = new EDF(scheduler);\n suff = \"EDF\";\n }\n if (alg == 2) {\n policy = new EASY_Backfilling(scheduler);\n // fixed version of EASY Backfilling\n suff = \"EASY\";\n }\n if (alg == 4) {\n policy = new CONS(scheduler);\n use_compresion = true;\n suff = \"CONS+compression\";\n }\n // do not use PBS-PRO on other than \"metacentrum.mwf\" data - not enough information is available.\n if (alg == 5) {\n policy = new PBS_PRO(scheduler);\n suff = \"PBS-PRO\";\n }\n\n if (alg == 10) {\n policy = new BestGap(scheduler);\n suff = \"BestGap\";\n }\n if (alg == 11) {\n suff = \"BestGap+RandSearch(\" + multiplicator + \")\";\n policy = new BestGap(scheduler);\n opt_alg = new RandomSearch();\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n\n if (alg == 19) {\n suff = \"CONS+LS(\" + multiplicator + \")\";\n policy = new CONS(scheduler);\n opt_alg = new GapSearch();\n\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n if (alg == 20) {\n suff = \"CONS+RandSearch(\" + multiplicator + \")\";\n policy = new CONS(scheduler);\n opt_alg = new RandomSearch();\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n if (alg == 21) {\n suff = \"CONS-no-compress\";\n policy = new CONS(scheduler);\n if (useEventOpt) {\n fix_alg = new GapSearch();\n // instead of compression, use LS-based optimization on early job completion\n suff += \"-EventOptLS\";\n }\n }\n\n System.out.println(\"Now scheduling \" + total_gridlet[set] + \" jobs by: \" + suff + \", using \" + data_sets[set] + \" data set.\");\n\n suff += \"@\" + data_sets[set];\n\n // this cycle may be used when some modifications of one data set are required in multiple runs of Alea 3.0 over same data-set.\n for (int pass_count = 1; pass_count <= experiment_count; pass_count++) {\n\n try {\n // creates entities\n String job_loader_name = data_sets[set] + \"_JobLoader\";\n String failure_loader_name = data_sets[set] + \"_FailureLoader\";\n\n // creates all grid resources\n MachineLoader m_loader = new MachineLoader(10000, 3.0, data_sets[set]);\n rnd_seed = sel_alg;\n\n // creates 1 scheduler\n\n JobLoader job_loader = new JobLoader(job_loader_name, baudRate, total_gridlet[set], data_sets[set], maxPE, minPErating, maxPErating,\n multiplier, pass_count, m_loader.total_CPUs, estimates);\n if (failures) {\n FailureLoaderNew failure = new FailureLoaderNew(failure_loader_name, baudRate, data_sets[set], clusterNames, machineNames, 0);\n }\n // start the simulation\n System.out.println(\"Starting the Alea 3.0\");\n GridSim.startGridSimulation();\n } catch (Exception e) {\n System.out.println(\"Unwanted errors happened!\");\n System.out.println(e.getMessage());\n e.printStackTrace();\n System.out.println(\"Usage: java Test [time | space] [1-8]\");\n }\n\n System.out.println(\"=============== END OF TEST \" + pass_count + \" ====================\");\n // reset inner variables of the simulator\n Scheduler.load = 0.0;\n Scheduler.classic_load = 0.0;\n Scheduler.max_load = 0.0;\n Scheduler.classic_activePEs = 0.0;\n Scheduler.classic_availPEs = 0.0;\n Scheduler.activePEs = 0.0;\n Scheduler.availPEs = 0.0;\n Scheduler.requestedPEs = 0.0;\n Scheduler.last_event = 0.0;\n Scheduler.start_event = -10.0;\n Scheduler.runtime = 0.0;\n\n // reset internal SimJava variables to start new experiment with different job/gridlet setup\n Sim_system.setInComplete(true);\n // store results\n result_collector.generateResults(suff, experiment_count);\n result_collector.reset();\n results.clear();\n System.out.println(\"Max. estim has been used = \" + max_estim);\n System.gc();\n }\n }\n }\n // end of the whole simulation\n }", "private final void constructGraph() {\n losScanner = new LineOfSightScannerDouble(graph);\n queue = new int[11];\n\n queueSize = 0;\n\n // STEP 1: Construct SVG (Strict Visibility Graph)\n \n // Initialise SVG Vertices\n xPositions = new int[11];\n yPositions = new int[11];\n nNodes = 0;\n addNodes();\n \n // Now xPositions and yPositions should be correctly initialised.\n // We then initialise the rest of the node data.\n originalSize = nNodes;\n maxSize = nNodes + 2;\n xPositions = Arrays.copyOf(xPositions, maxSize);\n yPositions = Arrays.copyOf(yPositions, maxSize);\n hasEdgeToGoal = new boolean[maxSize];\n nOutgoingEdgess = new int[maxSize];\n outgoingEdgess = new int[maxSize][];\n outgoingEdgeIndexess = new int[maxSize][];\n outgoingEdgeOppositeIndexess = new int[maxSize][];\n outgoingEdgeIsMarkeds = new boolean[maxSize][];\n for (int i=0;i<maxSize;++i) {\n nOutgoingEdgess[i] = 0;\n outgoingEdgess[i] = new int[11];\n outgoingEdgeIndexess[i] = new int[11];\n outgoingEdgeOppositeIndexess[i] = new int[11];\n outgoingEdgeIsMarkeds[i] = new boolean[11];\n }\n\n // Initialise SVG Edges + edgeWeights\n edgeWeights = new float[11];\n nEdges = 0;\n addAllEdges();\n\n \n // Now all the edges, indexes and weights should be correctly initialise.\n // Now we initialise the rest of the edge data.\n originalNEdges = nEdges;\n int maxPossibleNEdges = nEdges + nNodes*2;\n edgeWeights = Arrays.copyOf(edgeWeights, maxPossibleNEdges);\n edgeLevels = new int[maxPossibleNEdges];\n Arrays.fill(edgeLevels, LEVEL_W);\n isMarked = new boolean[maxPossibleNEdges];\n //Arrays.fill(isMarked, false); // default initialises to false anyway.\n \n \n // Reserve space in level w edge and marked edge arrays.\n nLevelWNeighbourss = new int[maxSize];\n levelWEdgeOutgoingIndexess = new int[maxSize][];\n nMarkedEdgess = new int[maxSize];\n outgoingMarkedEdgeIndexess = new int[maxSize][];\n for (int i=0;i<nNodes;++i) {\n levelWEdgeOutgoingIndexess[i] = new int[nOutgoingEdgess[i]];\n outgoingMarkedEdgeIndexess[i] = new int[nOutgoingEdgess[i]];\n }\n for (int i=nNodes;i<maxSize;++i) {\n levelWEdgeOutgoingIndexess[i] = new int[11];\n outgoingMarkedEdgeIndexess[i] = new int[11];\n }\n\n \n // STEP 2: Label edge levels in SVG.\n computeAllEdgeLevelsFast();\n addLevelWEdgesToLevelWEdgesArray();\n\n nSkipEdgess = new int[maxSize];\n outgoingSkipEdgess = new int[maxSize][];\n outgoingSkipEdgeNextNodess = new int[maxSize][];\n outgoingSkipEdgeNextNodeEdgeIndexess = new int[maxSize][];\n outgoingSkipEdgeWeightss = new float[maxSize][]; \n\n // STEP 3: Initialise the skip-edges & Group together Level-W edges using isMarkedIndex.\n setupSkipEdges();\n \n pruneParallelSkipEdges();\n }", "public VariableUnit solve() {\n LinkedList<VariableUnit> processor = new LinkedList<VariableUnit>();\n\n VariableUnit vu1 = new VariableUnit(250.0, 'x');\n VariableUnit vu2 = new VariableUnit('+');\n VariableUnit vu3 = new VariableUnit(250.0, 'x');\n VariableUnit vu4 = new VariableUnit(501.0, 'x');\n VariableUnit vu5 = new VariableUnit('y');\n VariableUnit vu6 = new VariableUnit('-');\n alpha_arr.get(('x' - 'a')).addLast(vu1);\n alpha_arr.get(('x' - 'a')).addLast(vu2);\n alpha_arr.get(('x' - 'a')).addLast(vu3);\n op_order.add(vu1); op_order.add(vu2); op_order.add(vu3); op_order.add(vu6);\n op_order.add(vu4); op_order.add(vu6); op_order.add(vu5);\n assignValue(2.0, 'x');\n \n System.out.print(vu1); System.out.print(vu2); System.out.print(vu3);\n System.out.print(vu6); System.out.print(vu4); System.out.print(vu6);\n System.out.print(vu5);\n System.out.println();\n System.out.println(\"------------------------------\");\n \n VariableUnit temp, temp1;\n for (int i = 0; i < op_order.size(); i++) {\n \ttemp = op_order.pollFirst();\n \t\n \t\tswitch (temp.getVariable()) {\n \tcase '+':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().add(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tcase '-':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().subtract(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tdefault:\n \t\tprocessor.push(temp);\n \t\t}\n }\n\n /*\n * System.out.println(\"This equation is currently unsolvable.\");\n \tSystem.out.println(\"Try assigning values to some of the variables.\");\n */\n while (!processor.isEmpty()) {\n \top_order.addFirst(processor.pop());\n }\n \n ListIterator<VariableUnit> iter = op_order.listIterator();\n \n while ( iter.hasNext() ) {\n \tVariableUnit iter_temp = iter.next();\n \t//System.out.print(iter_temp.hasValue());\n \tif (iter_temp.hasValue()) {\n \t\tSystem.out.print( Double.toString(iter_temp.subValue()) );\n \t}\n \telse {\n \t\tSystem.out.print(iter_temp);\n \t}\n };\n System.out.println();\n \n return new VariableUnit(Double.NaN, ' ');\n }", "@Test\n public void test1() {\n System.out.println(\"A* Test i1\"); \n \n Solver solver = new Solver(new TileWorld(\"i1.png\"), SearchStrategy.A_STAR);\n AlgorithmResults expResult = new AlgorithmResults(580, 967);\n AlgorithmResults result = solver.solve();\n \n print(result, expResult);\n \n assertEquals(\"BestPathCost does not match!\", expResult.getBestPathCost(), result.getBestPathCost());\n }", "private static void buildTunnels()\n {\n //Initialize necessary member variables\n totalCost = 0;\n connectedHills = 1;\n \n //Create a disjoint set for all of the hills on the current campus\n h = scan.nextInt();\n campus = new DisjointSet(h);\n \n //Read how many tunnels can be built\n t = scan.nextInt();\n \n //Create an array for all the possible tunnels\n edges = new edge[t];\n \n //Loop through all of the possible tunnels\n for (tunnel = 0; tunnel < t; tunnel++)\n {\n //Save all information for the current possible tunnel\n edges[tunnel] = new edge();\n }\n \n //Sort the array of tunnels by their costs\n Arrays.sort(edges);\n \n //Loop through all the possible tunnels again\n for (tunnel = 0; tunnel < t; tunnel++)\n {\n //Try to connect the hills with the current tunnel and check if it was successful\n if (campus.union(edges[tunnel].x - 1, edges[tunnel].y - 1))\n {\n //Add the cost to build that tunnel to the total cost\n totalCost += edges[tunnel].d;\n \n //Incrememnt the amount of total hills connected\n connectedHills++;\n }\n \n //Check if the tunnels have connected all of the hills\n if (connectedHills == h)\n {\n //Stop trying to build tunnels\n return;\n }\n }\n }", "public static void main(String[] args) throws Exception\r\n {\n if (args.length != 5) {\r\n System.out.println(\"Required arguments: NETWORK_SCHEME ROUTING_SCHEME TOPOLOGY_FILE WORKLOAD_FILE PACKET_RATE\");\r\n return;\r\n }\r\n Request currRequest;\r\n int successfulPackets = 0;\r\n int blockedPackets = 0;\r\n int totPackets = 0;\r\n \r\n // Initialise Network topology and workload based on input files\r\n network_topology = new Network(args[TOPOLOGY_FILE]);\r\n workload = new Workload(args[WORKLOAD_FILE], Integer.parseInt(args[PACKET_RATE]), args[NETWORKING_SCHEME]);\r\n numHops = 0;\r\n cumPropagationDelay = 0;\r\n \r\n // Initialise the Dijkstra's processor and set the routing scheme\r\n router = new RoutingProcessor(network_topology);\r\n router.setMethod(args[ROUTING_SCHEME]);\r\n \r\n // Go through the workload and process each request\r\n while(!workload.isEmpty())\r\n {\r\n // Pop off the top of the list\r\n currRequest = workload.remove();\r\n totPackets+=currRequest.packets;\r\n \r\n\r\n currRequest.path = router.computeBestPath(currRequest.source, currRequest.dest);\r\n\r\n\r\n if(network_topology.createCircuit(currRequest) == 0)\r\n {\r\n // Sum up the number of hops and propagation delay on the path\r\n numHops += (network_topology.numHops(currRequest))*currRequest.packets;\r\n cumPropagationDelay += network_topology.calculateCumPropDelay(currRequest) * currRequest.packets;\r\n successfulPackets+=currRequest.packets;\r\n //System.out.println(\"=======success!=============\");\r\n } else {\r\n blockedPackets+=currRequest.packets;\r\n //System.out.println(\"=======blocked=============\");\r\n }\r\n \r\n }\r\n \r\n\r\n // Print out all analytics\r\n int totVirtualCircuitRequests = workload.vcRequestCount;\r\n double percentageSuccessPackets = (double) (((double) successfulPackets/(double) totPackets) * 100.0);\r\n double perecentageBlockedPackets = (double) (((double) blockedPackets/ (double) totPackets) * 100.0);\r\n double averageNumHops = (double) numHops/ (double) successfulPackets;\r\n double averageCumPropDelay = (double) cumPropagationDelay/ (double) successfulPackets;\r\n \r\n// System.out.println(\"-----------\");\r\n// System.out.println(Arrays.toString(args));\r\n System.out.println(\"total number of virtual circuit requests: \" + totVirtualCircuitRequests);\r\n System.out.println(\"total number of packets: \" + totPackets);\r\n System.out.println(\"number of successfully routed packets: \" + successfulPackets);\r\n System.out.format(\"percentage of successfully routed packets: %.2f\\n\", percentageSuccessPackets);\r\n System.out.println(\"number of blocked packets: \" + blockedPackets);\r\n System.out.format(\"percentage of blocked packets: %.2f\\n\", perecentageBlockedPackets);\r\n System.out.format(\"average number of hops per circuit: %.2f\\n\" , averageNumHops);\r\n System.out.format(\"average cumulative propagation delay per circuit: %.2f\\n\" , averageCumPropDelay);\r\n }", "public void generateTXT(String filename, Graph graph, ArrayList<Heuristic> hList){\r\n FileWriter fstream;\r\n try {\r\n fstream = new FileWriter(\"fileOutputs/\".concat(filename));\r\n BufferedWriter file = new BufferedWriter(fstream);\r\n ArrayList<String> actNodes = new ArrayList<String>();\r\n ArrayList<String> allNodes = new ArrayList<String>();\r\n String iniNode;\r\n String dashed = \"------------------------------------------------------\";\r\n float averageTime;\r\n float averageNVisited;\r\n float actTime;\r\n float maxTime;\r\n float finAverageTime = 0;\r\n float finAverageNVisited = 0;\r\n float finMaxTime = 0;\r\n ArrayList<InfoPath> maxNodePath = null;\r\n ArrayList<ArrayList<Float>> dijList = null;\r\n ArrayList<ArrayList<Float>> nodijList = null;\r\n int iter;\r\n int finIter = 0;\r\n int maxTransfers = 20;\r\n int maxLines = 20;\r\n int maxPathVisited = 0;\r\n float maxCost = 0;\r\n boolean dijkstra = false;\r\n BitSet b = new BitSet(3);\r\n //Set of all transport combination.\r\n //boolean[][] init = new boolean[][]{{false,false,true},{false,true,false},{false,true,true},{true,false,false},{true,false,true},{true,true,false},{true,true,true}};\r\n //int[][] maxTraLin = new int[][]{{2,0},{4,0},{0,1},{0,3},{0,5},{2,2},{3,5}};\r\n boolean[][] init = new boolean[][] {{true, true, true}};\r\n int[][]maxTraLin = new int[][] {{5,5}, {20,20},{40, 40},{80, 80}};\r\n b.clear();\r\n for (Heuristic h : hList){\r\n for(int ii = 0; ii< maxTraLin.length; ii++){\r\n maxTransfers = maxTraLin[ii][0];\r\n maxLines = maxTraLin[ii][1];\r\n file.write(\"Heuristic usage: \");\r\n file.write(String.valueOf(h.getClass().getName()));\r\n if (h.getClass().getName().equals(\"algorithm.HeuristicD\")){\r\n dijkstra = true;\r\n dijList = new ArrayList<ArrayList<Float>>();\r\n for(int i = 0; i < graph.getGraphSize(); i++) {\r\n dijList.add(new ArrayList<Float>());\r\n }\r\n }\r\n else {\r\n nodijList = new ArrayList<ArrayList<Float>>();\r\n for(int i = 0; i < graph.getGraphSize(); i++) {\r\n nodijList.add(new ArrayList<Float>());\r\n }\r\n }\r\n file.newLine();\r\n file.write(dashed);\r\n file.newLine();\r\n for(int k = 0; k < init.length; k++){\r\n b.set(0,init[k][0]);\r\n b.set(1,init[k][1]);\r\n b.set(2,init[k][2]);\r\n averageTime = 0;\r\n averageNVisited = 0;\r\n actTime = 0;\r\n maxTime = 0;\r\n iter = 0;\r\n for (int i = 0; i < graph.getGraphSize(); i++){\r\n actNodes.add(\"N\".concat(String.valueOf(i+1)));\r\n }\r\n System.out.println(\"Graph size :\" + graph.getGraphSize());\r\n int aux = graph.getGraphSize() - 1;\r\n for (int i = 0; i < graph.getGraphSize(); i++){\r\n if(actNodes.size() > 0){\r\n iniNode = actNodes.get(0);\r\n actNodes.remove(0);\r\n for (int j = 0; j < actNodes.size(); j++){\r\n astar = new AStar(graph,graph.getNodebyAlias(iniNode), graph.getNodebyAlias(actNodes.get(j)), h, maxTransfers, maxLines);\r\n time = new Time();\r\n time.setScale(\"millisecond\");\r\n nodes = astar.getPath(b);\r\n if (dijkstra && nodes.size()>=2){\r\n dijList.get(i).add(nodes.get(nodes.size()-2).getCost());\r\n }\r\n if(!dijkstra && nodes.size()>=2){\r\n System.out.println(\"Iter num: \" + (i*59+j));\r\n float eff = (dijList.get(i).get(j)/nodes.get(nodes.size()-2).getCost())*100;\r\n System.out.println(\"D cost: \" + dijList.get(i).get(j) + \" ND cost: \" + nodes.get(nodes.size()-2).getCost() + \" %Eff: \" + eff);\r\n nodijList.get(i).add(eff);\r\n }\r\n actTime = time.elapsedTime();\r\n if (maxTime < actTime){\r\n maxTime = actTime;\r\n }\r\n if (finMaxTime < maxTime){\r\n finMaxTime = maxTime;\r\n maxNodePath = nodes;\r\n maxPathVisited = astar.getVisitedNodes();\r\n if (!nodes.isEmpty())\r\n maxCost = nodes.get(nodes.size() - 2).getCost();\r\n }\r\n averageTime += actTime;\r\n averageNVisited += astar.getVisitedNodes();\r\n iter++;\r\n }\r\n }\r\n }\r\n finAverageTime += averageTime/iter;\r\n finAverageNVisited += averageNVisited/iter;\r\n finIter++;\r\n }\r\n file.write(\"Average calculate path time: \" + String.valueOf(finAverageTime/finIter));\r\n file.write(\" average num nodes visited: \" + String.valueOf((int) finAverageNVisited/finIter));\r\n file.newLine();\r\n }\r\n if (dijkstra) {\r\n file.write(\"Dijkstra heuristic has 100% effectivity\");\r\n }\r\n else{\r\n int averageCost = 0;\r\n int counter = 0;\r\n for(ArrayList<Float> a : nodijList) {\r\n for (Float cost : a){\r\n averageCost += cost;\r\n counter++;\r\n }\r\n }\r\n file.write(\"This heuristic has an average of: \" + averageCost/counter + \"% effectivity\");\r\n }\r\n file.newLine();\r\n file.write(\"Max calculate path: \" + String.valueOf(finMaxTime));\r\n file.write(\" num nodes visited: \" + String.valueOf(maxPathVisited));\r\n file.newLine();\r\n file.write(\"Path of max details\");\r\n file.newLine();\r\n file.write(\"\\t\" + \"Node start: \" + maxNodePath.get(0).getSNode().getAlias());\r\n file.newLine();\r\n file.write(\"\\t\" + \"Node end: \" + maxNodePath.get(maxNodePath.size()-1).getSNode().getAlias());\r\n file.newLine();\r\n for (int i = 0; i < maxNodePath.size()-1; i++){\r\n InfoPath ip = maxNodePath.get(i);\r\n file.write(\"\\t\" + ip.getSNode().getName()+ \" (\"+ip.getSNode().getAlias() + \")\" + \" to \" + maxNodePath.get(i+1).getSNode().getName()+ \" (\" + maxNodePath.get(i+1).getSNode().getAlias()+ \")\");\r\n file.newLine();\r\n }\r\n file.write(\"\\tTotal cost: \" + maxCost);\r\n file.newLine();\r\n file.newLine();\r\n if (!dijkstra)\r\n nodijList.clear();\r\n else\r\n dijkstra = false;\r\n }\r\n file.close();\r\n }catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public static void main(String[] args) {\n Model model = new Model();\n int[] a;\n a = new int[] {0, 0, 5, 9, 0, 0, 0, 7, 6};\n model.addRow(a);\n a = new int[] {0, 4, 0, 3, 5, 0, 0, 2, 0};\n model.addRow(a);\n a = new int[] {0, 0, 8, 0, 0, 0, 0, 0, 0};\n model.addRow(a);\n a = new int[] {4, 0, 0, 7, 2, 0, 0, 0, 0};\n model.addRow(a);\n a = new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0};\n model.addRow(a);\n a = new int[] {0, 0, 0, 0, 8, 9, 0, 0, 4};\n model.addRow(a);\n a = new int[] {0, 0, 0, 0, 0, 0, 8, 0, 0};\n model.addRow(a);\n a = new int[] {0, 8, 0, 0, 1, 3, 0, 9, 0};\n model.addRow(a);\n a = new int[] {6, 3, 0, 0, 0, 2, 1, 0, 0};\n model.addRow(a);\n long time = System.currentTimeMillis();\n model.backtrack();\n time = System.currentTimeMillis() - time;\n System.out.println(\"\\nThis is the possible configuration:\");\n model.printBoard(model.winConfig);\n System.out.println(\"took \" + time * Math.pow(10, -3) + \" seconds\");\n }", "public void actionPerformed(ActionEvent event) {\r\n Object source = event.getSource();\r\n String tmpStr;\r\n int i, j;\r\n int VOIindex = -1;\r\n int nVOIs = 0;\r\n double minTx, maxTx, minTy, maxTy, minRz, maxRz, step;\r\n int boxIndex = 0;\r\n int opt = 0;\r\n int costFunc = 0;\r\n\r\n if (source == OKButton) {\r\n\r\n if (image.getNDims() != 3) {\r\n MipavUtil.displayError(\"This algorithm only works for 2.5D kidney datasets.\");\r\n\r\n return;\r\n }\r\n\r\n // get input from scalePanel\r\n tmpStr = textGaussX.getText();\r\n\r\n if (testParameter(tmpStr, 0.5, 5.0)) {\r\n scaleX = Float.valueOf(tmpStr).floatValue();\r\n } else {\r\n textGaussX.requestFocus();\r\n textGaussX.selectAll();\r\n\r\n return;\r\n }\r\n\r\n tmpStr = textGaussY.getText();\r\n\r\n if (testParameter(tmpStr, 0.5, 5.0)) {\r\n scaleY = Float.valueOf(tmpStr).floatValue();\r\n } else {\r\n textGaussY.requestFocus();\r\n textGaussY.selectAll();\r\n\r\n return;\r\n }\r\n\r\n int[] destExtents = new int[3];\r\n destExtents[0] = image.getExtents()[0];\r\n destExtents[1] = image.getExtents()[1];\r\n destExtents[2] = image.getExtents()[2];\r\n\r\n float[] sigmas = new float[2];\r\n sigmas[0] = scaleX;\r\n sigmas[1] = scaleY;\r\n setVisible(false); // Hide dialog\r\n\r\n // get input from optionPanel\r\n boxIndex = comboBoxOpt.getSelectedIndex();\r\n\r\n if (boxIndex == 0) {\r\n opt = AlgorithmRegVOILandmark.EXHAUSTIVEOPT;\r\n } else if (boxIndex == 1) {\r\n opt = AlgorithmRegVOILandmark.SIMPLEXOPT;\r\n }\r\n\r\n //if (minDiff.isSelected()) {\r\n // costFunc = AlgorithmRegVOILandmark.MINDIFF;\r\n //} else {\r\n // costFunc = AlgorithmRegVOILandmark.MAXSUM;\r\n //}\r\n\r\n tmpStr = textStep.getText();\r\n\r\n if (testParameter(tmpStr, -5, 5)) {\r\n step = Double.valueOf(tmpStr).doubleValue();\r\n } else {\r\n textStep.requestFocus();\r\n textStep.selectAll();\r\n\r\n return;\r\n }\r\n\r\n // get input from RangePanel\r\n tmpStr = textminTx.getText();\r\n\r\n if (testParameter(tmpStr, -2048, 2048)) {\r\n minTx = Double.valueOf(tmpStr).doubleValue();\r\n } else {\r\n textminTx.requestFocus();\r\n textminTx.selectAll();\r\n\r\n return;\r\n }\r\n\r\n tmpStr = textmaxTx.getText();\r\n\r\n if (testParameter(tmpStr, -2048, 2048)) {\r\n maxTx = Double.valueOf(tmpStr).doubleValue();\r\n } else {\r\n textmaxTx.requestFocus();\r\n textmaxTx.selectAll();\r\n\r\n return;\r\n }\r\n\r\n tmpStr = textminTy.getText();\r\n\r\n if (testParameter(tmpStr, -2048, 2048)) {\r\n minTy = Double.valueOf(tmpStr).doubleValue();\r\n } else {\r\n textminTy.requestFocus();\r\n textminTy.selectAll();\r\n\r\n return;\r\n }\r\n\r\n tmpStr = textmaxTy.getText();\r\n\r\n if (testParameter(tmpStr, -2048, 2048)) {\r\n maxTy = Double.valueOf(tmpStr).doubleValue();\r\n } else {\r\n textmaxTy.requestFocus();\r\n textmaxTy.selectAll();\r\n\r\n return;\r\n }\r\n\r\n tmpStr = textminRz.getText();\r\n\r\n if (testParameter(tmpStr, -360, 360)) {\r\n minRz = Double.valueOf(tmpStr).doubleValue();\r\n } else {\r\n textminRz.requestFocus();\r\n textminRz.selectAll();\r\n\r\n return;\r\n }\r\n\r\n tmpStr = textmaxRz.getText();\r\n\r\n if (testParameter(tmpStr, -360, 360)) {\r\n maxRz = Double.valueOf(tmpStr).doubleValue();\r\n } else {\r\n textmaxRz.requestFocus();\r\n textmaxRz.selectAll();\r\n\r\n return;\r\n }\r\n\r\n try {\r\n Preferences.debug(minTx + \",\" + maxTx + \",\" + minTy + \",\" + maxTy + \",\" + minRz + \",\" + maxRz + \",\" +\r\n step + \"\\n\",Preferences.DEBUG_ALGORITHM);\r\n nVOIs = image.getVOIs().size();\r\n Preferences.debug(\"nVOIs = \" + nVOIs + \"\\n\",Preferences.DEBUG_ALGORITHM);\r\n\r\n ViewVOIVector VOIs = image.getVOIs();\r\n\r\n if (nVOIs == 0) {\r\n MipavUtil.displayError(\"Trace contour using one polygon VOI on first slice.\");\r\n\r\n return;\r\n }\r\n\r\n for (i = 0; i < nVOIs; i++) {\r\n\r\n if ((VOIs.VOIAt(i).isActive() == true) &&\r\n ((VOIs.VOIAt(i).getCurveType() == VOI.CONTOUR) ||\r\n (VOIs.VOIAt(i).getCurveType() == VOI.POLYLINE))) {\r\n VOIindex = i;\r\n\r\n break;\r\n }\r\n }\r\n\r\n if (i == nVOIs) {\r\n MipavUtil.displayError(\"Please select VOI\");\r\n\r\n return;\r\n }\r\n\r\n Vector<VOIBase> curves = VOIs.VOIAt(VOIindex).getCurves();\r\n int nCurves = curves.size();\r\n\r\n if (nCurves == 0) {\r\n MipavUtil.displayError(\"Please select VOI from the first image slice.\");\r\n\r\n return;\r\n }\r\n\r\n for (j = 0; j < nCurves; j++) {\r\n\r\n if (((VOIContour) (curves.elementAt(j))).isActive()) {\r\n break;\r\n }\r\n }\r\n\r\n if (j == nCurves) {\r\n MipavUtil.displayError(\"Please select VOI\");\r\n\r\n return;\r\n }\r\n\r\n int xdim = destExtents[0];\r\n int ydim = destExtents[1];\r\n int tdim = destExtents[2];\r\n float[] resolutions = new float[] { 1, 1, 1 };\r\n\r\n for (i = 0; i < tdim; i++) {\r\n image.getFileInfo(i).setResolutions(resolutions);\r\n }\r\n\r\n float[] volBuffer = null;\r\n int sliceSize = xdim * ydim;\r\n int volLength = sliceSize * tdim;\r\n volBuffer = new float[volLength];\r\n image.exportData(0, volLength, volBuffer); // copy image into 1D array\r\n\r\n int length = (int)\r\n Math.round(((VOIContour) (curves.elementAt(j))).getLengthPtToPt(resolutions) /\r\n resolutions[0]);\r\n\r\n tmpPosition = new Vector3f[2 * length];\r\n tmpIntensity = new float[2 * length];\r\n\r\n Preferences.debug(\"VOI predicted array length = \" + length + \"\\n\",Preferences.DEBUG_ALGORITHM);\r\n\r\n length = image.getVOIs().VOIAt(VOIindex).getPositionAndIntensity(0, j, tmpPosition, tmpIntensity,\r\n volBuffer, xdim);\r\n\r\n Preferences.debug(\"actual VOI length = \" + length + \"\\n\",Preferences.DEBUG_ALGORITHM);\r\n\r\n position = new VOIContour(false, true);\r\n\r\n for (i = 0; i < length; i++) {\r\n position.add( new Vector3f(tmpPosition[i].X, tmpPosition[i].Y, tmpPosition[i].Z) );\r\n }\r\n\r\n // Hide dialog\r\n setVisible(false);\r\n\r\n String name = makeImageName(image.getImageName(), \"_result\");\r\n \r\n clonedImage = (ModelImage)image.clone(image.getImageName() + \"_result\");\r\n\r\n // Make NEW result image of float type\r\n resultImage = new ModelImage(ModelImage.FLOAT, destExtents, name);\r\n\r\n // call algoRegKidney here\r\n algoRegVOILankmark = new AlgorithmRegVOILandmark(clonedImage, resultImage, sigmas, true, position, minTx,\r\n maxTx, minTy, maxTy, minRz, maxRz, step, opt,\r\n costFunc);\r\n algoRegVOILankmark.addListener(this);\r\n\r\n createProgressBar(image.getImageName(), algoRegVOILankmark);\r\n\r\n // Start the thread as a low priority because we wish to still have user interface work fast\r\n if (algoRegVOILankmark.startMethod(Thread.MIN_PRIORITY) == false) {\r\n MipavUtil.displayError(\"A thread is already running on this object\");\r\n }\r\n } catch (IOException error) {\r\n MipavUtil.displayError(\"Registration Kidney: IO Exception\");\r\n\r\n return;\r\n } catch (OutOfMemoryError x) {\r\n\r\n if (resultImage != null) {\r\n resultImage.disposeLocal(); // Clean up image memory\r\n resultImage = null;\r\n }\r\n\r\n MipavUtil.displayError(\"Dialog Register Kidney: unable to allocate enough memory\");\r\n\r\n return;\r\n }\r\n } else if (source == cancelButton) {\r\n dispose();\r\n } else {\r\n super.actionPerformed(event);\r\n }\r\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt(), M = scanner.nextInt();\n int[][] graph = new int[N + 1][N + 1];\n\n for (int i = 0; i < M; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int weight = scanner.nextInt();\n graph[from][to] = weight;\n }\n \n int[][][] dp = new int[N + 1][N + 1][N + 1];\n\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (graph[i][j] != 0) {\n dp[0][i][j] = graph[i][j];\n } else {\n dp[0][i][j] = Integer.MAX_VALUE;\n }\n }\n }\n \n for (int k = 0; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n dp[k][i][i] = 0;\n }\n }\n\n for (int k = 1; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (dp[k - 1][i][k] != Integer.MAX_VALUE && dp[k - 1][k][j] != Integer.MAX_VALUE) {\n dp[k][i][j] = Math.min(dp[k - 1][i][j], dp[k -1][i][k] + dp[k -1][k][j]);\n } else {\n dp[k][i][j] = dp[k - 1][i][j];\n }\n }\n }\n }\n\n int Q = scanner.nextInt();\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < Q; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int res = dp[N][from][to] == Integer.MAX_VALUE ? -1 : dp[N][from][to];\n sb.append(res).append('\\n');\n }\n System.out.println(sb.toString());\n }", "public void start()\n\t{\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tfor(int j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tcost[i][j] = temp[i][j];\n\t\t\t\tmatrix[i][j]=0;\n\t\t\t}\n\t\t}\n\t\n\t\tfor(int k=0;k<n;k++)\n\t\t{\n\t\t\trowLabelMultiple[k]=0;\n\t\t\tcolumnLabelMultiple[k]=0;\n\t\t}\t\t\t\n\t}", "public static void main(String[] args) {\n double[] vArr = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75};\n double[] tempArr = {-40, -30, -20, -10, 0, 10, 20, 30, 40, 50};\n //1. utwórz tablice 2-wymiarowa\n //2. potrzebuje: typprzechowanej wartosci i rozmiar, czyli\n //typ: double\n //rozm w kierunku temp.: -40, -30, -20, ... 50 -> 10 elementow\n //rozm w kierunku v: 5, 10, 15, 20, 25, -> 15 elelmentow\n double[][] resultMatrix = new double[vArr.length][tempArr.length];\n\n //3. rM(1, 3) = f(10, -10) = -7,5;\n //Odczytac wartosc v i temp do obliczen i podstawic do wzoru - wynik umiescic w odp miejscu tab rM\n for (int v = 0; v < vArr.length; v++){\n for (int t = 0; t < tempArr.length; t++){\n resultMatrix[v][t] = 35.74 + 0.6215 * tempArr[t] + (0.4275 * tempArr[t] - 35.75) * Math.pow(vArr[v], 0.16);\n }\n }\n\n //mam juz uzupelniona cala tab wartosci - wyswietlic\n for (int v = 0; v < vArr.length; v++){\n for (int t = 0; t < tempArr.length; t++){\n System.out.println(String.format(\"f(%d, %d) = %f\", (int) vArr[v], (int) tempArr[t], resultMatrix[v][t]));\n }\n }\n System.out.println(\"Tabela wartosci: \");\n for (int v = 0; v < vArr.length; v++) {\n for (int t = 0; t < tempArr.length; t++){\n System.out.println(resultMatrix[v][t] + \"\\t\");\n }\n System.out.println();\n }\n System.out.println(\"Podaj v: <5, 10, 15... 75>\");\n //5 -> vArr[0]\n //75 -> vArr[14]\n //userInput/5 - 1\n Scanner sc = new Scanner(System.in);\n int userInput = sc.nextInt();\n int vIdx = userInput / 5 - 1;\n System.out.println(\"Podaj temp: <-40, -30... 50>\");\n userInput = sc.nextByte();\n int tempIdx = (userInput + 40) / 10;\n\n System.out.println(String.format(\"f(%d, %d) = %f\", (int) vArr[vIdx], (int) tempArr[tempIdx], resultMatrix[vIdx][tempIdx]));\n }", "public double[] calcSolution() {\n\t\t\n\t// Call CostFunction object\n\t\tcostFunction.function(position);\n\t\t\n\t\treturn solution;\n\t\t\n\t}", "public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }", "@Test\n\tpublic void multipleSolutionsTest(){\n\t\tDjikstrasMap m = new DjikstrasMap();\t//Creates new DjikstrasMap object\n\t\t\n\t\tm.addRoad(\"Guildford\", \"Portsmouth\", 20.5, \"M3\");\t//Adds a road from Guildford to portsmouth to the map\n m.addRoad(\"Portsmouth\", \"Guildford\", 20.5, \"M3\");\n \n m.addRoad(\"Guildford\", \"Winchester\", 20.5, \"A33\");\t//Adds a road from Guildford to winchester to the map\n m.addRoad(\"Winchester\", \"Guildford\", 20.5, \"A33\");\n \n m.addRoad(\"Winchester\", \"Fareham\", 20.5, \"M27\");\t//Adds a road from winchester to fareham to the map\n m.addRoad(\"Fareham\", \"Winchester\", 20.5, \"M27\");\n\t\t\n m.addRoad(\"Portsmouth\", \"Fareham\", 20.5, \"M25\");\t//Adds a road from fareham to portsmouth to the map\n m.addRoad(\"Fareham\", \"Portsmouth\", 20.5, \"M25\");\n \n m.findShortestPath(\"Fareham\");\t//Starts the algorithm to find the shortest path\n \n List<String> temp = new ArrayList<String>();\t//Holds the route plan\n temp = m.createRoutePlan(\"Guildford\");\t//Calls methods to assign the route plan to temp\n \n assertEquals(\"1. Take the M27 to Winchester\",temp.get(0));\t//tests that the different lines in the route plan are correct and that the algorithm did indeed take the shortest route\n assertEquals(\"2. Take the A33 to Guildford\", temp.get(1));\n assertEquals(\"\", temp.get(2));\n assertEquals(\"The Journey will take 41 hours and .00 minutes long.\", temp.get(3));\n assertEquals(\"\", temp.get(4));\n \n assertEquals(5, temp.size());\t//tests to see that the route plan is 5 line large as it should be\n\t}", "public void finalDisplay()\n\t{\n\t\tString s1=null;\n\t\tif(!yes)\n\t\t{\n\t\t\tint sum=0;\n\t\t\tint j;\n\t\t\tSystem.out.println(\"Final Display algo1\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tj=rowLabel[i];\t\t\t\n\t\t\t\tSystem.out.println(j);\n\t\t\t\tsum+=temp[i][j];\t\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint sum=0;\n\t\t\tSystem.out.println(\"Final Display algo2\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(matrix[i][j]==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum+=temp[i][j];\n\t\t\t\t\t\trowLabel[i]=j;\n\t\t\t\t\t\tSystem.out.println(rowLabel[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\t\n\t\tJTable t = new JTable();\n testTable(t,noOfPeople+1);\n JScrollPane scrollPane = new JScrollPane(t); \n JOptionPane.showMessageDialog(null,scrollPane, s1, JOptionPane.INFORMATION_MESSAGE);\n\t}", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n//\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\tint N= Integer.parseInt(st.nextToken());\n\t\tint T= Integer.parseInt(st.nextToken());\n\t\t\n\t\t//for each N, three possible problem sets (P, A, G)\n\t\t//and P (prep time: min), V (value)\n\t\t//P <= A <= G\n\t\t\n\t\t//given limit T\n\t\t//find max profit\n\t\tint[][] v = new int[N+1][3+1];\n\t\tint[][] w = new int[N+1][3+1];\n\t\t\n\t\t//one \n\t\t\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\tfor (int j = 1; j <= 3; j++) {\n\t\t\t\tw[i][j] = Integer.parseInt(st.nextToken());\n\t\t\t\tv[i][j] = Integer.parseInt(st.nextToken());\n\t\t\t}\n\t\t}\n//\t\tfor (int i = 1; i <= N; i++) {\n//\t\t\tfor (int j = 1; j <= 3; j++) {\n//\t\t\t\tSystem.out.println(w[i][j] + \" \"+ v[i][j]);\n//\t\t\t}\n//\t\t}\n\t\tint[][] dp = new int[2][T+1];\n\t\t//where k looks at the kth row of the values/weight array\n\t\tfor (int k = 1; k <= N; k++) {\n\t\t\tfor (int x = 0; x <= T; x++) {\n\t\t\t\t//going through each weight and value\n\t\t\t\tboolean ran = false;\n\t\t\t\tfor (int a = 1; a <= 3; a++) {\t\t\t\t\t\n\t\t\t\t\tif (w[k][a] > x) {\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\tran = true;\n\t\t\t\t\t\tdp[1][x] = Math.max(Math.max(dp[0][x],dp[0][x-w[k][a]] + v[k][a]),dp[1][x]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!ran) {\n\t\t\t\t\tdp[1][x] = dp[0][x];\n\t\t\t\t}\n\t\t\t}\n\t\t\tdp[0] = dp[1].clone();\n//\t\t\tfor (int[] row: dp) {\n//\t\t\t\tfor (int m: row) {\n//\t\t\t\t\tSystem.out.print(m + \" \");\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println();\n//\t\t\t}\n\t\t}\n\t\t\n//\t\tfor (int[] row: dp) {\n//\t\t\tfor (int m: row) {\n//\t\t\t\tSystem.out.print(m + \" \");\n//\t\t\t}\n//\t\t\tSystem.out.println();\n//\t\t}\n\t\tSystem.out.println(dp[1][T]);\n\t}", "private void buildMatrix() {\n\n int totalnumber=this.patents.size()*this.patents.size();\n\n\n\n int currentnumber=0;\n\n\n for(int i=0;i<this.patents.size();i++) {\n ArrayList<Double> temp_a=new ArrayList<>();\n for (int j=0;j<this.patents.size();j++) {\n if (i==j) temp_a.add(0.0); else if (i<j)\n {\n double temp = distance.distance(this.patents.get(i), this.patents.get(j));\n temp = (new BigDecimal(temp).setScale(2, RoundingMode.UP)).doubleValue();\n temp_a.add(temp);\n\n\n // simMatrix.get(i).set(j, temp);\n // simMatrix.get(j).set(i, temp);\n } else {\n temp_a.add(simMatrix.get(j).get(i));\n }\n currentnumber++;\n System.out.print(\"\\r\"+ProgressBar.barString((int)((currentnumber*100/totalnumber)))+\" \"+currentnumber);\n\n }\n simMatrix.add(temp_a);\n }\n System.out.println();\n\n }", "public abstract int[] solve(double[][] costs);", "public void createRevenueGraph()\n\t{\n\t\tASPManager mgr = getASPManager();\n\n\t\tint woGraphPoints;\n\t\tString costTyptemp;\n\t\tString costGraph_Ext;\n\t\tdouble woRevenueTemp; \n\t\tdouble strRevenueTemp;\n\t\tString sGraphTitle;\n\t\tString sLeftTitle; \n\n\t\tint noOfRows = itemset0.countRows(); \n\t\trevGraphInNewWind = false;\n\t\tint wono = sWorkOrderNoTree;\n\n\t\tString[] woCostType = new String[noOfRows]; \n\t\tdouble[] woRevenue = new double[noOfRows];\n\t\tdouble[] structureRevenue = new double[noOfRows];\n\n\t\titemset0.first();\n\n\t\tfor (int i = 0; i < noOfRows; i++)\n\t\t{\n\t\t\twoRevenue[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDREVENUESINGLE\");\n\t\t\twoCostType[i] = itemset0.getRow().getValue(\"SWOCOSTTYPE\");\n\t\t\tstructureRevenue[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDREVENUE\");\n\n\t\t\titemset0.forward(1);\n\t\t}\n\n\t\twoGraphPoints = 6;\n\n\t\tfor (int i = 0; i < noOfRows; i++)\n\t\t{\n\t\t\tif (woRevenue[i]>0 || structureRevenue[i]>0)\n\t\t\t\tgraphflagWo = 1;\n\t\t}\n\n\t\tsGraphTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMWOREVTITLE: Work Order Revenue\");\n\t\tsLeftTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMAMOUNTTR: Amount\");\n\n\t\trevGraphInNewWind = true;\n\n\t\tdrawGraphPic(wono,sGraphTitle,sLeftTitle,noOfRows,woCostType,woRevenue,structureRevenue); \n\t}", "public void solve() {\n /** To solve the traveling salesman problem:\n * Set up the graph, choose a starting node, then call the recursive backtracking method and pass it the starting node.\n */\n\n // We need to pass a starting node to recursive backtracking method\n Node startNode = null;\n\n // Grab a node, any node...\n for( Node n : graph.nodes() ) {\n startNode = n;\n break;\n }\n\n // Visit the first node\n startNode.visit();\n\n // Add first node to the route\n this.route[0] = startNode;\n\n // Pass the number of choices made\n int nchoices = 1;\n\n // Recursive backtracking\n explore(startNode, nchoices );\n\n\n }", "public static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\t\t\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\tN = Integer.parseInt(st.nextToken());\n\t\tM = Integer.parseInt(st.nextToken());\n\t\t\n\t\tcon = new ArrayList[N+1]; conW = new ArrayList[N+1];\n\t\tD = new long[N+1];\n\t\tfor(int i =1;i<=N;i++ ){\n\t\t\tcon[i] = new ArrayList<>();\n\t\t\tconW[i] = new ArrayList<>();\n\t\t\tD [i] = Long.MAX_VALUE;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<=M;i++){\n\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\tint a = Integer.parseInt(st.nextToken());\n\t\t\tint b = Integer.parseInt(st.nextToken());\n\t\t\tint c = Integer.parseInt(st.nextToken());\n\t\t\tcon[a].add(b); \n\t\t\tconW[a].add(c); \n\t\t}\n\n\t\tD[1] = 0;\n\t\tfor(int i=1;i<=N;i++){\n\t\t\tif(D[i] < Long.MAX_VALUE){\n\t\t\t\tfor (int j=0;j<con[i].size();j++){\n\t\t\t\t\tint k = con[i].get(j);//i->k\n\t\t\t\t\tint w = conW[i].get(j);//i->k까지 가는데 cost\n\t\t\t\t\tD[k] = Math.min(D[k], D[i]+w);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(D[N] < Long.MAX_VALUE ? D[N] : -1);\n\n\t}", "public void solucioInicial2() {\n int grupsRecollits = 0;\n for (int i=0; i<numCentres*helisPerCentre; ++i) {\n Helicopter hel = new Helicopter();\n helicopters.add(hel);\n }\n int indexHelic = 0;\n int indexGrup = 0;\n int places = 15;\n while (indexGrup < numGrups) {\n int trajecte[] = {-1,-1,-1};\n for (int i=0; i < 3 && indexGrup<numGrups; ++i) {\n Grupo grup = grups.get( indexGrup );\n if (places - grup.getNPersonas() >= 0) {\n places -= grup.getNPersonas();\n trajecte[i] = indexGrup;\n indexGrup++;\n\n }\n else i = 3;\n }\n Helicopter helicopter = helicopters.get( indexHelic );\n helicopter.addTrajecte( trajecte, indexHelic/helisPerCentre );\n places = 15;\n indexHelic++;\n if (indexHelic == numCentres*helisPerCentre) indexHelic = 0;\n }\n }", "public Vertex[] createGraph(){\n\t\t /* constructing a graph using matrices\n\t\t * If there is a connection between two adjacent LETTERS, the \n\t * cell will contain a num > 1, otherwise a 0. A value of -1 in the\n\t * cell denotes that the cities are not neighbors.\n\t * \n\t * GRAPH (with weights b/w nodes):\n\t * E+---12-------+B--------18-----+F----2---+C\n\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\t 10\n\t * 24\t\t\t\t8\t\t\t 8\t |\n\t * |\t\t\t\t|\t\t\t |\t\t +\n\t * |\t\t\t\t|\t\t\t | H <+---11---I\n\t * |\t\t\t\t|\t\t\t /\n\t * +\t\t\t\t+\t\t\t +\n\t * G+---12----+A(start)+---10--+D\n\t * \n\t * NOTE: I is the only unidirectional node\n\t */\n\t\t\n\t\tint cols = 9;\n\t\tint rows = 9;\n\t\t//adjacency matrix\n\t\t\t\t //A B C D E F G H I\n\t int graph[][] = { {0,8,0,10,0,0,12,0,0}, //A\n\t {8,0,0,0,12,18,0,0,0}, //B\n\t {0,0,0,0,0,2,0,10,0}, //C\n\t {10,0,0,0,0,8,0,0,0}, //D\n\t {0,12,0,0,0,0,24,0,0}, //E\n\t {0,18,2,8,0,0,0,0,0}, //F\n\t {12,0,0,0,0,0,24,0,0}, //G\n\t {0,0,10,0,0,0,0,0,11}, //H\n\t {0,0,0,0,0,0,0,11,0}}; //I\n\t \n\t //initialize stores vertices\n\t Vertex[] vertices = new Vertex[rows]; \n\n\t //Go through each row and collect all [i,col] >= 1 (neighbors)\n\t int weight = 0; //weight of the neighbor\n\t for (int i = 0; i < rows; i++) {\n\t \tVector<Integer> vec = new Vector<Integer>(rows);\n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\tif (graph[i][j] >= 1) {\n\t\t\t\t\tvec.add(j);\n\t\t\t\t\tweight = j;\n\t\t\t\t}//is a neighbor\n\t\t\t}\n\t\t\tvertices[i] = new Vertex(Vertex.getVertexName(i), vec);\n\t\t\tvertices[i].state = weight;\n\t\t\tvec = null; // Allow garbage collection\n\t\t}\n\t return vertices;\n\t}", "public void printSolution(int queue[], int n){\r\n\t\tSystem.out.print(\"Vertex Distance from Source \\n\");\r\n\t\tfor(int i=0;i<vertices;i++)\r\n\t\t\tSystem.out.println(i + \" \" + queue[i]);\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tfinal int NUM_ITERATIONS = getNumberOfIterations();\n\t\tfinal int NUM_FINAL_SOLUTIONS = getNumberOfFinalSolutions();\n\t\tfinal int NUM_RULES_PER_SOLUTIONS = getNumberOfRulesPerSolution();\n\t\tfinal String SAMPLE_SUMMARY_PATH = getPathToSampleSummary();\n\t\tfinal String METRICS_RESULT_PATH = getPathToMetricsResults();\n\t\t\n\t\tthis.controller = new MainController(NUM_ITERATIONS, NUM_FINAL_SOLUTIONS,\n\t\t\t\tNUM_RULES_PER_SOLUTIONS, SAMPLE_SUMMARY_PATH,\n\t\t\t\tMETRICS_RESULT_PATH);\n\t\ttry\n\t\t{\n\t\t\tnf.setMinimumFractionDigits(3);\n\t\t nf.setGroupingUsed(false); \n\t\t\tthis.controller.run();\n\t\t\tJOptionPane.showMessageDialog(this, \"Finished! The best solution has been found!\", \"Finished!\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\n\t\t\tString humanReadableRules = getRulesOfBestSolutionAsHumanReadableString();\n\t\t\tif (GUI.DEBUG) {\n\t\t\t\tJOptionPane.showMessageDialog(this, \"The best solution has a Recall value of \" + nf.format(this.controller.getBestSolution().getRecall()) + \", and a Precision value of \" + nf.format(this.controller.getBestSolution().getPrecision()), \"Fitness Values\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t\t\n\t\t\tBufferedWriter rulesToFile = new BufferedWriter(new FileWriter(\"rulesOfBestSolution.txt\"));\n\t\t\trulesToFile.write(humanReadableRules);\n\t\t\trulesToFile.close();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(this, \"The best solution has been\\n output to the file 'rulesOfBestSolution.txt'\", \"Best solution written to file\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\n\t\t\t\n\t\t} catch (InvalidNameException e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"There was a problem with the path to the \"+ e.getMessage()+\", please fix and try again.\", \"File Path Error\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\n\t\t\tif (e.getLocalizedMessage() == \"Summary Table\") {\n\t\t\t\tpathToMetricsResults.requestFocusInWindow(); \n\t\t\t} else if (e.getLocalizedMessage() == \"Metric Results\") {\n\t\t\t\tpathToSampleSummary.requestFocusInWindow();\n\t\t\t}\n\t\t\t\n\t\t\tif (GUI.DEBUG) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"There was a problem!\", \"Error\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\n\t\t\tif (GUI.DEBUG) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void generateMatrix() {\n\n flow = new int[MATRIX_TAM][MATRIX_TAM];\n loc = new int[MATRIX_TAM][MATRIX_TAM];\n\n for (int i = 0; i < MATRIX_TAM; i++) {\n for (int j = 0; j < MATRIX_TAM; j++) {\n\n //fill the distances matrix\n if (i != j) {\n loc[i][j] = rn.nextInt(MAX_DISTANCE - MIN_DISTANCE + 1) + MIN_DISTANCE;\n } else {\n loc[i][j] = 0;\n }\n\n //fill the flow matrix\n if (i != j) {\n flow[i][j] = rn.nextInt(MAX_FLOW - MIN_FLOW + 1) + MIN_FLOW;\n } else {\n flow[i][j] = 0;\n }\n\n }\n }\n\n }", "public void makeMatrixList()\r\n\t{\r\n\t\t// get the fully connected matrix as the first one:\r\n\t\t//matrixList.add(fullConnectedArcMatrix);\r\n // the maximum number of arcs:\r\n\t\tint maximumNumOfArc = varNum * (varNum - 1) / 2;\r\n\t\t// the minimum number of arcs should be varNum - 1, or there will be vertices that are not connected: \r\n\t\tint minimumNumOfArc = varNum - 1;\r\n\t //log.debug(\"minimum number of arcs for \" + varNum + \"variables: \" + minimumNumOfArc + \"/n\");\r\n\t\t// the maximum number of 0 in the upper triangle should be no more than n(n-1)/2 - (n-1)\r\n\t\tint maxZeroNum = varNum*(varNum - 1)/2 - varNum + 1;\r\n\t\t//log.debug(\"maximum number of 0 in matrix for \" + varNum + \"variables: \" + maxZeroNum + \"/n\");\r\n\t\t\r\n\t\t//GenerateAllDAGs ga = new GenerateAllDAGs();\r\n\t\t//getAllDAGs(int maxZeroNum, int maximumNumOfArc, int varNum)\r\n\t\tmatrixList = GenerateAllDAGs.getAllDAGs(maxZeroNum, maximumNumOfArc, varNum);\r\n\t\t\r\n\t}", "public void finalDisplay1()\n\t{\n\t\tString s1=null;\n\t\tif(!yes)\n\t\t{\n\t\t\tint sum=0;\n\t\t\tint j;\n\t\t\tSystem.out.println(\"Final Display1 algo1\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tj=rowLabel[i];\t\t\t\n\t\t\t\tsum+=temp[i][j];\t\n\t\t\t\tSystem.out.println(j);\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint sum=0;\n\t\t\tSystem.out.println(\"Final Display algo2\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(matrix[i][j]==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum+=temp[i][j];\n\t\t\t\t\t\trowLabel[i]=j;\n\t\t\t\t\t\tSystem.out.println(rowLabel[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\t\n\t\tJTable t = new JTable();\n testTable(t,noOfPeople+1);\n JScrollPane scrollPane = new JScrollPane(t); \n JOptionPane.showMessageDialog(null,scrollPane, s1, JOptionPane.INFORMATION_MESSAGE);\n\t}", "public static void main(String[] args) {\n\t\tint cost[][] = { {1, 2, 3},\n {4, 8, 2},\n {1, 5, 3} };\n\t\tint len=3;\n\t\tdp=new int[len+1][len+1];\n\t\tfor(int i=0;i<len;++i)\n\t\t\tArrays.fill(dp[i], Integer.MAX_VALUE);\n\t\n\tSystem.out.println(getMinCost(cost, 2, 2, len));\n\tprintPath(cost, 2, 2);\n\t}", "public Plan calculatePlan(Heuristic heuristic) throws Exception {\n\t\tthis.currentState = new State(this.initialState);\n\t\tPlan plan = new Plan();\n\t\tplan.setOutput(output);\n\n\t\t// Push goal predicates from final state as list:\n\t\tstack.push(finalState.getPredicates());\n\t\t// Push individual goal predicates:\n\n\t\t// HEURISTIC: order the offices with a traveling salesmen solution\n\t\t// for example: NN algorithm\n\t\t// https://en.wikipedia.org/wiki/Nearest_neighbour_algorithm\n\t\t// start at served(o) with o closest to current position\n\t\t// then go on by choosing the nearest neighbor.\n\t\tList<Predicate> goalPredicates = heuristic.heuristicPushOrder(finalState.getPredicates().toList(),\n\t\t\t\tcurrentState);\n\t\tfor (Predicate singlePred : goalPredicates) {\n\t\t\tstack.push(singlePred);\n\t\t}\n\n\t\twhile (!stack.isEmpty()) {\n\t\t\tthis.output.println(\"-----\");\n\t\t\t// Look at element on top of stack:\n\t\t\tStripsElement currentElement = stack.pop();\n\n\t\t\tif (currentElement instanceof Operator) {\n\t\t\t\t// If element is an operator:\n\t\t\t\tOperator operator = (Operator) currentElement;\n\t\t\t\t// Apply operator to current state:\n\t\t\t\tcurrentState.applyOperator(operator);\n\t\t\t\t// Add operator to plan:\n\t\t\t\tplan.addOperator(operator);\n\n\t\t\t} else if (currentElement instanceof ConjunctivePredicate) {\n\t\t\t\t// If element is a list of predicates:\n\t\t\t\tConjunctivePredicate conjPred = (ConjunctivePredicate) currentElement;\n\t\t\t\t// TODO: report: we don't add a heuristic here because in the\n\t\t\t\t// coffee\n\t\t\t\t// problem this never happens.\n\n\t\t\t\t// Push all predicates from list that are not true in current\n\t\t\t\t// state to the stack:\n\t\t\t\tfor (Predicate falsePred : currentState.getFalseSinglePredicates(conjPred)) {\n\t\t\t\t\tstack.push(falsePred);\n\t\t\t\t}\n\t\t\t} else if (currentElement instanceof Predicate) {\n\t\t\t\t// If element is a single predicate:\n\t\t\t\tPredicate singlePred = (Predicate) currentElement;\n\t\t\t\tif (singlePred.isFullyInstantiated()) {\n\t\t\t\t\t// If predicate is fully instantiated:\n\t\t\t\t\tif (!currentState.isTrue(singlePred)) {\n\t\t\t\t\t\t// If predicate is not true in current state:\n\t\t\t\t\t\t// Find an operator to resolve the predicate\n\t\t\t\t\t\tOperator operator = findOperatorToResolve(singlePred);\n\t\t\t\t\t\t// Push the operator\n\t\t\t\t\t\tstack.push(operator);\n\t\t\t\t\t\tConjunctivePredicate preconditions = operator.getPreconditions();\n\t\t\t\t\t\t// Push a list of preconditions of the operator:\n\t\t\t\t\t\tstack.push(preconditions);\n\t\t\t\t\t\t// Push each single precondition:\n\t\t\t\t\t\t// TODO: report: don't change order here because it\n\t\t\t\t\t\t// changes the semantics of the operator and can make\n\t\t\t\t\t\t// the problem unsolvable. The order of preconditions\n\t\t\t\t\t\t// should not be changed for our three operators.\n\t\t\t\t\t\tfor (Predicate preconPart : preconditions.toList()) {\n\t\t\t\t\t\t\tstack.push(preconPart);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if single predicate and true in current state: do\n\t\t\t\t\t\t// nothing\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// if single predicate not instantiated:\n\t\t\t\t\t// find constant to instantiate the variables and set this\n\t\t\t\t\t// constant in entire stack:\n\t\t\t\t\tinstantiate(singlePred, heuristic);\n\t\t\t\t\tthis.output.println(\" --->\\t\" + singlePred);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.output.println(\"-----\");\n\t\treturn plan;\n\n\t}", "public static void main(String[] args) {\n\t\tint[][] edges = {{0,1},{1,2},{1,3},{4,5}};\n\t\tGraph graph = createAdjacencyList(edges, true);\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) unDirected : \"+getNumberOfConnectedComponents(graph));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) Directed: \"+getNumberOfConnectedComponents(createAdjacencyList(edges, false)));\n\t\t\n\t\t//Shortest Distance & path\n\t\tint[][] edgesW = {{0,1,1},{1,2,4},{2,3,1},{0,3,3},{0,4,1},{4,3,1}};\n\t\tgraph = createAdjacencyList(edgesW, true);\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(graph, 0, 3));\n\t\t\n\t\t//Graph represented in Adjacency Matrix\n\t\tint[][] adjacencyMatrix = {{0,1,0,0,1,0},{1,0,1,1,0,0},{0,1,0,1,0,0},{0,1,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}};\n\t\t\n\t\t// Connected components or Friends circle\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Recursive: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Iterative: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(adjacencyMatrix, 0, 3));\n\t\t\n\t\t// Number of Islands\n\t\tint[][] islandGrid = {{1,1,0,1},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Recursive: \"+ getNumberOfIslands(islandGrid));\n\t\t// re-initialize\n\t\tint[][] islandGridIterative = {{1,1,0,0},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Iterative: \"+ getNumberOfIslandsIterative(islandGridIterative));\n\n\n\t}", "public static void model1() {\n try {\n IloCplex cplex = new IloCplex();\n \n //variables\n IloNumVar x = cplex.numVar(0, Double.MAX_VALUE, \"x\"); //x >= 0\n IloNumVar y = cplex.numVar(0, Double.MAX_VALUE, \"y\"); //y >= 0\n \n //expressions\n IloLinearNumExpr objective = cplex.linearNumExpr();\n objective.addTerm(0.12, x);\n objective.addTerm(0.15, y);\n \n //define objective\n cplex.addMinimize(objective);\n \n //define constraints\n cplex.addGe(cplex.sum(cplex.prod(60, x), cplex.prod(60, y)), 300);\n cplex.addGe(cplex.sum(cplex.prod(12, x), cplex.prod(6, y)), 36);\n cplex.addGe(cplex.sum(cplex.prod(10, x), cplex.prod(30, y)), 90);\n \n //solve\n if (cplex.solve()) {\n System.out.println(\"Obj = \" + cplex.getObjValue());\n System.out.println(\"Obj = \" + cplex.getValue(objective));\n System.out.println(\"x = \" + cplex.getValue(x));\n System.out.println(\"y = \" + cplex.getValue(y));\n } else {\n System.out.println(\"Solution not found.\");\n }\n } catch (IloException ex) {\n ex.printStackTrace();\n }\n }", "void calculate_distance()\n {\n \t\n \tfor(int i = 0; i<V ; i++)\n \t{\n \t\tfor(int j = 0; j<E ; j++)\n \t\t{\n \t\t\trelax(edge[j].src, edge[j].destination, edge[j].weight);\n \t\t}\n \t\tsp[i] = dist[i];\n \t\tx[i] = dist[i];\n \t}\n \tSystem.out.println();\n }", "Solver(int grille[][]){\r\n\t\tthis.grille = grille;\r\n\t}", "public static void main(String[] args) throws IOException {\n\n\t\tArrayList<Node> nodes = new ArrayList<Node>();\n\n\t\tStringBuilder graphVis = new StringBuilder();\n\t\t\n\t\tfloat edgeProb = 0.001f;\n\t\tgenerateNodesAndEdges(nodes, graphVis, edgeProb, // GraphConfig.EDGE_PROHABILITY\n\t\t\t\tGraphConfig.EDGE_LEVEL_LIMIT, GraphConfig.EDGE_LEVEL_FUNCTION);\n\t\t//generateNodesAndEdgesRecursiv(nodes, graphVis);\n\t\taddColocations(nodes);\n\n\t\t// do the visualization string creation after setting colocation\n\t\t// constraints, if not colocation constraints are not set correctly\n\t\tString graphPath = \"../../Sample_Data/Graph/Evaluation/\" + nodes.size() + \"n_\"\n\t\t\t\t+ m + \"_\" + Util.currentTime();\n\t\t/*\n\t\t * StringBuilder content = new StringBuilder();\n\t\t * \n\t\t * for (Node node : nodes) { content.append(node.toString()); }\n\t\t * \n\t\t * GraphWriter writer = new GraphWriter();\n\t\t * writer.write(content.toString(), graphPath);\n\t\t * if(shallCreateGraphVisualization){\n\t\t * writer.writeVisualisation(graphVis.toString(), graphPath); }\n\t\t */\n\t\tFile file = new File(graphPath + \".csv\");\n\n\t\t// if file doesnt exists, then create it\n\t\tif (!file.exists()) {\n\t\t\tfile.createNewFile();\n\t\t}\n\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tbw.write(GraphConfig.configToString() + \"\\n\");\n\t\tbw.write(\n\t\t\t\t\"Id,(Outgoing) node,(Incoming) node,Colocation nodes,#tensorSize, #operations, RAM storage,Device constraint ,name\\n\");\n\t\tfor (Node node : nodes) {\n\t\t\tbw.write(node.toString());\n\t\t}\n\t\tbw.close();\n\t\tfw.close();\n\t\t// now change properties of the graph\n\n\t\t// String[] edge_probability = {\"0.025\",\"0.05\",\"0.\",\"0.1\", \"0.2\",\"0.4\",\n\t\t// \"0.6\", \"0.8\",\"1\"};\n\t\t/*\n\t\t * String[] edge_probability = { \"0.05\", \"0.1\", \"0.2\", \"0.3\", \"0.4\" };\n\t\t * int nodeLevelDistance = -1; // watch out that all nodes are reachable\n\t\t * -> need sink node // ode sink = new Node(0, \"SINK\"); // not problem\n\t\t * anymore for (String factor : edge_probability) { content = new\n\t\t * StringBuilder(); // remove all edges for (Node nodeToRemoveEdges :\n\t\t * nodes) { nodeToRemoveEdges.removeAllEdges(); } for (Node node :\n\t\t * nodes) { // könnte man beschleunigen da es sich um eine Arraylist\n\t\t * handelt for (Node possibleEdge : nodes) { // To avoid cycles, would\n\t\t * be faster to exploid properties of // the arraylist if (node.level <\n\t\t * possibleEdge.level) { if (Math.random() < Float.parseFloat(factor)) {\n\t\t * if (nodeLevelDistance < 0 || (possibleEdge.level - node.level <\n\t\t * nodeLevelDistance)) { node.getOutgoingNodes().add(possibleEdge);\n\t\t * possibleEdge.getIncomingNodes().add(node);\n\t\t * \n\t\t * } } } } } // koennte man auch schon vorher hinzufuegen, aber um\n\t\t * Fehler // auszuschließen for (Node node : nodes) {\n\t\t * content.append(node.toString()); } writer.write(content.toString(),\n\t\t * graphPath + \"_\" + factor); }\n\t\t */\n\t\t// System.out.println(\"isReachable:\" +\n\t\t// isEveryNodeReachable(sink,numberOfNodes));\n\t\t\n\t\tif(shallCreateGraphVisualization){\n\t\t\tSystem.out.println(graphVis.toString());\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n double costPerCreditHour = ((Number) costPerCreditHourField.getValue()).doubleValue();\n double bookCostPerSemester = ((Number) bookCostPerSemField.getValue()).doubleValue();\n double roomAndBoardCost = ((Number) roomAndBoardPerMonthField.getValue()).doubleValue();\n double foodCostPerMonth = ((Number) foodCostPerMonthField.getValue()).doubleValue();\n double travelCostPerMonth = ((Number) travelCostPerMonthField.getValue()).doubleValue();\n\n int monthsInASemester = ((Number) monthsInASemesterField.getValue()).intValue();\n int fullTimeHours = ((Number) fullTimeHoursField.getValue()).intValue();\n int partTimeHours = ((Number) partTimeHoursField.getValue()).intValue();\n int semestersInAYear = ((Number) semestersInAYearField.getValue()).intValue();\n int hoursInADegree = ((Number) hoursInADegreeField.getValue()).intValue();\n\n double fullTimeTuition = fullTimeHours * costPerCreditHour;\n double partTimeTuition = partTimeHours * costPerCreditHour;\n double roomAndBoard = roomAndBoardCost * monthsInASemester;\n double travel = travelCostPerMonth * monthsInASemester;\n double food = foodCostPerMonth * monthsInASemester;\n double fullTimeTotal = 0;\n double partTimeTotal = 0;\n partTimeTotal += partTimeTuition + roomAndBoard + travel + food;\n fullTimeTotal += fullTimeTuition + roomAndBoard + travel + food;\n\n //clear the output area\n outputArea.setText(\"\");\n\n outputArea.append(\"FULL TIME COST PER SEMESTER\"+\"\\t\" +\"PART TIME COST PER SEMESTER\\n\");\n outputArea.append(\"TUITION: $\" + fullTimeTuition +\"\\t\\t\" + \"TUITION: $\" + partTimeTuition +\"\\n\");\n outputArea.append(\"ROOM AND BOARD: $\" + roomAndBoard + \"\\t\\t\" + \"ROOM AND BOARD: $\" + roomAndBoard + \"\\n\");\n outputArea.append(\"TRAVEL: $\" + travel + \"\\t\\t\" + \"TRAVEL: $\" + travel + \"\\n\");\n outputArea.append(\"FOOD: $\" + food + \"\\t\\t\" + \"FOOD: $\" + food + \"\\n\");\n outputArea.append(\"BOOKS: $\" + bookCostPerSemester + \"\\t\\t\" + \"BOOKS: $\" + bookCostPerSemester + \"\\n\");\n outputArea.append(\"TOTAL COST: $\" + fullTimeTotal + \"\\t\\t\" + \"TOTAL COST: $\" + partTimeTotal + \"\\n\");\n outputArea.append(\"\\nTIME COST PER DEGREE\\n\");\n outputArea.append(\"TIME FOR \" + hoursInADegree + \" HRS @ FULL TIME: \" + (double)(hoursInADegree / fullTimeHours) + \" SEMESTERS\\n\");\n outputArea.append(\"TIME FOR \" + hoursInADegree + \" HRS @ FULL TIME: \" + ((double)(hoursInADegree / fullTimeHours)) / semestersInAYear + \" YEARS\\n\");\n outputArea.append(\"TIME FOR \" + hoursInADegree + \" HRS @ PART TIME: \" + (double)(hoursInADegree / partTimeHours) + \" SEMESTERS\\n\");\n outputArea.append(\"TIME FOR \" + hoursInADegree + \" HRS @ PART TIME: \" + ((double)(hoursInADegree / partTimeHours)) / semestersInAYear + \" YEARS\\n\");\n\n\n }", "void EvolutionWithElitism(){\n\t\t \tint i, j, l, k;\n\t\t\t//individual[] temp;\n\t\t\tbyte _flippc=0,_flippm=0;\n//\t\t\tString _temp1=\"\", _temp2=\"\";\n\t\t\tint[] _cp;\n\t\t\tnode[] _nd,_nm;\n\t\t\t// Khoi tao quan the dau tien \n\t\t\tRampedInit(6, 0.5);\n\t\t\t//RampedInitOffLine(6, 0.5,15);\n\t\t\t\n//\t\t\tconstructiveRate = new double[NUMGEN];\n//\t\t\tsemanticDistance = new double[NUMGEN];\n\t\t\t\n\t\t\tgen = 0;\n\t\t\twhile(gen < generation) {\n\t\t\t\t\n\t\t\t\tComputeFitness();\n\t\t\t\t\n//\t\t\t\tint g_ncross = 0;\n//\t\t\t\tdouble g_sd = 0;\n//\t\t\t\tPrintToFile();\n\t//----------------------\n//\t\t\t\tFileInputStream instream = null;\n//\t\t\t\tPrintStream outstream = null;\n//\t\t\t\tPrintStream console = System.out;\n//\t\t\t\ttry {\n//\t\t\t\t\toutstream = new PrintStream(new FileOutputStream(\"c:/result/\" + \"detail_\"+ gen + \".txt\"));\n//\t\t\t\t\tSystem.setOut(outstream);\n//\t\t\t\t} catch(Exception e) {\n//\t\t\t\t\tSystem.err.println(\"Error Occurred.\");\n//\t\t\t\t}\n//\t\t\t\tfor(i = 0; i < poplen; i++) {\n//\t\t\t\t\tSystem.out.printf(\"%3.5f \",oldpop[i].fitness);\n//\t\t\t\t\tif((i+1) % 10 == 0) {\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tfor(int ii = 0; ii < poplen; ii++) {\t\t\t\n//\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t_temp1=oldpop[ii].chrom.TreeToStringN(oldpop[ii].chrom);\n//\t\t\t\t\tSystem.out.printf(\"%s\",ii+\" \"+ _temp1);\t\t\t\n//\t\t\t\t\tSystem.out.println();\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// copy anh tot nhat sang the he sau\t \t\n\t\t\t\tnewpop[0].CopyIndividual(bestcurrent[gen], TRUE);\n\t\t\t\t// dot bien anh thu 2\n\t\t\t \n\t\t\t\tl=1;\t\n\t\t\t\ti = TourSelect(TOURSIZE);\n//\t\t\t\t\n\t\t\t\t\n\t\t\t newpop[l].CopyIndividual(oldpop[i], TRUE);\n\t\t\t\tindividual[] m_individual0=new individual[1];\n\t\t\t\tint[] _mt0=new int[1];\n\t\t\t\t_nm=new node[1];\n\t\t\t\tthis.ReplaceSubTree(newpop[l], m_individual0, 15, TRUE,_mt0,_nm);\n\t\t\t\tnewpop[l]=new individual();\n\t\t\t\tnewpop[l].CopyIndividual(m_individual0[0], TRUE);\t\t\t\n\t\t\t\tnewpop[l].evaluated=FALSE;\t\t\n//\t\t\t\t\n//\t\t\t\tm_individual0=null;\n\t\t\t\t\n\t//------------------------\t\t\n\t\t\t\tl = 2;\t\t\t\n\t\t\t\twhile(l < poplen) {\n\t\t\t\t//\tSystem.out.println(\"Generation \"+ String.valueOf(gen)+\":\");\n\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\n\t\t\t\t\ti = TourSelect(TOURSIZE);\n\t\t\t\t\tj = TourSelect(TOURSIZE);\n\t\t\t\t\t\n//\t\t\t\t\t\n//\t\t\t\t\t\t\n\t\t\t\t _flippc=Flip(pcross);\n//\t\t\t\t System.out.printf(\"pcross:%d\", _flippc);\n//\t\t\t\t System.out.println();\n\t\t\t\t\tif(_flippc == 1) {\t\t\t\t\t\n\t\t\t\t\t\tindividual[] i_temp=new individual[2];\n\t\t\t\t\t\t_cp=new int[2];\n\t\t\t\t\t\t_nd=new node[2];\n\t\t\t\t//\t\n\t\t\t\t//\t\tif(SubTreeSwapWithTTest(oldpop[i], oldpop[j], i_temp,_cp,_nd) == TRUE)\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(SubTreeSwap(oldpop[i], oldpop[j], i_temp,_cp,_nd) == TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnewpop[l].CopyIndividual(i_temp[0],TRUE);\n\t\t\t\t\t\t\tnewpop[l+1].CopyIndividual(i_temp[1],TRUE);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tnewpop[l].evaluated=FALSE;\n\t\t\t\t\t\t\tnewpop[l+1].evaluated=FALSE;\n//\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tncross++;\n\t\t\t\t\t\t\ti_temp=null;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// semantic distance\n//\t\t\t\t\t\t\tg_sd += newpop[l].getSemanticDistance(oldpop[i]);\n//\t\t\t\t\t\t\tg_sd += newpop[l+1].getSemanticDistance(oldpop[j]);\t\t\t\t\t\n//\t\t\t\t\t\t\tg_ncross++;\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tg_sd += oldpop[i].getSemanticDistance(oldpop[j]);\t\t\t\t\t\n//\t\t\t\t\t\t\tg_ncross++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tnewpop[l].CopyIndividual(oldpop[i], TRUE);\n\t\t\t\t\t\t\tnewpop[l + 1].CopyIndividual(oldpop[j],TRUE);\n//\t\t\t\t\t\t\tSystem.out.printf(\"%s\",\"reproduction\");\n//\t\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(newpop[l].chrom);\n//\t\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(newpop[l+1].chrom);\n//\t\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\t\ti_temp=null;\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\tnewpop[l].CopyIndividual(oldpop[i], TRUE);\n\t\t\t\t\t\tnewpop[l + 1].CopyIndividual(oldpop[j],TRUE);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\",\"reproduction\");\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(newpop[l].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(newpop[l+1].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t// mutation test\n\t\t\t\t\t_flippm=Flip(pmutate);\n//\t\t\t\t\tSystem.out.printf(\"pmutation:%d\", _flippm);\n//\t\t\t\t System.out.println();\n\t\t\t\t\tif(_flippm == 1) {\t\t\t\t\t\n\t\t\t\t\t\tindividual[] m_individual=new individual[1];\n\t\t\t\t\t\tint[] _mt=new int[1];\n\t\t\t\t\t\t_nm=new node[1];\n\t\t\t\t\t\tthis.ReplaceSubTree(newpop[l], m_individual, 15, TRUE,_mt,_nm);\n\t\t\t\t\t\tnewpop[l]=new individual();\n\t\t\t\t\t\tnewpop[l].CopyIndividual(m_individual[0], TRUE);\n\t\t\t\t\t\t\n\t\t\t\t\t\tnewpop[l].evaluated=FALSE;\n\t\t\t\t\t\t\n//\t\t\t\t\t\tSystem.out.printf(\"%s\",\"mutation \"+l+\" replacepoint:\"+_mt[0]);\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(_nm[0]);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(newpop[l].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\t\t\t\t\t\n\t\t\t\t\t\tnmutate++;\n\t\t\t\t\t\tm_individual=null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n//\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(newpop[l].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(Flip(pmutate) == 1) {\n\t\t\t\t\t\tindividual[] m_individual1=new individual[1];\n\t\t\t\t\t\tint[] _mt=new int[1];\n\t\t\t\t\t\t_nm=new node[1];\n\t\t\t\t\t\tthis.ReplaceSubTree(newpop[l + 1], m_individual1, 15, TRUE,_mt,_nm);\n\t\t\t\t\t\tnewpop[l+1]=new individual();\n\t\t\t\t\t\tnewpop[l+1].CopyIndividual(m_individual1[0], TRUE);\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tnewpop[l+1].evaluated=FALSE;\n//\t\t\t\t\t\tSystem.out.printf(\"%s\",\"mutation \"+(l+1)+\" replacepoint:\"+_mt[0]);\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(_nm[0]);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(newpop[l+1].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tnmutate++;\n\t\t\t\t\t\tm_individual1=null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n//\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(newpop[l+1].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t}\n\t\t\t\t\tl += 2;\n\t\t\t\t}\n//\t\t\t\tfor(int ii = 0; ii < poplen; ii++) {\t\t\t\n//\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t_temp1=oldpop[ii].chrom.TreeToStringN(newpop[ii].chrom);\n//\t\t\t\t\tSystem.out.printf(\"%s\",ii+\" \"+ _temp1);\t\t\t\n//\t\t\t\t\tSystem.out.println();\n//\t\t\t\t}\n//\t\t\t\toutstream.close();\n//\t\t\t\tSystem.setOut(console);\n\t\t\t\t// Thống kê tỷ lệ tTest\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t//\t\t\tsemanticDistance[gen] = g_sd / (2.0 * g_ncross);\n//\t\t\t\tsemanticDistance[gen] = g_sd /g_ncross;\n\t\t\t\t\n\t\t\t\tgen++;\n\t\t\t\tfor(k = 0; k < poplen; k++)\n\t\t\t\t{\n\t\t\t\t\toldpop[k]=null;\n\t\t\t\t\toldpop[k]=new individual();\n\t\t\t\t\toldpop[k].CopyIndividual(newpop[k], TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static void run(){\n\t\t\n\t\tMatrix A = null;\n\t\tVector b = null;\n\t\tVector c = null;\n\t\t\n\t\tfor (int n= 3; n<=11; n+=2 )\n\t\t{\n\t\t\tk=n-2;\n\t\t\tA = createConstraint(n, k) ;\n\t\t\tb = create_b(k, 0.5);\n\t\t\tc = create_c(n);\n\t\t\ttable = new SimplexTable(A, b, c, SimplexTable.MODE.EQUALITY);\n\t\t table.solve(); \n\t\t\tp(\"q_n( n=\"+n+\")= \" + (double) table.getMaxValue()); //(Math.round() / 100000);\n\t\t}\n\t\t\n\t}", "private void calculate() {\n\t\tList<Edge> path = new ArrayList<>();\n\t\tPriorityQueue<Vert> qv = new PriorityQueue<>();\n\t\tverts[s].dist = 0;\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tif (e.w==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist < L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t} else if (verts[t].dist == L) {\n\t\t\tok = true;\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tif (edges[i].w == 0) {\n\t\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// replace 0 with 1, adding to za list\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (edges[i].w == 0) {\n\t\t\t\tza[i] = true;\n\t\t\t\tedges[i].w = 1;\n\t\t\t} else {\n\t\t\t\tza[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// looking for shortest path from s to t with 0\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (i != s) {\n\t\t\t\tverts[i].dist = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tqv.clear();\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist > L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t}\n\t\tVert v = verts[t];\n\t\twhile (v.dist > 0) {\n\t\t\tlong minDist = MAX_DIST;\n\t\t\tVert vMin = null;\n\t\t\tEdge eMin = null;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(v.idx)];\n\t\t\t\tif (vo.dist+e.w < minDist) {\n\t\t\t\t\tvMin = vo;\n\t\t\t\t\teMin = e;\n\t\t\t\t\tminDist = vMin.dist+e.w;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tv = vMin;\t\n\t\t\tpath.add(eMin);\n\t\t}\n\t\tCollections.reverse(path);\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (za[i]) {\n\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tlong totLen=0;\n\t\tboolean wFixed = false;\n\t\tfor (Edge e : path) {\n\t\t\ttotLen += (za[e.idx] ? 1 : e.w);\n\t\t}\n\t\tfor (Edge e : path) {\n\t\t\tif (za[e.idx]) {\n\t\t\t\tif (!wFixed) {\n\t\t\t\t\te.w = L - totLen + 1;\n\t\t\t\t\twFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\te.w = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tok = true;\n\t}", "public void makeReport()\n\t{\n\t\tif (currentStage[currentSlice-1] > 1)\n\t\t{\n\t\t\tResultsTable rt = new ResultsTable();\n\t\t\tfor (int j=0;j<popSequence.N;j++)\n\t\t\t{\n\t\t\t\tpop = popSequence.PopList[j];\n\t\t\t\tint N = pop.N;\n\t\t\t\tfor (int i=0;i<N;i++)\n\t\t\t\t{\n\t\t\t\t\trt.incrementCounter();\n\t\t\t\t\tBalloon bal;\n\t\t\t\t\tbal = (Balloon)(pop.BallList.get(i));\n\t\t\t\t\tbal.mass_geometry();\n\t\t\t\t\trt.addValue(\"X\",bal.x0);\n\t\t\t\t\trt.addValue(\"Y\",bal.y0);\n\t\t\t\t\trt.addValue(\"Z\",j);\n\t\t\t\t\trt.addValue(\"ID\",bal.id);\n\t\t\t\t\trt.addValue(\"AREA\",bal.area);\n\t\t\t\t\trt.addValue(\"Ixx\",bal.Ixx);\n\t\t\t\t\trt.addValue(\"Iyy\",bal.Iyy);\n\t\t\t\t\trt.addValue(\"Ixy\",bal.Ixy);\n\t\t\t\t\trt.addValue(\"Lx\",bal.lx);\n\t\t\t\t\trt.addValue(\"Ly\",bal.ly);\n\t\t\t\t}\n\t\t\t}\n\t\t\trt.show(\"Report\");\n\t\t\tcurrentSlice = i1.getCurrentSlice();\n\t\t\tipWallSegment = (i1.getStack()).getProcessor(i1.getCurrentSlice());\n\t\t\tpop = popSequence.PopList[currentSlice-1];\n\t\t}\n\t}", "public static Vector<int []> UCS(int[] startPosition,int[] unexploreNode, mapNode[][] nodes){\n\t\t\r\n\t\tVector<int []> shortestPath;\r\n\t\t\r\n\t\t//initial all nodes' distance to INF\r\n\t\tfor(int i = 0; i < nodes.length; i++)\r\n\t\t{\r\n\t\t\tfor(int j = 0; j < nodes[i].length;j++)\r\n\t\t\t{\r\n\t\t\t\tnodes[i][j].setTotDistance(999999999);//set the initial distance to INF\r\n\t\t\t\tnodes[i][j].gridPosition[0] = i;//save current node x position\r\n\t\t\t\tnodes[i][j].gridPosition[1] = j;//save current node y position\r\n\t\t\t\tnodes[i][j].setNodeVistied(false);//set all nodes are not visited yet\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//set the start point total distance to 0\r\n\t\tnodes[startPosition[0]][startPosition[1]].setTotDistance(0);\r\n\t\t//create start node and add it into the execution queue\r\n\t\tmapNode tempNode = new mapNode();\r\n\t\ttempNode = nodes[startPosition[0]][startPosition[1]];\r\n\t\tVector<mapNode> tempQueue = new Vector<mapNode>();\r\n\t\ttempQueue.add(tempNode);\r\n\t\t//main loop: check all nodes on the map\r\n\t\twhile(tempQueue.size() != 0)\r\n\t\t{\r\n\t\t\t//create four nearby nodes\r\n\t\t\tmapNode tempTopNode = new mapNode();\r\n\t\t\tmapNode tempBottomNode = new mapNode();\r\n\t\t\tmapNode tempLeftNode = new mapNode();\r\n\t\t\tmapNode tempRightNode = new mapNode();\r\n\t\t\t\t\r\n\t\t\t//update Top node information from original nodes matrix\r\n\t\t\tif(tempQueue.get(0).topNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempTopNode = nodes[tempQueue.get(0).topNode.gridPosition[0]][tempQueue.get(0).topNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempTopNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//update Bottom node information from original nodes matrix\r\n\t\t\tif(tempQueue.get(0).bottomNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempBottomNode = nodes[tempQueue.get(0).bottomNode.gridPosition[0]][tempQueue.get(0).bottomNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempBottomNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//update Left node information from original nodes matrix\r\n\t\t\tif(tempQueue.get(0).leftNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempLeftNode = nodes[tempQueue.get(0).leftNode.gridPosition[0]][tempQueue.get(0).leftNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempLeftNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//update Right node information from original nodes matrix\r\n\t\t\tif(tempQueue.get(0).rightNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempRightNode = nodes[tempQueue.get(0).rightNode.gridPosition[0]][tempQueue.get(0).rightNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempRightNode = null;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//start re-calculate distance of each node\r\n\t\t\t//check the top node and update new distance\r\n\t\t\tif(tempTopNode != null)\r\n\t\t\t{\r\n\t\t\t\tif(tempTopNode.getTotDistance()>tempQueue.get(0).getTotDistance()+tempQueue.get(0).getTopWeight())\r\n\t\t\t\t{\r\n\t\t\t\t\t//update new distance to the top node \r\n\t\t\t\t\ttempTopNode.setTotDistance(tempQueue.get(0).getTotDistance()+tempQueue.get(0).getTopWeight());\t\r\n\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t//record the path\r\n\t\t\t\t\tfor(int m = 0; m < tempQueue.get(0).getTotPath().size(); m++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\ttempXY = tempQueue.get(0).getTotPath().get(m);\r\n\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check new node to see if exists in path\r\n\t\t\t\t\tif(checkPositionInPath(tempPath, tempQueue.get(0).gridPosition[0], tempQueue.get(0).gridPosition[1]) == false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\ttempXY2 = tempQueue.get(0).gridPosition;\r\n\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\ttempTopNode.setTotPath(tempPath);\r\n\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\tnodes[tempTopNode.gridPosition[0]][tempTopNode.gridPosition[1]] = tempTopNode;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(nodes[tempTopNode.gridPosition[0]][tempTopNode.gridPosition[1]].getNodeVisited()== false && checkNodeInQueue(tempQueue, tempTopNode.gridPosition[0], tempTopNode.gridPosition[1]) == false)\r\n\t\t\t\t{\r\n\t\t\t\t\t//check un-visited nodes and add new node into execution queue\r\n\t\t\t\t\ttempQueue.add(tempTopNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//check the bottom node and update new distance\r\n\t\t\tif(tempBottomNode != null)\r\n\t\t\t{\r\n\t\t\t\tif(tempBottomNode.getTotDistance()>tempQueue.get(0).getTotDistance()+tempQueue.get(0).getBottomWeight())\r\n\t\t\t\t{\r\n\t\t\t\t\ttempBottomNode.setTotDistance(tempQueue.get(0).getTotDistance()+tempQueue.get(0).getBottomWeight());\r\n\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t//record the path\r\n\t\t\t\t\tfor(int m = 0; m < tempQueue.get(0).getTotPath().size(); m++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\ttempXY = tempQueue.get(0).getTotPath().get(m);\r\n\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\tif(checkPositionInPath(tempPath, tempQueue.get(0).gridPosition[0], tempQueue.get(0).gridPosition[1]) == false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\ttempXY2 = tempQueue.get(0).gridPosition;\r\n\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\ttempBottomNode.setTotPath(tempPath);\r\n\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\tnodes[tempQueue.get(0).bottomNode.gridPosition[0]][tempQueue.get(0).bottomNode.gridPosition[1]] = tempBottomNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(nodes[tempBottomNode.gridPosition[0]][tempBottomNode.gridPosition[1]].getNodeVisited()== false && checkNodeInQueue(tempQueue, tempBottomNode.gridPosition[0], tempBottomNode.gridPosition[1]) == false)\r\n\t\t\t\t{\r\n\t\t\t\t\t//check un-visited nodes and add new node into execution queue\r\n\t\t\t\t\ttempQueue.add(tempBottomNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//check the left node and update new distance\r\n\t\t\tif(tempLeftNode != null)\r\n\t\t\t{\r\n\t\t\t\tif(tempLeftNode.getTotDistance()>tempQueue.get(0).getTotDistance()+tempQueue.get(0).getLeftWeight())\r\n\t\t\t\t{\r\n\t\t\t\t\ttempLeftNode.setTotDistance(tempQueue.get(0).getTotDistance()+tempQueue.get(0).getLeftWeight());\r\n\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t//record the path\r\n\t\t\t\t\tfor(int m = 0; m < tempQueue.get(0).getTotPath().size(); m++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\ttempXY = tempQueue.get(0).getTotPath().get(m);\r\n\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\tif(checkPositionInPath(tempPath, tempQueue.get(0).gridPosition[0], tempQueue.get(0).gridPosition[1]) == false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\ttempXY2 = tempQueue.get(0).gridPosition;\r\n\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\ttempLeftNode.setTotPath(tempPath);\r\n\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\tnodes[tempQueue.get(0).leftNode.gridPosition[0]][tempQueue.get(0).leftNode.gridPosition[1]] = tempLeftNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(nodes[tempLeftNode.gridPosition[0]][tempLeftNode.gridPosition[1]].getNodeVisited()== false && checkNodeInQueue(tempQueue, tempLeftNode.gridPosition[0], tempLeftNode.gridPosition[1]) == false)\r\n\t\t\t\t{\r\n\t\t\t\t\t//check un-visited nodes and add new node into execution queue\r\n\t\t\t\t\ttempQueue.add(tempLeftNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//check the right node and update new distance\r\n\t\t\tif(tempRightNode != null)\r\n\t\t\t{\r\n\t\t\t\tif(tempRightNode.getTotDistance()>tempQueue.get(0).getTotDistance()+tempQueue.get(0).getRightWeight())\r\n\t\t\t\t{\r\n\t\t\t\t\ttempRightNode.setTotDistance(tempQueue.get(0).getTotDistance()+tempQueue.get(0).getRightWeight());\r\n\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t//record the path\r\n\t\t\t\t\tfor(int m = 0; m < tempQueue.get(0).getTotPath().size(); m++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\ttempXY = tempQueue.get(0).getTotPath().get(m);\r\n\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check to see if new node existed in path\r\n\t\t\t\t\tif(checkPositionInPath(tempPath, tempQueue.get(0).gridPosition[0], tempQueue.get(0).gridPosition[1]) == false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\ttempXY2 = tempQueue.get(0).gridPosition;\r\n\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\ttempRightNode.setTotPath(tempPath);\r\n\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\tnodes[tempQueue.get(0).rightNode.gridPosition[0]][tempQueue.get(0).rightNode.gridPosition[1]] = tempRightNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(nodes[tempRightNode.gridPosition[0]][tempRightNode.gridPosition[1]].getNodeVisited()== false && checkNodeInQueue(tempQueue, tempRightNode.gridPosition[0], tempRightNode.gridPosition[1]) == false)\r\n\t\t\t\t{\r\n\t\t\t\t\t//check un-visited nodes and add new node into execution queue\r\n\t\t\t\t\ttempQueue.add(tempRightNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//set current node to visited node and\r\n\t\t\t//remove current node from execution queue\r\n\t\t\ttempQueue.get(0).setNodeVistied(true);\r\n\t\t\tnodes[tempQueue.get(0).gridPosition[0]][tempQueue.get(0).gridPosition[1]].setNodeVistied(true);\r\n\t\t\ttempQueue.remove(0);\t\r\n\t\t}\r\n\t\t//print out the end node\r\n\t\t//print out the total distance between two points\r\n\t\t//print out the total number node of path\r\n\t\t//End point not Found\r\n\t\t//System.out.println(\"End Point: \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[0]+1)+\" \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[1]+1));\r\n\t\t//System.out.println(\"Total number of nodes: \"+nodes[unexploreNode[0]][unexploreNode[1]].getTotPath().size());\r\n\t\tshortestPath = nodes[unexploreNode[0]][unexploreNode[1]].getTotPath();\r\n\t\tshortestPath.add(unexploreNode);\r\n\t\treturn shortestPath;\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\n\n\t\t\n\t\tdouble[] columnwise = {1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.};\n\t\tdouble[] condmat = {1.,3.,7.,9.};\n\t\tint[] matrixDimension = new int[10]; // dont except to ever use more than 4 cells. would by 99x99\n\n\tString[] inputARGNull = null ;\n\t\tArrayList<Integer> inputTestData = new ArrayList<>(Arrays.asList(11,2,3,6,11,18,45,88));\n\n//\t\tSystem.out.println();\n//\t\tSystem.out.println(inputTestData.toString());\n//\t\tSystem.out.println(\"Test Running Class: \" +this.getClass() ) ;\t\n//\t\tMatrix testRunMatrix = new Matrix(2, 3, inputTestData );\n\n\t\tMatrix testRunMatrix = new Matrix();\n\t\ttestRunMatrix.setName(\"testRunMatrix\");\n\t\ttestRunMatrix.displayCompact();\n//\t\tclearScreen();\n\n\t\tMatrix firstRunMatrixParams = new Matrix(3,3, inputTestData);\n\t\tfirstRunMatrixParams.setName(\"firstRunMatrixParams\");\n\t\tfirstRunMatrixParams.displayCompact();\n//\t\tclearScreen();\n\t\t\n\t\tMatrix secondRunMatrixParams = new Matrix(3,3, columnwise); // or condmat\n\t\tsecondRunMatrixParams.setName(\"secondRunMatrixParams\");\n\t\tsecondRunMatrixParams.displayCompact();\n//\t\tclearScreen();\n\t\t\n\t//\tfirstRunMatrixParams.displayDeepString();\n\t//\tsecondRunMatrixParams.displayDeepString();\n\t\tmatrixDimension[0]=2;\n\t\tmatrixDimension[1]=3;\n\t\n\t\tMatrix outOfSeqTestMatrix = new Matrix(matrixDimension, columnwise);\n\t\tsecondRunMatrixParams.setName(\"outOfSeqTestMatrix\");\n\t\tsecondRunMatrixParams.displayCompact();\n\t\t\n\t\tMatrix addResult = firstRunMatrixParams.Add(secondRunMatrixParams);\n\t\taddResult.setName(\"addResult\");\n\t\t\n\t\taddResult.displayCompact();\n//\t\tclearScreen();\n\t\t\n//\t\taddResult = addResult.Multiply((22/7));\n\t\taddResult = addResult.Multiply(3.623);\n\t\taddResult.displayMore();\n\t\t\n\t\t\n\t\tString[] testInput1 = new String[]{\"-c\",\"5x4\",\"12\", \"32\", \"43\", \"44\", \"5\",\"5\",\"5\",\"4\",\"4\",\".999999999\",\"0\",\"0\",\"0\",\"9\",\"4\",\"2.71826\",\"3.14159\",\"33\",\"11\",\"0.1136\",\"888\",\"7\",\"6\",\"5\"};\n\t\tInputStringObj myTestCase = new InputStringObj(\"-c\", testInput1);\n\t\tInputNumericObj myNumTest = new InputNumericObj(myTestCase);\n\t\t\n\t\tSystem.out.println(\"And Now a Matrix from a Numeric Object\");\n\n\t\tMatrix numObjBasedMatrix = new Matrix(myNumTest,\"TestMatrix.java_string\");\n\t\tnumObjBasedMatrix.setName(\"numObjBasedMatrix\");\n\t\tnumObjBasedMatrix.displayCompact();\n\tSystem.out.println(\"\");\n\tSystem.out.println(\"\");\n\t\tnumObjBasedMatrix.displayMore();\n\t\t\n\t\t\n//\t\tclearScreen();\n\t\t\n\t}", "@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 }", "public static void main(String[] args) throws Exception {\n Puzzle puzzle = new Puzzle(10, 10);\n ArrayList<Integer>[] row_clues = new ArrayList[puzzle.getRows()];\n ArrayList<Integer>[] column_clues = new ArrayList[puzzle.getColumns()];\n Integer[][] r_clues = {\n {1, 1, 2}, {2, 1, 3}, {2, 3}, {2, 5}, {1, 1},\n {7}, {3, 1}, {5}, {4}, {6}\n };\n Integer[][] c_clues = {\n {3, 1}, {7}, {3, 1}, {5}, {1, 3},\n {2, 1, 5}, {3, 3}, {3, 1}, {4}, {4}\n };\n for(int i = 0; i < r_clues.length; ++i) {\n row_clues[i] = new ArrayList<>(Arrays.asList(r_clues[i]));\n }\n for(int i = 0; i < c_clues.length; ++i) {\n column_clues[i] = new ArrayList<>(Arrays.asList(c_clues[i]));\n }\n puzzle.setRowClues(row_clues);\n puzzle.setColumnClues(column_clues);\n PuzzleSolver solver = new PuzzleSolver(puzzle);\n solver.solve();\n for(Board b : solver.getSolutions()) {\n System.out.println(b);\n }\n }", "public void run(int runIndex, String fullPath) throws ClassNotFoundException, IOException, JMException {\n long seed = (long) 100;//can be randomly seeded.\n RandomGenerator RG = new RandomGenerator(seed);\n\n MetricsUtilPlus utils_ = new MetricsUtilPlus();\n Properties config = new Properties();\n\n String configFile = \"HF_Config_Benchmark/RealProblemSetting.txt\";\n String algorithms[] = {\"NSGAII\", \"SPEA2\", \"IBEA\", \"mIBEA\", \"GDE3\"};\n\n try {\n config.load(new FileInputStream(configFile));\n } catch (IOException e) {\n e.printStackTrace();\n System.err.println(\"Failed to load configuration file!\");\n System.exit(-1);\n }\n\n int totalEval = Integer.parseInt(config.getProperty(\"MaxEvaluations\"));\n int decisionPoints = Integer.parseInt(config.getProperty(\"DecisionPoints\"));//50 iterations\n\n int arcSize = Integer.parseInt(config.getProperty(\"ArchiveSize\"));\n populationSize = Integer.parseInt(config.getProperty(\"PopulationSize\"));\n \n arcSize=100;\n populationSize=100;\n totalEval=250*100;\n totalEval=1000*100;\n \n //arcSize=30;\n //populationSize=30;\n //totalEval=30*50;\n\n //int populationSize = popSize;\n int fixedSolutionEvl = (int) (totalEval / decisionPoints);\n \n System.out.println(\"CF; decision=\"+decisionPoints+\";fixed=\"+fixedSolutionEvl+\";total=\"+totalEval);\n\n MetricsUtil util = new MetricsUtil();\n\n int maxEvals = Integer.parseInt(config.getProperty(\"MaxEvaluations\"));\n\n String SolutionType = config.getProperty(\"SolutionType\");\n int popSize = Integer.parseInt(config.getProperty(\"PopulationSize\"));\n \n popSize=100;\n //popSize=30;\n\n Problem[] problemInstances = new Problem[problemCreator.getQtdProblem()];\n int[] numberOfVar = new int[problemCreator.getQtdProblem()];\n double[] mutationProb = new double[problemCreator.getQtdProblem()];\n Operator[] mutations = new Operator[problemCreator.getQtdProblem()];\n\n //reference point for hypervolume calculation\n /*HyperVolumeMinimizationProblem hyp = new HyperVolumeMinimizationProblem();*/\n /*double[] truePFhypervolume = new double[problemCreator.getQtdProblem()];*/\n for (int problemIndex = 0; problemIndex < problemCreator.getQtdProblem(); problemIndex++) {\n\n problemInstances[problemIndex] = problemCreator.getProblemInstance(problemIndex);\n numberOfVar[problemIndex] = problemInstances[problemIndex].getNumberOfVariables();\n mutationProb[problemIndex] = (Double) 1.0 / numberOfVar[problemIndex];\n HashMap parameters = new HashMap();\n parameters.put(\"probability\", mutationProb[problemIndex]);\n double mutationDistributionIndex = Double.parseDouble(config.getProperty(\"MutationDistributionIndex\"));\n parameters.put(\"distributionIndex\", mutationDistributionIndex);\n String mutationType = config.getProperty(\"MutationType\");\n mutations[problemIndex] = new PolynomialMutation(mutationProb[problemIndex], mutationDistributionIndex);\n }\n\n LLHInterface[] algorithm = new LLHInterface[problemCreator.getQtdProblem()];\n\n System.out.println(\"Run \" + runIndex + \"....\");\n\n choiceFunction CF = new choiceFunction();\n\n for (int instanceIndex = 6; instanceIndex < problemInstances.length; instanceIndex++) {\n numberOfObj=problemInstances[instanceIndex].getNumberOfObjectives();\n reference = new double[numberOfObj];\n Arrays.fill(reference,1.0);\n minimumValues = new double[numberOfObj];\n maximumValues = new double[numberOfObj];\n\n for (int i = 0; i < numberOfObj; i++) {\n reference[i] = 1.0;\n }\n\n int remainEval = totalEval;\n List<S> inputPop = null;\n ArrayList<Integer> heuristicList = new ArrayList<Integer>();\n\n int chosenHeuristic = -1;\n\n QualityIndicators quality = new QualityIndicators();\n double[][] algorithmEffortArray = new double[algorithms.length][2];\n double[][] ROIArray = new double[algorithms.length][2];\n double[][] hyperVolumeArray = new double[algorithms.length][2];\n double[][] uniformDistributionArray = new double[algorithms.length][2];\n\n // for the purpose of computing hypervolume.\n initialiseExtremeValues();\n\n long[] elapsedTime = new long[algorithms.length];\n long[] lastInvokeTime = new long[algorithms.length];\n long[] executionTimeArray = new long[algorithms.length];\n for (int i = 0; i < algorithms.length; i++) {\n elapsedTime[i] = 0;\n }\n\n //initialise population for each instance which is used for each algorithm\n List<S> initialPopulation = ProblemCreator.generateInitialPopulation(problemInstances[instanceIndex], popSize);\n \n List[] resultSolutions = new List[algorithms.length];\n List[] inputSolutions = new List[algorithms.length];\n\n for (int i = 0; i < algorithms.length; i++) {\n inputSolutions[i] = new ArrayList(popSize);\n // at the beginning, all inputsolutions are set as the initialPopulation\n inputSolutions[i] = initialPopulation;\n resultSolutions[i] = new ArrayList(popSize);\n }\n LLHInterface eachAlgorithm = null;\n AlgorithmCreator ac = new AlgorithmCreator(problemInstances[instanceIndex]);\n System.out.println(problemInstances[instanceIndex].getName() + \" \" + problemInstances[instanceIndex].getNumberOfObjectives() + \" \" + problemInstances[instanceIndex].getNumberOfVariables());\n ac.setMaxEvaluationsAndPopulation(totalEval, populationSize);\n //Initialise the choice function matrix and get the initial algorithm\n for (int algorithmIndex = 0; algorithmIndex < algorithms.length; algorithmIndex++) {\n //initialise last invoke time (the start time of calling this algorithm) of each algorithm;\n heuristicList.add(algorithmIndex);\n lastInvokeTime[algorithmIndex] = System.currentTimeMillis();\n\n eachAlgorithm=ac.create(algorithmIndex, remainEval);\n\n long startTime = System.currentTimeMillis();\n\n try {\n resultSolutions[algorithmIndex] = eachAlgorithm.execute(/*initialPopulation*/inputSolutions[algorithmIndex], fixedSolutionEvl);\n } catch (Exception e) {\n e.printStackTrace();\n }\n //record the execution time of each algorithm\n long executionTime = System.currentTimeMillis() - startTime;\n executionTimeArray[algorithmIndex] = executionTime;\n\n remainEval -= fixedSolutionEvl;\n\n //iteration += 2;\n inputSolutions[algorithmIndex] = resultSolutions[algorithmIndex];\n //After executed the algorithm, compute the elapsed time. The end time of called this algorithm\n\n }// end algorithmIndex, executing each algorithm for initialisation the choice function matrix\n\n //update elapsed time of since the heuristic was last called.\n for (int i = 0; i < algorithms.length; i++) {\n elapsedTime[i] = System.currentTimeMillis() - lastInvokeTime[i];\n }\n\n // find worst points and best points for all the three populations\n for (int i = 0; i < algorithms.length; i++) {\n updateExtremeValues(resultSolutions[i]);\n }\n\n for (int i = 0; i < algorithms.length; i++) {\n algorithmEffortArray[i][0] = i;\n algorithmEffortArray[i][1] = quality.getAlgorithmEffort(executionTimeArray[i], fixedSolutionEvl);\n\n ROIArray[i][0] = i;\n ROIArray[i][1] = quality.getRatioOfNonDominatedIndividuals(resultSolutions[i]);\n\n hyperVolumeArray[i][0] = i;\n\n hyperVolumeArray[i][1] = computeScaledHypervolume(resultSolutions[i]);\n //hyperVolumeArray[i][1] = quality.getHyperVolume(resultSolutions[i],realReference);\n\n uniformDistributionArray[i][0] = i;\n uniformDistributionArray[i][1] = quality.getUniformDistribution(resultSolutions[i]);\n\n }\n\n int numberOfMeasures = 4;\n int alpha = 30;//alpha =100;//if turbine number is 30\n\n chosenHeuristic = CF.getMaxChoiceFunction(algorithmEffortArray, 0, ROIArray, 1, hyperVolumeArray, 1,\n uniformDistributionArray, 1, numberOfMeasures, alpha, elapsedTime);\n //start time of the chosen heuristic\n lastInvokeTime[chosenHeuristic] = System.currentTimeMillis();\n\n //the result population of the chosen heuristic is served as the input population\n inputPop = resultSolutions[chosenHeuristic];\n\n while (remainEval > 0) {\n algorithm[instanceIndex]=ac.create(chosenHeuristic, remainEval);\n\n long beginTime = System.currentTimeMillis();\n //execute the chosen algorithm\n heuristicList.add(chosenHeuristic);\n if (fixedSolutionEvl > remainEval) {\n fixedSolutionEvl = remainEval;\n }\n //warranty size. necessary for small pop\n Random rsn=new SecureRandom();\n while(inputPop.size() < populationSize){\n inputPop.add(inputPop.get(rsn.nextInt(inputPop.size())));\n }\n resultSolutions[chosenHeuristic] = algorithm[instanceIndex].execute(inputPop, fixedSolutionEvl);\n inputPop = resultSolutions[chosenHeuristic];\n \n remainEval -= fixedSolutionEvl;\n\n // update executionTimeArray\n executionTimeArray[chosenHeuristic] = System.currentTimeMillis() - beginTime;\n //update elapsed time of since the heuristic was last called.\n for (int i = 0; i < algorithms.length; i++) {\n elapsedTime[i] = System.currentTimeMillis() - lastInvokeTime[i];\n }\n\n algorithmEffortArray[chosenHeuristic][1] = quality.getAlgorithmEffort(executionTimeArray[chosenHeuristic], fixedSolutionEvl);\n\n ROIArray[chosenHeuristic][1] = quality.getRatioOfNonDominatedIndividuals(resultSolutions[chosenHeuristic]);\n\n updateExtremeValues(resultSolutions[chosenHeuristic]);\n hyperVolumeArray[chosenHeuristic][1] = computeScaledHypervolume(resultSolutions[chosenHeuristic]);\n //hyperVolumeArray[chosenHeuristic][1] = quality.getHyperVolume(resultSolutions[chosenHeuristic],realReference);\n\n uniformDistributionArray[chosenHeuristic][1] = quality.getUniformDistribution(resultSolutions[chosenHeuristic]);\n\n chosenHeuristic = CF.getMaxChoiceFunction(algorithmEffortArray, 0, ROIArray, 1, hyperVolumeArray, 1,\n uniformDistributionArray, 1, numberOfMeasures, alpha, elapsedTime);\n //start time of the chosen heuristic\n lastInvokeTime[chosenHeuristic] = System.currentTimeMillis();\n\n //heuristicList.add(chosenHeuristic);\t\t\n }//end while(remainEvl >0)\n \n String arrayListPath = fullPath+\"/\"+problemCreator.getProblemClass() + (instanceIndex + 1) + \"_ChosenHeuristic.txt\";\n utils_.printArrayListInteger(heuristicList, arrayListPath);\n List<S> obtainedSolutionSet = SolutionListUtils.getNondominatedSolutions(inputPop);\n new SolutionListOutput(obtainedSolutionSet)\n .setSeparator(\"\\t\")\n .setFunFileOutputContext(new DefaultFileOutputContext(fullPath+\"/\"+problemCreator.getProblemClass() + (instanceIndex + 1) + \"CF_FinalParetoFront\"\n + runIndex + \".txt\"))\n .print();\n //print out true front's hypervolume\n\n }//end each problem instance\n\n System.out.println(\"Finished\");\n\n }", "Solution(){\n\n n = scanner.nextInt();\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n a = new int[n+1];\n\n \n for (int i = 1; i <= n; i++) {\n a[i] = scanner.nextInt();\n }\n Graph graph=new Graph(a);\n for(int i=0;i<n-1;i++) {\n \tint node1=scanner.nextInt();\n \tint node2=scanner.nextInt();\n \tgraph.addEdge(node1, node2);\n \t//System.out.println(node1+\" \"+node2);\n }\n //graph.dump();\n int q=scanner.nextInt();\n while(q-- > 0) {\n \tint u=scanner.nextInt();\n \tint d=scanner.nextInt();\n \tint k=scanner.nextInt();\n \t//System.out.println(\"u:\"+u+\" d:\"+d+\" k:\"+k);\n \tSystem.out.println(graph.DFS(u, d, k));\n }\n scanner.close();\n\t\t\n\t}", "public void minimisation4( ArrayList<Node>convrt1, Topology tp)\n {\n for ( int i=0; i<tp.getNodes().size(); i++ )\n {\n Node n= tp.getNodes().get(i);\n List<Link>allLinks = n.getLinks();\n boolean allLinksConnected= true;\n for ( int j=0; j<allLinks.size();j++ )\n {\n Link l= allLinks.get(j);\n if ( l.getColor()!=Color.orange)\n allLinksConnected=false;\n }\n List<Node> neighbors= n.getNeighbors();\n boolean allNeighborsConvert=true;\n for ( int j=0; j<neighbors.size();j++ )\n {\n Node n1= neighbors.get(j);\n if ( (convrt1.contains(n1))== false )\n {\n allNeighborsConvert=false;\n }\n }\n if ( allLinksConnected==true && allNeighborsConvert==true )\n {\n if ( n instanceof Ipv6)\n {\n ((Ipv6) n).setType(\"Conv\");\n n.setIcon(\"./src/img/Conv.png\");\n convrt1.add(n);\n }\n else if ( n instanceof Ipv4)\n {\n ((Ipv4) n).setType(\"Conv\");\n n.setIcon(\"./src/img/Conv.png\");\n convrt1.add(n);\n }\n\n for ( int m=0; m< n.getNeighbors().size(); m++ )\n {\n Node n2= n.getNeighbors().get(m);\n if ( n2 instanceof Ipv6)\n {\n ((Ipv6) n2).setType(\"IPV6\");\n n2.setIcon(\"./src/img/ipv6.png\");\n convrt1.remove(n2);\n }\n else if ( n2 instanceof Ipv4)\n {\n ((Ipv4) n2).setType(\"IPV4\");\n n2.setIcon(\"./src/img/ipv4.png\");\n convrt1.remove(n2);\n }\n }\n }\n }\n }", "public void showDisplaySolution(Solution<Position> solution);", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br= new BufferedReader(new InputStreamReader (System.in));\n\t\tBufferedWriter bw= new BufferedWriter(new OutputStreamWriter(System.out));\n\t\tString[] str;\n\t\tstr=br.readLine().split(\" \");\n\t\tint n=Integer.parseInt(str[0]);\n\t\tint m=Integer.parseInt(str[1]);\n\t\tint[][] num=new int[n][n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tstr=br.readLine().split(\" \");\n\t\t\tfor(int j=0;j<n;j++) {num[i][j]=Integer.parseInt(str[j]);}\n\t\t}\n\t\tint [][] loc=new int[4][m];\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tstr=br.readLine().split(\" \");\n\t\t\tloc[0][i]=Integer.parseInt(str[0])-1;\n\t\t\tloc[1][i]=Integer.parseInt(str[1])-1;\n\t\t\tloc[2][i]=Integer.parseInt(str[2])-1;\n\t\t\tloc[3][i]=Integer.parseInt(str[3])-1;\n\t\t}\n\t\tint[][] sumDP=new int[n][n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<n;j++) {\n\t\t\t\tif(i==0) {\n\t\t\t\t\tif(j==0) sumDP[i][j]=num[i][j];\n\t\t\t\t\telse sumDP[i][j]=num[i][j]+sumDP[i][j-1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(j==0) sumDP[i][j]=num[i][j]+sumDP[i-1][j];\n\t\t\t\t\telse{\n\t\t\t\t\t\tsumDP[i][j]=num[i][j]+sumDP[i-1][j]+sumDP[i][j-1]-sumDP[i-1][j-1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tint x1=loc[0][i];\n\t\t\tint y1=loc[1][i];\n\t\t\tint x2=loc[2][i];\n\t\t\tint y2=loc[3][i];\n\t\t\tint ans;\n\t\t\tif(x1==0&&y1==0) ans=sumDP[x2][y2];\n\t\t\telse if(x1==0) ans=sumDP[x2][y2]-sumDP[x2][y1-1];\n\t\t\telse if(y1==0) ans=sumDP[x2][y2]-sumDP[x1-1][y2];\n\t\t\telse ans=sumDP[x2][y2]-sumDP[x1-1][y2]-sumDP[x2][y1-1]+sumDP[x1-1][y1-1];\n\t\t\tbw.write(String.valueOf(ans)+\"\\n\");\n\t\t}\n\t\t\n\t\tbr.close();\n\t\tbw.close();\n\t}", "public static void main(String args[]) throws IOException {\n int[] distance = new int[999 * 999]; // 999 is the max size of rows and cols\n int[] grid = new int[999 * 999];\n int tests = Integer.parseInt(getLine().trim());\n for (int i = 1; i <= tests; i++) {\n int rows = Integer.parseInt(getLine().trim());\n int cols = Integer.parseInt(getLine().trim());\n for (int r = 0; r < rows; r++) {\n StringTokenizer st = new StringTokenizer(getLine());\n for (int c = 0; c < cols; c++) {\n grid[r * cols + c] = Integer.parseInt(st.nextToken());\n }\n }\n\n int goal = (rows - 1) * cols + (cols - 1);\n int start = 0;\n Arrays.fill(distance, 0, rows * cols, INFINITY);\n distance[start] = grid[0];\n CustomPriorityQueue pq = new CustomPriorityQueue();\n pq.add(new Tuple(grid[0], start), grid[0]);\n while (!pq.isEmpty()) {\n Tuple current = pq.remove();\n if (distance[current.cell] < current.d); // we know shorter path already\n if (current.cell == goal) break;\n int r = current.cell / cols;\n int c = current.cell % cols;\n for (int j = 0; j < DELTA_R.length; j++) {\n int nr = r + DELTA_R[j];\n int nc = c + DELTA_C[j];\n if (nr < 0 || nr >= rows || nc < 0 || nc >= cols) continue; // out of bounds\n int next = nr * cols + nc;\n if (distance[next] > distance[current.cell] + grid[next]) {\n distance[next] = distance[current.cell] + grid[next];\n pq.add(new Tuple(distance[next], next), grid[next]);\n }\n }\n }\n\n out.println(distance[goal]);\n }\n out.close();\n }", "public static void makeMatrix()\n {\n\n n = Graph.getN();\n m = Graph.getM();\n e = Graph.getE();\n\n connectMatrix = new int[n][n];\n\n // sets the row of value u and the column of value v to 1 (this means they are connected) and vice versa\n // vertices are not considered to be connected to themselves.\n for(int i = 0; i < m;i++)\n {\n connectMatrix[e[i].u-1][e[i].v-1] = 1;\n connectMatrix[e[i].v-1][e[i].u-1] = 1;\n }\n }", "public static void main(String[] args) { Create and add our cities\n//\n try {\n // read file content from file\n StringBuffer sb= new StringBuffer(\"\");\n\n FileReader reader = new FileReader(\"location.txt\");\n BufferedReader br = new BufferedReader(reader);\n\n String str = null;\n\n while((str = br.readLine()) != null) {\n// sb.append(str+\"/n\");\n String []info = new String[3];\n String cityName;\n int locationX;\n int locationY;\n info = str.split(\" \");\n cityName = info[0];\n locationX = Integer.parseInt(info[1]);\n locationY = Integer.parseInt(info[2]);\n City city = new City(locationX, locationY, cityName);\n TourManager.addCity(city);\n }\n\n br.close();\n reader.close();\n\n\n }\n catch(FileNotFoundException e) {\n e.printStackTrace();\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n\n\n // Set initial temp\n double temp = 1000000;\n\n // Cooling rate\n double coolingRate = 0.00001;\n\n // Initialize intial solution\n Tour currentSolution = new Tour();\n currentSolution.generateIndividual();\n\n System.out.println(\"Initial solution distance: \" + currentSolution.getDistance());\n\n // Set as current best\n Tour best = new Tour(currentSolution.getTour());\n\n // Loop until system has cooled\n while (temp > 1) {\n // Create new neighbour tour\n Tour newSolution = new Tour(currentSolution.getTour());\n\n // Get a random positions in the tour\n int tourPos1 = (int) (newSolution.tourSize() * Math.random());\n int tourPos2 = (int) (newSolution.tourSize() * Math.random());\n\n // Get the cities at selected positions in the tour\n City citySwap1 = newSolution.getCity(tourPos1);\n City citySwap2 = newSolution.getCity(tourPos2);\n\n // Swap them\n newSolution.setCity(tourPos2, citySwap1);\n newSolution.setCity(tourPos1, citySwap2);\n\n // Get energy of solutions\n int currentEnergy = currentSolution.getDistance();\n int neighbourEnergy = newSolution.getDistance();\n\n // Decide if we should accept the neighbour\n if (acceptanceProbability(currentEnergy, neighbourEnergy, temp) > Math.random()) {\n currentSolution = new Tour(newSolution.getTour());\n }\n\n // Keep track of the best solution found\n if (currentSolution.getDistance() < best.getDistance()) {\n best = new Tour(currentSolution.getTour());\n }\n\n // Cool system\n temp *= 1-coolingRate;\n }\n\n System.out.println(\"Final solution distance: \" + best.getDistance());\n System.out.println(\"Tour: \" + best);\n FinalGraph.drawGraph();\n }", "public static void main(String[] args) throws Exception {\n\t\tsc.init();\n\t\tanswer = 0;\n\t\tN = sc.nextInt(); // 2~1000\n\t\tM = sc.nextInt(); // 2~1000\n\t\tlattice = new boolean[N][M]; // 1,1부터 시작\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tfor (int j = 0; j < M; j++) {\n\t\t\t\tlattice[i][j] = (sc.nextInt() == 0) ? false : true;\n\t\t\t}\n\t\t}\n\t\t// 상하좌우 둘레 모두 true로 변경\n\t\t/*\n\t\t * for (int i = 0; i < N+2; i++) { lattice[0][i] = true; lattice[i][0] = true;\n\t\t * lattice[N+1][i] = true; lattice[i][N+1] = true; }\n\t\t */\n\t\tH = sc.nextInt(); // 1 ~ N\n\t\tW = sc.nextInt(); // 1 ~ M\n\t\tSr = sc.nextInt() - 1; // 1 ~ N-H+1 // 1,1부터\n\t\tSc = sc.nextInt() - 1;\n\t\tFr = sc.nextInt() - 1; // 1 ~ N-H+1\n\t\tFc = sc.nextInt() - 1; // 1 ~ M-W+1 //\n\n\t\tint n = N - H + 1;\n\t\tint m = M - W + 1;\n\t\tmap = new boolean[n][m];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\tmap[i][j] = check(i, j);\n\t\t\t}\n\t\t}\n\n\t\tif (calc(0)) {\n\t\t\tSystem.out.println(answer);\n\t\t} else {\n\t\t\tSystem.out.println(-1);\n\t\t}\n\t}", "public void Generator(Graph<MyNode, MyEdge> Graph, ArrayList<MySFC> S,int R,int x,int y,int z) {\n Map<MyEdge, Integer> r_e2 = new HashMap<>();\n for (MyEdge e : Graph.getEdges()) r_e2.put(e, r_e.get(e));\n Map<MyNode, Integer> r_n2 = new HashMap<>();\n for (MyNode n : Graph.getVertices()) r_n2.put(n, r_n.get(n));\n /**Sort SFC set in reverse order*/\n S.sort(new MyComparator());\n whole:for (MySFC s : S) {\n /**Deep copy of graph*/\n Graph<MyNode, MyEdge> Copy_Graph = Clone_Graph(Graph);\n /**Remove links which don't have enough capacity*/\n for (MyEdge e : Copy_Graph.getEdges()) if (s.Demand_Link_Resource > r_e.get(find_edge(e))) Copy_Graph.removeEdge(e);\n /**finding shortest path*/\n DijkstraShortestPath<MyNode, MyEdge> ds = new DijkstraShortestPath<>(Copy_Graph, new MyTransformer());\n DijkstraDistance<MyNode, MyEdge> dd = new DijkstraDistance<>(Copy_Graph);\n List<MyEdge> path;\n MyNode source = find_original_Node(Copy_Graph, s.source);\n MyNode sink = find_original_Node(Copy_Graph, s.sink);\n if (dd.getDistance(source, sink) != null) path = ds.getPath(source, sink);\n else {\n cost_link = 0;\n cost_node = 0;\n break whole;\n }\n Graph<MyNode, MyEdge> p = Dijkstra_Path(Copy_Graph, path, source);\n for (int i = 0; i < R; i++) {\n Map<MyNode, Set<MyVNF>> Deploy_List = new HashMap<>();\n ArrayList<MyNode> U = new ArrayList<MyNode>(p.getVertices());\n MyNode before = source;\n for (MyVNF f : s.VNF) {\n U = Capacity_Confirm(U, f, r_n2);\n if (U.size() != 0)before = Deploy_Value(U, Copy_Graph, p, Deploy_List, r_n2, f, s, x, y, z);\n else {\n step1:for (;;) {\n /**selecting the before and next node*/\n MyNode next = find_original_Node(Copy_Graph, Next_Generator(p, s.source, before));\n MyEdge e = Copy_Graph.findEdge(before, next);\n Copy_Graph.removeEdge(e);\n Graph_Modificator(Copy_Graph, p, before, next, s);\n step2:for (;;){\n dd = new DijkstraDistance<>(Copy_Graph,new MyTransformer());\n ds = new DijkstraShortestPath<>(Copy_Graph, new MyTransformer());\n List<MyEdge> path2 = new ArrayList<>();\n if (dd.getDistance(before, next) != null) {\n path2 = ds.getPath(before, next);\n Graph<MyNode, MyEdge> p2 = Dijkstra_Path(Copy_Graph, path2, source);\n for (MyNode n : p2.getVertices()) if(before.Node_Num!= n.Node_Num&&next.Node_Num!=n.Node_Num)U.add(n);\n if(U.size()!=0)Capacity_Confirm(U, f, r_n2);\n if (U.size() != 0) {\n List<MyEdge> path3 = new ArrayList<MyEdge>(path);\n path3.remove(e);\n path3.addAll(path2);\n Graph<MyNode, MyEdge> p3 = Dijkstra_Path(Graph, path3, source);\n before = find_original_Node(Copy_Graph,Deploy_Value(U, Graph, p3, Deploy_List, r_n2, f, s, x, y, z));\n U = List_Modificator(U, p3, before, source);\n p = p3;\n path = new ArrayList<MyEdge>(p3.getEdges());\n break step1;\n } else {\n ArrayList<MyNode> nl = new ArrayList<>(p2.getNeighbors(find_original_Node(p2,before)));\n Copy_Graph.removeEdge(Copy_Graph.findEdge(find_original_Node(Copy_Graph, nl.get(0)), find_original_Node(Copy_Graph, before)));\n }\n } else {\n before = next;\n if (before.Node_Num == s.sink.Node_Num) {\n cost_link = 0;\n cost_node = 0;\n break whole;\n } else break step2;\n }\n }\n }\n }\n }\n }\n if (cost_node != 0) for (MyEdge e : p.getEdges()) cost_link += c_e.get(find_edge(e)) * s.Demand_Link_Resource;\n }\n }" ]
[ "0.7103598", "0.6949163", "0.6776092", "0.59926", "0.5966199", "0.58689094", "0.58575433", "0.5840483", "0.58188397", "0.5809826", "0.5762031", "0.5747708", "0.5729642", "0.57146055", "0.57135314", "0.5709698", "0.5706267", "0.56991947", "0.5673222", "0.5671134", "0.56220317", "0.56132364", "0.56032175", "0.5597839", "0.55872095", "0.5586771", "0.5557562", "0.5541612", "0.55357236", "0.5532115", "0.55275947", "0.5480961", "0.54786855", "0.5474617", "0.5449615", "0.5445916", "0.5380507", "0.5372761", "0.5345609", "0.5345189", "0.5342895", "0.533413", "0.53292394", "0.53274244", "0.5320551", "0.53146034", "0.5311856", "0.53072816", "0.5302048", "0.52928394", "0.5271755", "0.5248147", "0.52466863", "0.5237039", "0.52345216", "0.5233685", "0.52277046", "0.5226389", "0.52263373", "0.5222868", "0.5210918", "0.5201268", "0.5197505", "0.51938295", "0.51923513", "0.5189611", "0.5184202", "0.51783293", "0.5177993", "0.51763344", "0.5174756", "0.51745826", "0.5173143", "0.51692647", "0.51636696", "0.5162101", "0.51617664", "0.51546556", "0.5148627", "0.5147677", "0.51476145", "0.5146324", "0.5144882", "0.5129746", "0.51257056", "0.51136994", "0.51096153", "0.5108914", "0.51085156", "0.51040554", "0.5103429", "0.5100101", "0.5098251", "0.5095183", "0.50913864", "0.5090333", "0.5084964", "0.5080548", "0.5078323", "0.50730085" ]
0.72903246
0
holds the current contact
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_contact_detail); Contacts.loadData(this); // Get the selected contact ID from intent arguments int contactPosition = getIntent().getIntExtra(ARG_ITEM_ID, 0); mContact = Contacts.LIST.get(contactPosition); // Set up collapsing toolbar Toolbar toolbar = (Toolbar) findViewById(R.id.detail_toolbar); setSupportActionBar(toolbar); // Show the Up button in the action bar. ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); } // Set contact name and image in toolbar CollapsingToolbarLayout appBarLayout = (CollapsingToolbarLayout) findViewById(R.id.toolbar_layout); final ImageView appBarImage = (ImageView) findViewById(R.id.detail_toolbar_image); if (appBarLayout != null) { appBarLayout.setTitle(mContact.getName()); Picasso.with(this) .load(mContact.getPictureUrl()) .placeholder(R.drawable.default_contact) .error(R.drawable.default_contact) .into(appBarImage); } // Get contact detail views TextView email = ((TextView) findViewById(R.id.contact_detail_email)); TextView number = ((TextView) findViewById(R.id.contact_detail_number)); TextView title = ((TextView) findViewById(R.id.contact_detail_title)); TextView linkedIn = ((TextView) findViewById(R.id.contact_detail_linkedin)); // Set contact details inside appropriate views email.setText(mContact.getEmail()); number.setText(mContact.getNumber()); title.setText(mContact.getTitle()); linkedIn.setText("LinkedIn"); // Set onClick listeners to make the app more useful email.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:" + mContact.getEmail())); startActivity(intent); } }); number.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + mContact.getNumber())); startActivity(intent); } }); linkedIn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(mContact.getLinkedInUrl())); startActivity(intent); } }); // Set up floating action button, add to contacts when clicked FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(ContactsContract.Intents.Insert.ACTION); intent.setType(ContactsContract.RawContacts.CONTENT_TYPE); intent.putExtra(ContactsContract.Intents.Insert.EMAIL, mContact.getEmail()); intent.putExtra(ContactsContract.Intents.Insert.EMAIL_TYPE, ContactsContract.CommonDataKinds.Email.TYPE_WORK); intent.putExtra(ContactsContract.Intents.Insert.PHONE, mContact.getNumber()); intent.putExtra(ContactsContract.Intents.Insert.NAME, mContact.getName()); intent.putExtra(ContactsContract.Intents.Insert.COMPANY, "AppCentrica"); intent.putExtra(ContactsContract.Intents.Insert.JOB_TITLE, mContact.getTitle()); // Contact picture is a bit different since we have to pass the bitmap as a byte array ByteArrayOutputStream stream = new ByteArrayOutputStream(); Bitmap contactPicture = ((BitmapDrawable) appBarImage.getDrawable()).getBitmap(); contactPicture.compress(Bitmap.CompressFormat.PNG, 100, stream); ArrayList<ContentValues> data = new ArrayList<>(); ContentValues row = new ContentValues(); row.put(ContactsContract.Contacts.Data.MIMETYPE, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE); row.put(ContactsContract.CommonDataKinds.Photo.PHOTO, stream.toByteArray()); data.add(row); intent.putParcelableArrayListExtra(ContactsContract.Intents.Insert.DATA, data); startActivity(intent); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getContact() {\r\n return this.contact;\r\n }", "public String getContact() {\n\t\treturn contact;\n\t}", "public String getContact() {\n return contact;\n }", "public String getContact() {\n return contact;\n }", "public String getContact() {\n return contact;\n }", "public String getContact() {\n return contact;\n }", "public String getContact() {\n return contact;\n }", "public Contact getContact() {\n return contact;\n }", "public Contact getContact() {\n return contact;\n }", "public SourceContact getContact()\n {\n return contact;\n }", "public kr.pik.message.Profile.Contact getContact() {\n kr.pik.message.Profile.Contact result = kr.pik.message.Profile.Contact.valueOf(contact_);\n return result == null ? kr.pik.message.Profile.Contact.UNRECOGNIZED : result;\n }", "public ContactInfo getContactInfo() {\n\n return contactInfo;\n }", "public kr.pik.message.Profile.Contact getContact() {\n kr.pik.message.Profile.Contact result = kr.pik.message.Profile.Contact.valueOf(contact_);\n return result == null ? kr.pik.message.Profile.Contact.UNRECOGNIZED : result;\n }", "public BwContact getContact() {\n if (contact == null) {\n contact = new BwContact();\n }\n\n return contact;\n }", "public String getUserContact() {\r\n return userContact;\r\n }", "public com.vmware.converter.DVSContactInfo getContact() {\r\n return contact;\r\n }", "public int getContactValue() {\n return contact_;\n }", "public int getContactID() {\r\n return contactID;\r\n }", "@NoProxy\n @NoDump\n public BwContact getContact() {\n Set<BwContact> c = getContacts();\n if ((c == null) || (c.isEmpty())) {\n return null;\n }\n\n return c.iterator().next();\n }", "public String getContactPerson() {\n return contactPerson;\n }", "public String getContactPerson() {\n return _contactPerson;\n }", "public void setContact(Contact contact) {\n this.contact = contact;\n }", "public void setContact(Contact contact) {\n this.contact = contact;\n }", "public long getContactId() {\n return contactId;\n }", "public int getContactId() {\n return contactId;\n }", "public ContactInfo[] getContactInfo() {\n return contactInfo;\n }", "kr.pik.message.Profile.Contact getContact();", "@Override\n @XmlElement(name = \"contactInfo\")\n public synchronized Contact getContactInfo() {\n return contactInfo;\n }", "public Contact getOldContact() {\n\t\treturn oldContact;\n\t}", "public int getContactValue() {\n return contact_;\n }", "public String getContactName() {\r\n return contactName;\r\n }", "private void getIncomingContactData() {\n // create bundle object that refers to the bundle inside the intent\n Bundle extras = getIntent().getExtras();\n contact = getObjectFromJSONString( extras.getString(\"CONTACT\") );\n displayContactDetails();\n }", "public String getPrimaryContact();", "public String getContactName() {\n return contactName;\n }", "com.polytech.spik.protocol.SpikMessages.Contact getContact();", "public Long getContactId() {\n return contactId;\n }", "public String getContactInstanceReference() {\n return contactInstanceReference;\n }", "public Map<String, Integer> getCurrentContacts() {\n\t\tcurrentUser = userCatalog.getUser(currentUser.getId());\n\t\tHashMap<String, Integer> result = new HashMap<String, Integer>();\n\t\ttry {\n\t\t\tcurrentUser.getContacts().stream().forEach(contact -> {\n\t\t\t\tresult.put(contact.getName(), contact.getId());\n\t\t\t});\n\t\t} catch (NullPointerException e) {\n\t\t\t// Can't stop the view's access while switching users,\n\t\t\t// App will just try again after loading.\n\t\t\treturn null;\n\t\t}\n\t\treturn result;\n\t}", "public Contact getContact() {\n Long __key = this.ContactId;\n if (contact__resolvedKey == null || !contact__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n ContactDao targetDao = daoSession.getContactDao();\n Contact contactNew = targetDao.load(__key);\n synchronized (this) {\n contact = contactNew;\n \tcontact__resolvedKey = __key;\n }\n }\n return contact;\n }", "private void requestContactInformation() {\n CONTACTS = new ArrayList<>();\n\n Cursor c = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + \" asc\");\n\n while(c.moveToNext()) {\n HashMap<String, String> map = new HashMap<String, String>();\n String id = c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY));\n\n Cursor phoneCursor = getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + id,\n null, null\n );\n\n if (phoneCursor.moveToFirst()) {\n String number = phoneCursor.getString(phoneCursor.getColumnIndex(\n ContactsContract.CommonDataKinds.Phone.NUMBER\n ));\n CONTACTS.add(Pair.create(name, number));\n }\n\n phoneCursor.close();\n }\n\n }", "public void setContact(String contact) {\n this.contact = contact;\n }", "public void setContact(String contact) {\n this.contact = contact;\n }", "public void setContact(String contact) {\n this.contact = contact;\n }", "public void setContact(String contact) {\n this.contact = contact;\n }", "public String getContactId() {\n return this.contactId;\n }", "public java.lang.String getContactId() {\r\n return contactId;\r\n }", "public Observable<Contact> getContact() {\n return RxPaper.book(CONTACT_BOOK).read(ACTIVE_CONTACT_KEY);\n }", "public ArrayList getAccountContact() {\n\t\treturn AccountContact;\n\t}", "public String getPrefContactId() {\n return getContact().getUid();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getContact() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CONTACT_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getContact() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CONTACT_PROP.get());\n }", "public org.hl7.fhir.Contact getContact()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Contact target = null;\n target = (org.hl7.fhir.Contact)get_store().find_element_user(CONTACT$6, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public Object getCustomerContactRecord() {\n return customerContactRecord;\n }", "public boolean hasContact() {\n return typeCase_ == 1;\n }", "public org.hl7.fhir.Contact addNewContact()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Contact target = null;\n target = (org.hl7.fhir.Contact)get_store().add_element_user(CONTACT$6);\n return target;\n }\n }", "public void setContact(String contact) {\n\t\tthis.contact = contact;\n\t}", "public String getContactID() {\n\t\t\treturn contactID;\n\t\t}", "public String getContactString() {\n Logger.d(TAG, \"getContactString() entry mContactString is \"\n + mContactString);\n return mContactString;\n }", "public java.lang.String getContactNo() {\r\n return contactNo;\r\n }", "public void addContact() {\n\t\tif (contactCounter == contactList.length) {\n\t\t\tSystem.err.println(\"Maximum contacts reached. \"\n\t\t\t\t\t\t\t\t+ \"No more contact can be added\");\n\t\treturn;\n\t\t}\n\t\t\n\t\treadContactInfo();\t\n\t}", "public boolean hasContact() {\n return typeCase_ == 1;\n }", "public int getIndex() {\r\n\t\treturn personToContact;\r\n\t}", "public java.lang.String getPrimaryContact() {\n return primaryContact;\n }", "public Contact getLocalContact()\n {\n if(localContact != null)\n return localContact;\n\n final BareJid id;\n try\n {\n id = JidCreate.from(parentProvider.getAccountID().getUserID()).asBareJid();\n }\n catch (XmppStringprepException e)\n {\n return null;\n }\n\n localContact\n = new ContactJabberImpl(null, ssContactList, false, true);\n localContact.setLocal(true);\n localContact.updatePresenceStatus(currentStatus);\n localContact.setJid(parentProvider.getOurJID());\n\n Map<FullJid, ContactResourceJabberImpl> rs = localContact.getResourcesMap();\n\n if(currentPresence != null)\n rs.put(parentProvider.getOurJID().asFullJidIfPossible(),\n createResource( currentPresence,\n parentProvider.getOurJID().asFullJidIfPossible(),\n localContact));\n\n for (Presence p : ssContactList.getPresences(id))\n {\n FullJid fullJid = p.getFrom().asFullJidIfPossible();\n rs.put(fullJid, createResource(\n p,\n p.getFrom().asFullJidIfPossible(),\n localContact));\n }\n\n // adds xmpp listener for changes in the local contact resources\n StanzaFilter presenceFilter = new StanzaTypeFilter(Presence.class);\n parentProvider.getConnection()\n .addAsyncStanzaListener(\n new StanzaListener()\n {\n @Override\n public void processStanza(Stanza packet)\n {\n Presence presence = (Presence) packet;\n Jid from = presence.getFrom();\n\n if(from == null || !from.asBareJid().equals(id))\n return;\n\n // own resource update, let's process it\n updateResource(localContact, null, presence);\n }\n }, presenceFilter);\n\n return localContact;\n }", "public Object getCustomerContactRecordContactDialogueRecord() {\n return customerContactRecordContactDialogueRecord;\n }", "private void addContact(Contact contact) {\n contactList.add(contact);\n System.out.println(\"contact added whose name is : \" + contact.getFirstName() + \" \" + contact.getLastName());\n\n }", "public java.lang.Object getInitiatingContactID() {\n return initiatingContactID;\n }", "public String getContactAddress() {\n\n \n return contactAddress;\n\n }", "public boolean isContactSelected() {\n\t\treturn (currentContact != null);\n\t}", "@Override\n\tpublic String addContact(Contact contact) {\n\t\treturn null;\n\t}", "public int getContactUserId() {\n return contactUserId;\n }", "public Object getCustomerContactActivityRecord() {\n return customerContactActivityRecord;\n }", "public String getContacts() {\n return contacts;\n }", "public String getContacto() {\r\n\t\treturn contacto;\r\n\t}", "public BwString getContactName() {\n if (contactName == null) {\n contactName = new BwString();\n }\n\n return contactName;\n }", "public String getContactPhone() {\n return contactPhone;\n }", "public String getContactPhone() {\n return contactPhone;\n }", "public String getContactFirstName() {\n\n \n return contactFirstName;\n\n }", "@Override\n public void onChanged(@Nullable final Contact contactFromDb) {\n contact = contactFromDb;\n notifyContactChanged();\n }", "public Long getIsContactPoint() {\n return isContactPoint;\n }", "public java.util.List<org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact> getContactList() {\n return contact_;\n }", "public String getCompanyContact() {\n\t\treturn companyContact;\n\t}", "public int getContactCount() {\n return contact_.size();\n }", "public boolean isSetContact() {\n return this.contact != null;\n }", "public com.polytech.spik.protocol.SpikMessages.Contact getContact() {\n if (typeCase_ == 1) {\n return (com.polytech.spik.protocol.SpikMessages.Contact) type_;\n }\n return com.polytech.spik.protocol.SpikMessages.Contact.getDefaultInstance();\n }", "public void setPrimaryContact(String contact);", "public ListSelectionModel getContactSelection() {\r\n if (contactSelection == null) {\r\n contactSelection = new DefaultListSelectionModel();\r\n contactSelection.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n setContactSelection(contactSelection);\r\n }\r\n return contactSelection;\r\n }", "private void getContactDataBefore() {\n int i = 0;\n List<String> list = new ArrayList<>();\n\n Cursor c1 = getContentResolver()\n .query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n if ((c1 != null) && c1.moveToFirst()) {\n\n // add contact id's to the mIDs list\n do {\n String id = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts._ID));\n String name = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME));\n\n // query all contact numbers corresponding to current id\n Cursor c2 = getContentResolver()\n .query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER},\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=?\",\n new String[]{id}, null);\n\n if (c2 != null && c2.moveToFirst()) {\n // Log.d(\"DEBUG\",\"name =\" + name);\n list = new ArrayList<>();\n\n if (idsHash.containsKey(name)) {\n list = idsHash.get(name);\n } else {\n mIDs.add(id);\n mNames.add(name);\n mNumbers.add(c2.getString(c2\n .getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.NUMBER)));\n }\n\n list.add(id);\n idsHash.put(name, list);\n\n c2.close();\n } else {\n c2.close();\n }\n\n i++;\n } while (c1.moveToNext() && i < c1.getCount());\n\n c1.close();\n }\n }", "public String getContactFirstName() {\n return contactFirstName;\n }", "public ClientContact getClientContact() {\n\t\tif (clientContact == null) {\n\t\t\tsetClientContact(findClientContact(getJob().getClientContact().getId()));\n\t\t}\n\t\treturn clientContact;\n\t}", "public long getLastContact() {\r\n\t\treturn lastContactTimestamp.get();\r\n\t}", "public String getAllContactId() {\n return getContact().getUid();\n }", "public String getContactName() {\r\n return tfContactName.getText().trim();\r\n }", "public com.polytech.spik.protocol.SpikMessages.ContactOrBuilder getContactOrBuilder() {\n if (typeCase_ == 1) {\n return (com.polytech.spik.protocol.SpikMessages.Contact) type_;\n }\n return com.polytech.spik.protocol.SpikMessages.Contact.getDefaultInstance();\n }", "@Override\n\tpublic void openFirstContact() {\n\t\t\n\t}", "public ServerStoredContactListJabberImpl getSsContactList()\n {\n return ssContactList;\n }", "public Collection<ContactCommunication> getContactCommunication(){\r\n\t\treturn contactCommunication;\r\n\t}", "public String getContactsState() {\n return \"\";\n }", "public java.util.List<com.ubtrobot.phone.PhoneCall.Contact> getContactListList() {\n return contactList_;\n }", "public java.util.List<com.ubtrobot.phone.PhoneCall.Contact> getContactListList() {\n return contactList_;\n }", "public java.util.List<com.ubtrobot.phone.PhoneCall.Contact> getContactListList() {\n return contactList_;\n }" ]
[ "0.74764735", "0.73853654", "0.7381844", "0.7381844", "0.7381844", "0.7381844", "0.7381844", "0.73317266", "0.73317266", "0.7188652", "0.7015748", "0.698976", "0.69360673", "0.68299884", "0.67990327", "0.67985636", "0.66659534", "0.6646986", "0.6618697", "0.6604151", "0.6601111", "0.65926176", "0.65926176", "0.65913045", "0.65277433", "0.6492735", "0.6485287", "0.64751333", "0.6459746", "0.64582247", "0.64568055", "0.64306957", "0.64238435", "0.6419674", "0.6401148", "0.63854414", "0.63804084", "0.6369723", "0.63532376", "0.6347977", "0.6332844", "0.6332844", "0.6332844", "0.6332844", "0.6319696", "0.6298716", "0.62985057", "0.6288793", "0.6277565", "0.6239653", "0.62222964", "0.6180543", "0.61657465", "0.61412835", "0.61390334", "0.6128469", "0.6103841", "0.6101799", "0.60994756", "0.6091816", "0.6079774", "0.6077155", "0.6074434", "0.6067001", "0.6065625", "0.6052489", "0.6045921", "0.60450804", "0.6030554", "0.6028733", "0.60284936", "0.6016066", "0.6007407", "0.59901553", "0.5985163", "0.59791243", "0.59791243", "0.5974826", "0.59737265", "0.5966488", "0.59645665", "0.59340894", "0.5926958", "0.59252554", "0.5920132", "0.5901727", "0.5899374", "0.5896083", "0.58653975", "0.5862804", "0.586272", "0.58585995", "0.58540577", "0.58527905", "0.58430904", "0.584078", "0.58374333", "0.58369875", "0.582934", "0.582934", "0.582934" ]
0.0
-1